aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-06-16 01:52:07 +0000
committerChris Lattner <sabre@nondot.org>2005-06-16 01:52:07 +0000
commitaa457ac2e77f88d5ee3a7016a7b235c533bdd621 (patch)
tree8b6394285726eba15508275da456c54efc9f2b70
parentd286b245be9aa45e6cf1c03a70cb5137f7e7d7e9 (diff)
Fix a bug in my previous patch. Do not get the shift amount type (which
is always ubyte, get the type being shifted). This unbreaks espresso git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22224 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 02438202dc..046b434bd2 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -2614,7 +2614,7 @@ Instruction *InstCombiner::visitSetCondInst(SetCondInst &I) {
// Check that the shift amount is in range. If not, don't perform
// undefined shifts. When the shift is visited it will be
// simplified.
- unsigned TypeBits = ShAmt->getType()->getPrimitiveSizeInBits();
+ unsigned TypeBits = CI->getType()->getPrimitiveSizeInBits();
if (ShAmt->getValue() >= TypeBits)
break;