[llvm] [LoopVectorize] Vectorize fixed-order recurrence with vscale x 1. (PR #142772)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 10 07:25:46 PDT 2025
================
@@ -8564,13 +8559,17 @@ addUsersInExitBlocks(VPlan &Plan,
/// users in the original exit block using the VPIRInstruction wrapping to the
/// LCSSA phi.
static void addExitUsersForFirstOrderRecurrences(
- VPlan &Plan, SetVector<VPIRInstruction *> &ExitUsersToFix) {
+ VPlan &Plan, SetVector<VPIRInstruction *> &ExitUsersToFix, VFRange &Range) {
VPRegionBlock *VectorRegion = Plan.getVectorLoopRegion();
auto *ScalarPHVPBB = Plan.getScalarPreheader();
auto *MiddleVPBB = Plan.getMiddleBlock();
VPBuilder ScalarPHBuilder(ScalarPHVPBB);
VPBuilder MiddleBuilder(MiddleVPBB, MiddleVPBB->getFirstNonPhi());
+ auto IsScalableOne = [](ElementCount VF) -> bool {
+ return VF.isScalable() && VF.getKnownMinValue() == 1;
----------------
Mel-Chen wrote:
Sure
0efbda6ecaeada4b7d9d348112013e642d349da8
https://github.com/llvm/llvm-project/pull/142772
More information about the llvm-commits
mailing list