[AMDGPU] Fix llvm.amdgcn.init.exec and frame materialization
authorCarl Ritson <carl.ritson@amd.com>
Sun, 24 Jan 2021 23:31:08 +0000 (08:31 +0900)
committerCarl Ritson <carl.ritson@amd.com>
Sun, 24 Jan 2021 23:31:17 +0000 (08:31 +0900)
commita80ebd01798ca82a4f5ffd6d355c5c9facd83375
tree0aa6bbc7ba0e09275fec581e59897b66104b01cb
parentafd483e57d166418e94a65bd9716e7dc4c114eed
[AMDGPU] Fix llvm.amdgcn.init.exec and frame materialization

Frame-base materialization may insert vector instructions before EXEC is initialised.
Fix this by moving lowering of llvm.amdgcn.init.exec later in backend.
Also remove SI_INIT_EXEC_LO pseudo as this is not necessary.

Reviewed By: ruiling

Differential Revision: https://reviews.llvm.org/D94645
llvm/include/llvm/IR/IntrinsicsAMDGPU.td
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/lib/Target/AMDGPU/SIInstructions.td
llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.init.exec.ll