diff options
author | Dan Gohman <gohman@apple.com> | 2008-11-02 00:17:33 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-11-02 00:17:33 +0000 |
commit | 21440acc06b6451ad5c0678e3f15ee08b1f1d206 (patch) | |
tree | 35eaa0707239c0a269d3baf84082a56dfb0f10e0 /lib/Transforms | |
parent | 3efcd4a65cdf41ec72205757421dca6026e92a19 (diff) |
Fix this recently moved code to use the correct type. CI is now a
ConstantInt, and SI is the original cast instruction. This fixes
PR2996.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 70b5aefa23..75a1ffea6b 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -8551,8 +8551,8 @@ Instruction *InstCombiner::visitSelectInstWithICmp(SelectInst &SI, In = InsertNewInstBefore(BinaryOperator::CreateAShr(In, Sh, In->getName()+".lobit"), *ICI); - if (In->getType() != CI->getType()) - In = CastInst::CreateIntegerCast(In, CI->getType(), + if (In->getType() != SI.getType()) + In = CastInst::CreateIntegerCast(In, SI.getType(), true/*SExt*/, "tmp", ICI); if (Pred == ICmpInst::ICMP_SGT) |