[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

Shengchen Kan via cfe-commits cfe-commits at lists.llvm.org
Wed May 29 20:23:45 PDT 2024


================
@@ -57999,13 +58020,25 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
     case 'q':   // GENERAL_REGS in 64-bit mode, Q_REGS in 32-bit mode.
       if (Subtarget.is64Bit()) {
         if (VT == MVT::i8 || VT == MVT::i1)
-          return std::make_pair(0U, &X86::GR8_NOREX2RegClass);
+          return std::make_pair(0U, Subtarget.hasEGPR() &&
+                                            Subtarget.useInlineAsmGPR32()
----------------
KanRobert wrote:

Define a local helper for `Subtarget.hasEGPR() && Subtarget.useInlineAsmGPR32()`?

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


More information about the cfe-commits mailing list