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 | 83eea0b17f918177c804355ba5a5a0badaa18562 (patch) | |
| tree | f8c967557d002996ea796cf9e5052bd745837695 /llvm/lib/Transforms | |
| parent | 769134be1eaec2dd758727b095bef827d517512b (diff) | |
| download | bcm5719-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.cpp | 4 |
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) |

