aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-11 15:59:48 +0000
committerDan Gohman <gohman@apple.com>2009-08-11 15:59:48 +0000
commit3108222c2cb3e61097396274b1c3ae0a86625975 (patch)
tree096f6521734c94e3b598ea1d022b7bed675c09eb /lib
parentb2d746ce6df9b6c4ceef991ffb740eac6aea8173 (diff)
downloadexternal_llvm-3108222c2cb3e61097396274b1c3ae0a86625975.zip
external_llvm-3108222c2cb3e61097396274b1c3ae0a86625975.tar.gz
external_llvm-3108222c2cb3e61097396274b1c3ae0a86625975.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78676 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86InstrInfo.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp
index 79bd0af..1b1c093 100644
--- a/lib/Target/X86/X86InstrInfo.cpp
+++ b/lib/Target/X86/X86InstrInfo.cpp
@@ -1699,15 +1699,11 @@ bool X86InstrInfo::copyRegToReg(MachineBasicBlock &MBB,
// 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
// GR32_NOSP, copy as GR32.
- if ((SrcRC == &X86::GR64RegClass ||
- SrcRC->hasSuperClass(&X86::GR64RegClass)) &&
- (DestRC == &X86::GR64RegClass ||
- DestRC->hasSuperClass(&X86::GR64RegClass)))
+ if (SrcRC->hasSuperClass(&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)))
+ else if (SrcRC->hasSuperClass(&X86::GR32RegClass) &&
+ DestRC->hasSuperClass(&X86::GR32RegClass))
CommonRC = &X86::GR32RegClass;
else
CommonRC = 0;