diff options
author | Dale Johannesen <dalej@apple.com> | 2010-12-21 20:06:19 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2010-12-21 20:06:19 +0000 |
commit | fa5dc82fda4addd3da3518dfc6193f8ae7656271 (patch) | |
tree | a29b35a4fa285b6a000f94be7ed386950efd6149 /llvm/lib/CodeGen | |
parent | d64931df774943c555959173506e5fe37960e788 (diff) | |
download | bcm5719-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.cpp | 2 |
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) { |