aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-01-05 22:39:10 +0000
committerBill Wendling <isanbard@gmail.com>2010-01-05 22:39:10 +0000
commit9f7c5c0dca1e63bca39eb6511e8847b02030cb1f (patch)
treef330e40b9e79967867dc25065c6c2ad0f9e1cd90 /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent83142991613730bc857739c6179660ccffebe379 (diff)
Don't assign the shift the same type as the variable being shifted. This could
result in illegal types for the SHL operator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92797 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index d50bb7b9f9..759fa0e112 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -3322,7 +3322,9 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
DebugLoc dl = N->getDebugLoc();
return DAG.getNode(N0.getOpcode(), dl, VT,
DAG.getNode(ISD::ZERO_EXTEND, dl, VT, N0.getOperand(0)),
- DAG.getNode(ISD::ZERO_EXTEND, dl, VT, N0.getOperand(1)));
+ DAG.getNode(ISD::ZERO_EXTEND, dl,
+ N0.getOperand(1).getValueType(),
+ N0.getOperand(1)));
}
return SDValue();