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

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;