summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-11-02 00:17:33 +0000
committerDan Gohman <gohman@apple.com>2008-11-02 00:17:33 +0000
commit83eea0b17f918177c804355ba5a5a0badaa18562 (patch)
treef8c967557d002996ea796cf9e5052bd745837695 /llvm/lib/Transforms
parent769134be1eaec2dd758727b095bef827d517512b (diff)
downloadbcm5719-llvm-83eea0b17f918177c804355ba5a5a0badaa18562.tar.gz
bcm5719-llvm-83eea0b17f918177c804355ba5a5a0badaa18562.zip
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. llvm-svn: 58549
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 70b5aefa23c..75a1ffea6b5 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud