[llvm-commits] [llvm] r78236 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
Dan Gohman
gohman at apple.com
Wed Aug 5 13:14:27 PDT 2009
Author: djg
Date: Wed Aug 5 15:13:45 2009
New Revision: 78236
URL: http://llvm.org/viewvc/llvm-project?rev=78236&view=rev
Log:
hasSuperClass tests for a strict superset relation, rather than
a superset relation. This code wants to test the regular superset
relation.
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=78236&r1=78235&r2=78236&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Wed Aug 5 15:13:45 2009
@@ -1698,8 +1698,8 @@
else if (!DestRC->hasSubClass(SrcRC)) {
// Neither of GR64_NOREX or GR64_NOSP is a superclass of the other,
// but we want to copy then as GR64.
- if (SrcRC->hasSuperClass(&X86::GR64RegClass) &&
- DestRC->hasSuperClass(&X86::GR64RegClass))
+ if ((SrcRC == &X86::GR64RegClass || SrcRC->hasSuperClass(&X86::GR64RegClass)) &&
+ (DestRC == &X86::GR64RegClass || DestRC->hasSuperClass(&X86::GR64RegClass)))
CommonRC = &X86::GR64RegClass;
else
CommonRC = 0;
More information about the llvm-commits
mailing list