diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-11 15:59:48 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-11 15:59:48 +0000 |
commit | aa3fb653493a87c4e0e2a2e663b9941cd350f827 (patch) | |
tree | 0bfebbb54b8419b565e337eb066f0ef84281e108 | |
parent | 557baeeae46c301a856ffb7ed0b629a7be4000a2 (diff) | |
download | bcm5719-llvm-aa3fb653493a87c4e0e2a2e663b9941cd350f827.tar.gz bcm5719-llvm-aa3fb653493a87c4e0e2a2e663b9941cd350f827.zip |
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
-rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 79bd0af99e8..1b1c093e4eb 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/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; |