[llvm] [AMDGPU] Allocate i1 argument to SGPRs (PR #72461)

Jun Wang via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 10:51:21 PDT 2024


================
@@ -15887,7 +15889,14 @@ static bool isCopyFromRegForI1Return(const SDNode *N) {
   SDNode *N2 = N1->getOperand(0).getNode();
   if (N2->getOpcode() != ISD::CopyFromReg)
     return false;
-  SDNode *N3 = N2->getOperand(0).getNode();
+
----------------
jwanggit86 wrote:

Without this, the assert `assert(Reg == FLI->DemoteRegister || isCopyFromRegOfInlineAsm(N)` in `SITargetLowering::isSDNodeSourceOfDivergence()` would trigger in debug build. As I mentioned earlier, an alternative is to use the phys reg from the original CopyFromReg instead of a virtual reg in the new CopyFromReg. 

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


More information about the llvm-commits mailing list