[llvm] [WIP][AMDGPU] Support the RF inline asm constraint (PR #195123)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 02:23:22 PDT 2026


================
@@ -10502,8 +10502,13 @@ static bool prepareDAGLevelOperands(ConstraintDecisionInfo &Info,
         assert((OpInfo.isIndirect ||
                 OpInfo.ConstraintType != TargetLowering::C_Memory) &&
                "Operand must be indirect to be a mem!");
+        unsigned AddrSpace = 0;
+        const Value *Ptr = OpInfo.CallOperandVal;
+        if (Ptr && Ptr->getType()->getTypeID() == Type::PointerTyID)
+          AddrSpace = cast<PointerType>(Ptr->getType())->getAddressSpace();
----------------
arsenm wrote:

Use dyn_cast to PointerType instead of check type ID and cast 

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


More information about the llvm-commits mailing list