[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelPattern.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Jan 11 23:33:35 PST 2005



Changes in directory llvm/lib/Target/X86:

X86ISelPattern.cpp updated: 1.47 -> 1.48
---
Log message:

Fix a major miscompilation where we were overwriting the scale reg.


---
Diffs of the changes:  (+1 -1)

Index: llvm/lib/Target/X86/X86ISelPattern.cpp
diff -u llvm/lib/Target/X86/X86ISelPattern.cpp:1.47 llvm/lib/Target/X86/X86ISelPattern.cpp:1.48
--- llvm/lib/Target/X86/X86ISelPattern.cpp:1.47	Tue Jan 11 23:22:07 2005
+++ llvm/lib/Target/X86/X86ISelPattern.cpp	Wed Jan 12 01:33:20 2005
@@ -469,7 +469,7 @@
     AM.Disp += cast<ConstantSDNode>(N)->getValue();
     return false;
   case ISD::SHL:
-    if (AM.IndexReg == 0 || AM.Scale == 1)
+    if (AM.IndexReg == 0 && AM.Scale == 1)
       if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N.Val->getOperand(1))) {
         unsigned Val = CN->getValue();
         if (Val == 1 || Val == 2 || Val == 3) {






More information about the llvm-commits mailing list