diff options
| author | Nirav Dave <niravd@google.com> | 2019-02-07 15:43:40 +0000 |
|---|---|---|
| committer | Nirav Dave <niravd@google.com> | 2019-02-07 15:43:40 +0000 |
| commit | 84e5bf0c9519b7ba219b9f1224323b7007f9c7fa (patch) | |
| tree | 8758ef9d2e49d597a092622e3e8c3b0a4241cbb7 /llvm/lib | |
| parent | 724b81087d72e75ea61eba11e897584d3b56e1c8 (diff) | |
| download | bcm5719-llvm-84e5bf0c9519b7ba219b9f1224323b7007f9c7fa.tar.gz bcm5719-llvm-84e5bf0c9519b7ba219b9f1224323b7007f9c7fa.zip | |
[X86] Simplify casing. NFC.
llvm-svn: 353417
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 68253abb45f..a0fe4026821 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -42985,6 +42985,14 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, // GCC Constraint Letters switch (Constraint[0]) { default: break; + // 'A' means [ER]AX + [ER]DX. + case 'A': + if (Subtarget.is64Bit()) + return std::make_pair(X86::RAX, &X86::GR64_ADRegClass); + assert((Subtarget.is32Bit() || Subtarget.is16Bit()) && + "Expecting 64, 32 or 16 bit subtarget"); + return std::make_pair(X86::EAX, &X86::GR32_ADRegClass); + // TODO: Slight differences here in allocation order and leaving // RIP in the class. Do they matter any more here than they do // in the normal allocation? @@ -43184,14 +43192,6 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, if (StringRef("{fpsr}").equals_lower(Constraint)) return std::make_pair(X86::FPSW, &X86::FPCCRRegClass); - // 'A' means [ER]AX + [ER]DX. - if (Constraint == "A") { - if (Subtarget.is64Bit()) - return std::make_pair(X86::RAX, &X86::GR64_ADRegClass); - assert((Subtarget.is32Bit() || Subtarget.is16Bit()) && - "Expecting 64, 32 or 16 bit subtarget"); - return std::make_pair(X86::EAX, &X86::GR32_ADRegClass); - } return Res; } |

