[llvm-commits] [llvm] r102228 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Dan Gohman gohman at apple.com
Fri Apr 23 18:17:30 PDT 2010


Author: djg
Date: Fri Apr 23 20:17:30 2010
New Revision: 102228

URL: http://llvm.org/viewvc/llvm-project?rev=102228&view=rev
Log:
Apply a fix for a vector setcc dagcombine from Jan Sjodin. No
testcase yet, as the testcase now fails downstream.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=102228&r1=102227&r2=102228&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Fri Apr 23 20:17:30 2010
@@ -3474,8 +3474,9 @@
     }
     
     // sext(setcc x, y, cc) -> (select_cc x, y, -1, 0, cc)
+    unsigned ElementWidth = VT.getScalarType().getSizeInBits();
     SDValue NegOne =
-      DAG.getConstant(APInt::getAllOnesValue(VT.getSizeInBits()), VT);
+      DAG.getConstant(APInt::getAllOnesValue(ElementWidth), VT);
     SDValue SCC =
       SimplifySelectCC(N->getDebugLoc(), N0.getOperand(0), N0.getOperand(1),
                        NegOne, DAG.getConstant(0, VT),





More information about the llvm-commits mailing list