diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-05 22:18:26 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-05 22:18:26 +0000 |
commit | 59e34921a514502ce4e926eeb417d7afd43708dd (patch) | |
tree | b9c53d5548973765bea255cb4584b7f0ecd55378 | |
parent | c9008c5cc7113ea4c3a262e346c0dfcdbca12ae6 (diff) | |
download | llvm-59e34921a514502ce4e926eeb417d7afd43708dd.tar.gz llvm-59e34921a514502ce4e926eeb417d7afd43708dd.tar.bz2 llvm-59e34921a514502ce4e926eeb417d7afd43708dd.tar.xz |
Use GR32 for copies between GR32_NOSP and GR32_NOREX, as neither
is a subset of the other, but both are subsets of GR32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78250 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86InstrInfo.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp index 784a790eb0..393bd5c2ca 100644 --- a/lib/Target/X86/X86InstrInfo.cpp +++ b/lib/Target/X86/X86InstrInfo.cpp @@ -1697,10 +1697,18 @@ bool X86InstrInfo::copyRegToReg(MachineBasicBlock &MBB, CommonRC = SrcRC; else if (!DestRC->hasSubClass(SrcRC)) { // Neither of GR64_NOREX or GR64_NOSP is a superclass of the other, - // but we want to copy then as GR64. - if ((SrcRC == &X86::GR64RegClass || SrcRC->hasSuperClass(&X86::GR64RegClass)) && - (DestRC == &X86::GR64RegClass || DestRC->hasSuperClass(&X86::GR64RegClass))) + // but we want to copy then as GR64. Similarly, for GR32_NOREX and + // GR32_NOSP, copy as GR32. + if ((SrcRC == &X86::GR64RegClass || + SrcRC->hasSuperClass(&X86::GR64RegClass)) && + (DestRC == &X86::GR64RegClass || + DestRC->hasSuperClass(&X86::GR64RegClass))) CommonRC = &X86::GR64RegClass; + else if ((SrcRC == &X86::GR32RegClass || + SrcRC->hasSuperClass(&X86::GR32RegClass)) && + (DestRC == &X86::GR32RegClass || + DestRC->hasSuperClass(&X86::GR32RegClass))) + CommonRC = &X86::GR32RegClass; else CommonRC = 0; } |