diff options
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) |

