[llvm] [AMDGPU] Fix VGPR to SGPR copy for inline asm with SGPR constraint (PR #176330)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 30 06:21:56 PST 2026


================
@@ -317,6 +317,8 @@ SITargetLowering::SITargetLowering(const TargetMachine &TM,
   setOperationAction({ISD::SHL_PARTS, ISD::SRA_PARTS, ISD::SRL_PARTS}, MVT::i64,
                      Expand);
 
+  setOperationAction(ISD::INLINEASM, MVT::Other, Custom);
----------------
arsenm wrote:

I'm kind of surprised this works. I was expecting to work by inserting the readfirstlanes during the initial asm construction. Does selectionDAG not have an equivalent of lowerAsmOperandForConstraint, and should there be one?

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


More information about the llvm-commits mailing list