diff options
author | Dan Gohman <gohman@apple.com> | 2010-04-24 01:17:30 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-04-24 01:17:30 +0000 |
commit | 5544b0c5888c13c571930a9f1987d73742133d14 (patch) | |
tree | a99a4637f82176d14a8ae84448c4b060202a96e5 | |
parent | 75d986935ee5071a14258d0c988f1645bbc5ebbd (diff) | |
download | bcm5719-llvm-5544b0c5888c13c571930a9f1987d73742133d14.tar.gz bcm5719-llvm-5544b0c5888c13c571930a9f1987d73742133d14.zip |
Apply a fix for a vector setcc dagcombine from Jan Sjodin. No
testcase yet, as the testcase now fails downstream.
llvm-svn: 102228
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index e586a23441c..4f1c5f2875e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -3474,8 +3474,9 @@ SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) { } // 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), |