From 104002bee3030628e364f65c41da0ed9c8b90090 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 16 Jun 2005 01:52:07 +0000 Subject: 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 llvm-svn: 22224 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp') diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 02438202dc5..046b434bd2a 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/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; -- cgit v1.2.3