]> granicus.if.org Git - llvm/commitdiff
Simplify this code. The case where one class is GR64RegClass and the
authorDan Gohman <gohman@apple.com>
Tue, 11 Aug 2009 15:59:48 +0000 (15:59 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 11 Aug 2009 15:59:48 +0000 (15:59 +0000)
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

lib/Target/X86/X86InstrInfo.cpp

index 79bd0af99e859dd10a38d0ec79a46992b478ca12..1b1c093e4eb863a097328b8abd154cfdc2219550 100644 (file)
@@ -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;