diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-05-27 22:26:04 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-05-27 22:26:04 +0000 |
commit | f5e771db37bb4c63f81f902a1d21269c4bd45236 (patch) | |
tree | 74f5942dbd18e660795e59d5df5a8697d4521f1c /lib/Target/X86/X86RegisterInfo.cpp | |
parent | 37afca128db40b086752f3f62464ba08128c3b4d (diff) | |
download | external_llvm-f5e771db37bb4c63f81f902a1d21269c4bd45236.zip external_llvm-f5e771db37bb4c63f81f902a1d21269c4bd45236.tar.gz external_llvm-f5e771db37bb4c63f81f902a1d21269c4bd45236.tar.bz2 |
Add a GR32_NOREX_NOSP register class and fix a bug where getMatchingSuperRegClass()
was saying that the matching superregister class of GR32_NOREX in GR64_NOREX_NOSP
is GR64_NOREX, which drops the NOSP constraint. This fixes PR10032.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132225 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86RegisterInfo.cpp')
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index fc1b8cf..ebd0d05 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -301,9 +301,16 @@ X86RegisterInfo::getMatchingSuperRegClass(const TargetRegisterClass *A, A == &X86::GR64_NOREX_NOSPRegClass) return &X86::GR64_ABCDRegClass; } else if (B == &X86::GR32_NOREXRegClass) { + if (A == &X86::GR64RegClass || A == &X86::GR64_NOREXRegClass) + return &X86::GR64_NOREXRegClass; + else if (A == &X86::GR64_NOSPRegClass || A == &X86::GR64_NOREX_NOSPRegClass) + return &X86::GR64_NOREX_NOSPRegClass; + else if (A == &X86::GR64_ABCDRegClass) + return &X86::GR64_ABCDRegClass; + } else if (B == &X86::GR32_NOREX_NOSPRegClass) { if (A == &X86::GR64RegClass || A == &X86::GR64_NOREXRegClass || A == &X86::GR64_NOSPRegClass || A == &X86::GR64_NOREX_NOSPRegClass) - return &X86::GR64_NOREXRegClass; + return &X86::GR64_NOREX_NOSPRegClass; else if (A == &X86::GR64_ABCDRegClass) return &X86::GR64_ABCDRegClass; } |