From b99bf21182baff48be917e81638703fe76aa4ced Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 16 Jun 2005 01:52:07 +0000 Subject: [PATCH] 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 --- lib/Transforms/Scalar/InstructionCombining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 02438202dc5..046b434bd2a 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;