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
This commit is contained in:
Chris Lattner 2005-06-16 01:52:07 +00:00
parent d286b245be
commit aa457ac2e7

View File

@ -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;