[VPlan] Rely on VPlan opts to simplify multiply by 1 (NFCI).

This commit is contained in:
Florian Hahn 2025-08-21 18:43:47 +01:00
parent 11994e8da7
commit 21cca5ea9d
No known key found for this signature in database
GPG Key ID: 3596DCFCBB5C67CC

View File

@ -3455,9 +3455,7 @@ void VPlanTransforms::materializeVFAndVFxUF(VPlan &Plan, VPBasicBlock *VectorPH,
VF.replaceAllUsesWith(RuntimeVF);
VPValue *UF = Plan.getOrAddLiveIn(ConstantInt::get(TCTy, Plan.getUF()));
VPValue *MulByUF = Plan.getUF() == 1 ? RuntimeVF
: Builder.createNaryOp(Instruction::Mul,
{RuntimeVF, UF});
VPValue *MulByUF = Builder.createNaryOp(Instruction::Mul, {RuntimeVF, UF});
VFxUF.replaceAllUsesWith(MulByUF);
}