Fix a bug in my previous patch. Do not get the shift amount type (which
authorChris Lattner <sabre@nondot.org>
Thu, 16 Jun 2005 01:52:07 +0000 (01:52 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 16 Jun 2005 01:52:07 +0000 (01:52 +0000)
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

lib/Transforms/Scalar/InstructionCombining.cpp

index 02438202dc5176ce4d24e0c0e998ed21ac57c78b..046b434bd2ab89242afc0c848bfb3f3efaeb0d34 100644 (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;