[llvm-commits] [llvm] r44657 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/X86/shift-combine.ll

Chris Lattner sabre at nondot.org
Wed Dec 5 23:44:34 PST 2007


Author: lattner
Date: Thu Dec  6 01:44:31 2007
New Revision: 44657

URL: http://llvm.org/viewvc/llvm-project?rev=44657&view=rev
Log:
Actually, disable this code for now.  More analysis and improvements to
the X86 backend are needed before this should be enabled by default.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    llvm/trunk/test/CodeGen/X86/shift-combine.ll

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

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Dec  6 01:44:31 2007
@@ -2134,6 +2134,12 @@
 /// visitShiftByConstant - Handle transforms common to the three shifts, when
 /// the shift amount is a constant.
 SDOperand DAGCombiner::visitShiftByConstant(SDNode *N, unsigned Amt) {
+  // FIXME: disable this for now.  This pessimizes some common cases like:
+  //
+  //void foo(int *X, int i) { X[i & 1235] = 1; }
+  //int bar(int *X, int i) { return X[i & 255]; }
+  return SDOperand();
+  
   SDNode *LHS = N->getOperand(0).Val;
   if (!LHS->hasOneUse()) return SDOperand();
   

Modified: llvm/trunk/test/CodeGen/X86/shift-combine.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/shift-combine.ll?rev=44657&r1=44656&r2=44657&view=diff

==============================================================================
--- llvm/trunk/test/CodeGen/X86/shift-combine.ll (original)
+++ llvm/trunk/test/CodeGen/X86/shift-combine.ll Thu Dec  6 01:44:31 2007
@@ -1,4 +1,5 @@
 ; RUN: llvm-as < %s | llc | not grep shrl
+; XFAIL: *
 
 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"
 target triple = "i686-apple-darwin8"





More information about the llvm-commits mailing list