[InstCombine] simplify code for FP to integer casts; NFCI

FoldIToFPtoI() returns immediately if the operand is not
an opposite cast instruction, so the extra checks in the
callers are redundant.
This commit is contained in:
Sanjay Patel 2020-05-08 09:05:41 -04:00
parent 9f726376e3
commit 09d70e0588
1 changed files with 0 additions and 8 deletions

View File

@ -1784,10 +1784,6 @@ Instruction *InstCombiner::FoldItoFPtoI(Instruction &FI) {
}
Instruction *InstCombiner::visitFPToUI(FPToUIInst &FI) {
Instruction *OpI = dyn_cast<Instruction>(FI.getOperand(0));
if (!OpI)
return commonCastTransforms(FI);
if (Instruction *I = FoldItoFPtoI(FI))
return I;
@ -1795,10 +1791,6 @@ Instruction *InstCombiner::visitFPToUI(FPToUIInst &FI) {
}
Instruction *InstCombiner::visitFPToSI(FPToSIInst &FI) {
Instruction *OpI = dyn_cast<Instruction>(FI.getOperand(0));
if (!OpI)
return commonCastTransforms(FI);
if (Instruction *I = FoldItoFPtoI(FI))
return I;