diff options
author | Dale Johannesen <dalej@apple.com> | 2010-12-20 20:10:50 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2010-12-20 20:10:50 +0000 |
commit | 0a291a36f2e3a7af294c099a4c154524c5e4510c (patch) | |
tree | 6c4bcf32e76eb9f4a0c12ed75192402c96b41da3 /llvm/lib/CodeGen/SelectionDAG | |
parent | f7957d04639baf1eb85d9de7c849c76f40dda019 (diff) | |
download | bcm5719-llvm-0a291a36f2e3a7af294c099a4c154524c5e4510c.tar.gz bcm5719-llvm-0a291a36f2e3a7af294c099a4c154524c5e4510c.zip |
Cosmetic changes.
llvm-svn: 122259
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index c54da0dd398..c1288d5d7be 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -3172,15 +3172,15 @@ SDValue DAGCombiner::visitSRL(SDNode *N) { } // fold (srl (trunc (srl x, c1)), c2) -> 0 or (trunc (srl x, (add c1, c2))) - // This is only valid if the OpSizeInBits + c1 = size of inner shift if (N1C && N0.getOpcode() == ISD::TRUNCATE && N0.getOperand(0).getOpcode() == ISD::SRL && - N0.getOperand(0)->getOperand(1).getOpcode() == ISD::Constant) { + isa<ConstantSDNode>(N0.getOperand(0)->getOperand(1))) { uint64_t c1 = cast<ConstantSDNode>(N0.getOperand(0)->getOperand(1))->getZExtValue(); uint64_t c2 = N1C->getZExtValue(); EVT InnerShiftVT = N0.getOperand(0)->getOperand(1).getValueType(); uint64_t InnerShiftSize = InnerShiftVT.getScalarType().getSizeInBits(); + // This is only valid if the OpSizeInBits + c1 = size of inner shift. if (c1 + OpSizeInBits == InnerShiftSize) { if (c1 + c2 >= InnerShiftSize) return DAG.getConstant(0, VT); |