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 | 77f33b71c7127666c00cbf7dedfc6398d1fc1759 (patch) | |
| tree | fd1c43f7c3bd40e617b286601751614dea7ae3fb | |
| parent | 01aabafee0b15a6b3ec6ae3d4b09d0b665e7939d (diff) | |
| download | bcm5719-llvm-77f33b71c7127666c00cbf7dedfc6398d1fc1759.tar.gz bcm5719-llvm-77f33b71c7127666c00cbf7dedfc6398d1fc1759.zip  | |
Use GR32 for copies between GR32_NOSP and GR32_NOREX, as neither
is a subset of the other, but both are subsets of GR32.
llvm-svn: 78250
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 14 | 
1 files changed, 11 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 784a790eb00..393bd5c2ca0 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/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;    }  | 

