summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-17 22:53:02 +0000
committerChris Lattner <sabre@nondot.org>2007-04-17 22:53:02 +0000
commit4aff52bf3d6710759a6053a75eaad39acdf9afae (patch)
treedccc6409dcd1d29f2583618954fa6d845a4e8d28 /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
parent598bc0d9a362387199b213f557df7fddb759568a (diff)
downloadbcm5719-llvm-4aff52bf3d6710759a6053a75eaad39acdf9afae.tar.gz
bcm5719-llvm-4aff52bf3d6710759a6053a75eaad39acdf9afae.zip
Fix a bug in my previous patch, grabbing the shift amount width from the
wrong operand. llvm-svn: 36223
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 3da06f99749..ff27b123180 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -581,7 +581,7 @@ bool TargetLowering::SimplifyDemandedBits(SDOperand Op, uint64_t DemandedMask,
}
SDOperand NewSA =
- TLO.DAG.getConstant(ShAmt-C1, Op.getOperand(0).getValueType());
+ TLO.DAG.getConstant(ShAmt-C1, Op.getOperand(1).getValueType());
MVT::ValueType VT = Op.getValueType();
return TLO.CombineTo(Op, TLO.DAG.getNode(ISD::SRL, VT,
InOp.getOperand(0), NewSA));
@@ -619,7 +619,7 @@ bool TargetLowering::SimplifyDemandedBits(SDOperand Op, uint64_t DemandedMask,
}
SDOperand NewSA =
- TLO.DAG.getConstant(Diff, Op.getOperand(0).getValueType());
+ TLO.DAG.getConstant(Diff, Op.getOperand(1).getValueType());
return TLO.CombineTo(Op, TLO.DAG.getNode(Opc, VT,
InOp.getOperand(0), NewSA));
}
OpenPOWER on IntegriCloud