From: Chris Lattner Date: Thu, 16 Jun 2005 01:52:07 +0000 (+0000) Subject: Fix a bug in my previous patch. Do not get the shift amount type (which X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=aa457ac2e77f88d5ee3a7016a7b235c533bdd621;p=oota-llvm.git 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 --- 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;