Skip to content

Commit 21cca5e

Browse files
committed
[VPlan] Rely on VPlan opts to simplify multiply by 1 (NFCI).
1 parent 11994e8 commit 21cca5e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3455,9 +3455,7 @@ void VPlanTransforms::materializeVFAndVFxUF(VPlan &Plan, VPBasicBlock *VectorPH,
34553455
VF.replaceAllUsesWith(RuntimeVF);
34563456

34573457
VPValue *UF = Plan.getOrAddLiveIn(ConstantInt::get(TCTy, Plan.getUF()));
3458-
VPValue *MulByUF = Plan.getUF() == 1 ? RuntimeVF
3459-
: Builder.createNaryOp(Instruction::Mul,
3460-
{RuntimeVF, UF});
3458+
VPValue *MulByUF = Builder.createNaryOp(Instruction::Mul, {RuntimeVF, UF});
34613459
VFxUF.replaceAllUsesWith(MulByUF);
34623460
}
34633461

0 commit comments

Comments
 (0)