[llvm] 84c89d0 - [LV][EVL] Address post-commit comments for 9720be9. (NFC) (#123311)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 19 22:20:43 PST 2025
Author: Mel Chen
Date: 2025-01-20T14:20:40+08:00
New Revision: 84c89d0aa4beff4a4d6c36eda125278c48e41128
URL: https://github.com/llvm/llvm-project/commit/84c89d0aa4beff4a4d6c36eda125278c48e41128
DIFF: https://github.com/llvm/llvm-project/commit/84c89d0aa4beff4a4d6c36eda125278c48e41128.diff
LOG: [LV][EVL] Address post-commit comments for 9720be9. (NFC) (#123311)
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/RISCV/vectorize-force-tail-with-evl-fixed-order-recurrence.ll
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 34c5bc3312aec1..f6f80db58cf1b0 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -1438,11 +1438,11 @@ class LoopVectorizationCostModel {
// Override forced styles if needed.
// FIXME: use actual opcode/data type for analysis here.
// FIXME: Investigate opportunity for fixed vector factor.
+ // FIXME: support fixed-order recurrences by fixing splice of non VFxUF
+ // penultimate EVL.
bool EVLIsLegal =
UserIC <= 1 && TTI.hasActiveVectorLength(0, nullptr, Align()) &&
- !EnableVPlanNativePath &&
- // FIXME: remove this once fixed-ordered recurrence is supported.
- Legal->getFixedOrderRecurrences().empty();
+ !EnableVPlanNativePath && Legal->getFixedOrderRecurrences().empty();
if (!EVLIsLegal) {
// If for some reason EVL mode is unsupported, fallback to
// DataWithoutLaneMask to try to vectorize the loop with folded tail
diff --git a/llvm/test/Transforms/LoopVectorize/RISCV/vectorize-force-tail-with-evl-fixed-order-recurrence.ll b/llvm/test/Transforms/LoopVectorize/RISCV/vectorize-force-tail-with-evl-fixed-order-recurrence.ll
index 809b69900731ac..3e6588befaec59 100644
--- a/llvm/test/Transforms/LoopVectorize/RISCV/vectorize-force-tail-with-evl-fixed-order-recurrence.ll
+++ b/llvm/test/Transforms/LoopVectorize/RISCV/vectorize-force-tail-with-evl-fixed-order-recurrence.ll
@@ -12,8 +12,8 @@
; RUN: -mtriple=riscv64 -mattr=+v,+f -S < %s| FileCheck %s --check-prefix=NO-VP
; FIXME: Fixed-order recurrence is not supported yet with EVL tail folding.
-; The llvm.splice may occurs unexpected behavior if the evl of the
-; second-to-last iteration is not VF*UF.
+; The llvm.splice may occur unexpected behavior if the evl of the second-to-last
+; iteration is not VF*UF.
define void @first_order_recurrence(ptr noalias %A, ptr noalias %B, i64 %TC) {
; IF-EVL-LABEL: define void @first_order_recurrence(
More information about the llvm-commits
mailing list