[llvm-commits] [llvm] r59101 - in /llvm/trunk: lib/CodeGen/SelectionDAG/TargetLowering.cpp test/CodeGen/X86/2008-11-06-testb.ll

Dale Johannesen dalej at apple.com
Tue Nov 11 18:00:35 PST 2008


Author: johannes
Date: Tue Nov 11 20:00:35 2008
New Revision: 59101

URL: http://llvm.org/viewvc/llvm-project?rev=59101&view=rev
Log:
Fix the testb optimization so x86 also bootstraps.
Reenable test.


Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    llvm/trunk/test/CodeGen/X86/2008-11-06-testb.ll

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=59101&r1=59100&r2=59101&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Tue Nov 11 20:00:35 2008
@@ -1353,7 +1353,6 @@
         }
       }
 
-#if 0
       // If the LHS is '(and load, const)', the RHS is 0,
       // the test is for equality or unsigned, and all 1 bits of the const are
       // in the same partial word, see if we can shorten the load.
@@ -1380,7 +1379,7 @@
                   bestOffset = (origWidth/width - offset - 1) * (width/8);
                 else
                   bestOffset = (uint64_t)offset * (width/8);
-                bestMask = Mask >> (offset * 8);
+                bestMask = Mask >> (offset * (width/8) * 8);
                 bestWidth = width;
                 break;
               }
@@ -1407,7 +1406,6 @@
           }
         }
       }
-#endif
 
       // If the LHS is a ZERO_EXTEND, perform the comparison on the input.
       if (N0.getOpcode() == ISD::ZERO_EXTEND) {

Modified: llvm/trunk/test/CodeGen/X86/2008-11-06-testb.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-11-06-testb.ll?rev=59101&r1=59100&r2=59101&view=diff

==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-11-06-testb.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2008-11-06-testb.ll Tue Nov 11 20:00:35 2008
@@ -1,5 +1,4 @@
 ; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin | grep testb
-; XFAIL: *
 
 ; ModuleID = '<stdin>'
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"





More information about the llvm-commits mailing list