forked from OSchip/llvm-project
Simplify this code. The case where one class is GR64RegClass and the
other is a subclass of it is effectively handled by the prior tests. llvm-svn: 78676
This commit is contained in:
parent
557baeeae4
commit
aa3fb65349
|
@ -1699,15 +1699,11 @@ bool X86InstrInfo::copyRegToReg(MachineBasicBlock &MBB,
|
||||||
// Neither of GR64_NOREX or GR64_NOSP is a superclass of the other,
|
// Neither of GR64_NOREX or GR64_NOSP is a superclass of the other,
|
||||||
// but we want to copy then as GR64. Similarly, for GR32_NOREX and
|
// but we want to copy then as GR64. Similarly, for GR32_NOREX and
|
||||||
// GR32_NOSP, copy as GR32.
|
// GR32_NOSP, copy as GR32.
|
||||||
if ((SrcRC == &X86::GR64RegClass ||
|
if (SrcRC->hasSuperClass(&X86::GR64RegClass) &&
|
||||||
SrcRC->hasSuperClass(&X86::GR64RegClass)) &&
|
DestRC->hasSuperClass(&X86::GR64RegClass))
|
||||||
(DestRC == &X86::GR64RegClass ||
|
|
||||||
DestRC->hasSuperClass(&X86::GR64RegClass)))
|
|
||||||
CommonRC = &X86::GR64RegClass;
|
CommonRC = &X86::GR64RegClass;
|
||||||
else if ((SrcRC == &X86::GR32RegClass ||
|
else if (SrcRC->hasSuperClass(&X86::GR32RegClass) &&
|
||||||
SrcRC->hasSuperClass(&X86::GR32RegClass)) &&
|
DestRC->hasSuperClass(&X86::GR32RegClass))
|
||||||
(DestRC == &X86::GR32RegClass ||
|
|
||||||
DestRC->hasSuperClass(&X86::GR32RegClass)))
|
|
||||||
CommonRC = &X86::GR32RegClass;
|
CommonRC = &X86::GR32RegClass;
|
||||||
else
|
else
|
||||||
CommonRC = 0;
|
CommonRC = 0;
|
||||||
|
|
Loading…
Reference in New Issue