diff options
author | Chris Lattner <sabre@nondot.org> | 2006-04-28 22:21:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-04-28 22:21:41 +0000 |
commit | 94046b4d103cb72734611708d24674e438e16aae (patch) | |
tree | 56402ac234ea72e9f6d6303db4ffa816cc6a0323 | |
parent | c624b5a049c688b6ac5fad903699dc1af0df17e9 (diff) |
Fix InstCombine/2006-04-28-ShiftShiftLongLong.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28019 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 590e0d9d97..7e9c3841cc 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/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; |