summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-04-28 22:21:41 +0000
committerChris Lattner <sabre@nondot.org>2006-04-28 22:21:41 +0000
commit655d08fda8fc2739e4e2ead474b0d0fc471b1e2a (patch)
tree810fe22f0b552481b82f983687c01111e756ee57 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp
parent00aaa76da3ddcc0bf49571397de3ecc7c13f2c87 (diff)
downloadbcm5719-llvm-655d08fda8fc2739e4e2ead474b0d0fc471b1e2a.tar.gz
bcm5719-llvm-655d08fda8fc2739e4e2ead474b0d0fc471b1e2a.zip
Fix InstCombine/2006-04-28-ShiftShiftLongLong.ll
llvm-svn: 28019
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 590e0d9d97e..7e9c3841cce 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -4435,7 +4435,7 @@ Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantUInt *Op1,
// this case, C1 == C2 and C1 is 8, 16, or 32.
if (ShiftAmt1 == ShiftAmt2) {
const Type *SExtType = 0;
- switch (ShiftAmt1) {
+ switch (Op0->getType()->getPrimitiveSizeInBits() - ShiftAmt1) {
case 8 : SExtType = Type::SByteTy; break;
case 16: SExtType = Type::ShortTy; break;
case 32: SExtType = Type::IntTy; break;
OpenPOWER on IntegriCloud