summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-12-21 20:06:19 +0000
committerDale Johannesen <dalej@apple.com>2010-12-21 20:06:19 +0000
commitfa5dc82fda4addd3da3518dfc6193f8ae7656271 (patch)
treea29b35a4fa285b6a000f94be7ed386950efd6149 /llvm/lib/CodeGen
parentd64931df774943c555959173506e5fe37960e788 (diff)
downloadbcm5719-llvm-fa5dc82fda4addd3da3518dfc6193f8ae7656271.tar.gz
bcm5719-llvm-fa5dc82fda4addd3da3518dfc6193f8ae7656271.zip
Get the type of a shift from the shift, not from its shift
count operand. These should be the same but apparently are not always, and this is cleaner anyway. This improves the code in an existing test. llvm-svn: 122354
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index c58dede823c..cd26e647b43 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -3178,7 +3178,7 @@ SDValue DAGCombiner::visitSRL(SDNode *N) {
uint64_t c1 =
cast<ConstantSDNode>(N0.getOperand(0)->getOperand(1))->getZExtValue();
uint64_t c2 = N1C->getZExtValue();
- EVT InnerShiftVT = N0.getOperand(0)->getOperand(1).getValueType();
+ EVT InnerShiftVT = N0.getOperand(0).getValueType();
uint64_t InnerShiftSize = InnerShiftVT.getScalarType().getSizeInBits();
// This is only valid if the OpSizeInBits + c1 = size of inner shift.
if (c1 + OpSizeInBits == InnerShiftSize) {
OpenPOWER on IntegriCloud