forked from OSchip/llvm-project
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
This commit is contained in:
parent
01aabafee0
commit
77f33b71c7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue