[llvm] [AMDGPU]: Add implicit-def to the BB prolog (PR #112872)

Christudasan Devadasan via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 19 13:03:55 PDT 2024


================
@@ -8918,6 +8918,7 @@ bool SIInstrInfo::isBasicBlockPrologue(const MachineInstr &MI,
   uint16_t Opcode = MI.getOpcode();
   return IsNullOrVectorRegister &&
          (isSGPRSpill(Opcode) || isWWMRegSpillOpcode(Opcode) ||
+          Opcode == AMDGPU::IMPLICIT_DEF ||
----------------
cdevadas wrote:

I had the same thought initially. But we add implicit-def for other different cases and they can break the BB prolog too.
They are hard to track if such edge cases occur. This fix looks much better in that way. 

https://github.com/llvm/llvm-project/pull/112872


More information about the llvm-commits mailing list