[llvm] [NFC][LV] Refine the lit test case riscv-vector-reverse.ll (PR #149020)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 15 23:46:34 PDT 2025


================
@@ -0,0 +1,168 @@
+; This is the loop in c++ being vectorize in this file with
+;vector.reverse
+;  #pragma clang loop vectorize_width(4, scalable)
+;  for (int i = N-1; i >= 0; --i)
+;    a[i] = b[i] + 1.0;
+
+; REQUIRES: asserts
+; RUN: opt -passes=loop-vectorize -mtriple=riscv64 -mattr=+v \
+; RUN: -debug-only=loop-vectorize -scalable-vectorization=on \
+; RUN: -riscv-v-vector-bits-min=128 -disable-output < %s 2>&1 | FileCheck %s
+
+define void @vector_reverse_i64(ptr nocapture noundef writeonly %A, ptr nocapture noundef readonly %B, i32 noundef signext %n) {
+; CHECK: VPlan 'Initial VPlan for VF={vscale x 4},UF>=1' {
----------------
fhahn wrote:

Would it be enough to check just the plan for i64?

https://github.com/llvm/llvm-project/pull/149020


More information about the llvm-commits mailing list