[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)
Freddy Ye via cfe-commits
cfe-commits at lists.llvm.org
Wed May 29 02:26:45 PDT 2024
================
@@ -58024,15 +58043,22 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
case 'r': // GENERAL_REGS
case 'l': // INDEX_REGS
if (VT == MVT::i8 || VT == MVT::i1)
- return std::make_pair(0U, &X86::GR8_NOREX2RegClass);
+ return std::make_pair(0U, Subtarget.useInlineAsmGPR32()
+ ? &X86::GR8_NOREX2RegClass
+ : &X86::GR8RegClass);
if (VT == MVT::i16)
- return std::make_pair(0U, &X86::GR16_NOREX2RegClass);
+ return std::make_pair(0U, Subtarget.useInlineAsmGPR32()
+ ? &X86::GR16_NOREX2RegClass
+ : &X86::GR16RegClass);
if (VT == MVT::i32 || VT == MVT::f32 ||
(!VT.isVector() && !Subtarget.is64Bit()))
- return std::make_pair(0U, &X86::GR32_NOREX2RegClass);
+ return std::make_pair(0U, Subtarget.useInlineAsmGPR32()
----------------
FreddyLeaf wrote:
addressed in [bf3a53c](https://github.com/llvm/llvm-project/pull/92338/commits/bf3a53c0b7fc1828572f771e4772d25062110dc0)
https://github.com/llvm/llvm-project/pull/92338
More information about the cfe-commits
mailing list