[llvm] [AMDGPU] Fix a crash when a bool variable is used in inline asm (PR #171004)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 7 16:27:48 PST 2025


================
@@ -17670,6 +17670,11 @@ SITargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI_,
       break;
     case 'v':
       switch (BitWidth) {
+      case 1:
+        RC = Subtarget->has1024AddressableVGPRs()
----------------
shiltian wrote:

This was called in `SelectionDAGBuilder::visitInlineAsm` so I'm not sure if we can do anything at that moment. We can definitely do something later in the pipeline.

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


More information about the llvm-commits mailing list