[llvm] 21cca5e - [VPlan] Rely on VPlan opts to simplify multiply by 1 (NFCI).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 21 10:44:06 PDT 2025
Author: Florian Hahn
Date: 2025-08-21T18:43:47+01:00
New Revision: 21cca5ea9d13ff791a7982a2a8edb4a56ef4674e
URL: https://github.com/llvm/llvm-project/commit/21cca5ea9d13ff791a7982a2a8edb4a56ef4674e
DIFF: https://github.com/llvm/llvm-project/commit/21cca5ea9d13ff791a7982a2a8edb4a56ef4674e.diff
LOG: [VPlan] Rely on VPlan opts to simplify multiply by 1 (NFCI).
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index 3a097645cd661..feea725f79ae1 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -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);
}
More information about the llvm-commits
mailing list