[llvm-commits] [llvm] r78676 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
Dan Gohman
gohman at apple.com
Tue Aug 11 08:59:48 PDT 2009
Author: djg
Date: Tue Aug 11 10:59:48 2009
New Revision: 78676
URL: http://llvm.org/viewvc/llvm-project?rev=78676&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=78676&r1=78675&r2=78676&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Tue Aug 11 10:59:48 2009
@@ -1699,15 +1699,11 @@
// 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;
More information about the llvm-commits
mailing list