[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
Thu Jul 17 03:37:05 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:
Yep, but does it need to check different types? It doesn't seem checking the VPlan for float adds much (only difference is fadd vs add, which doesn't seem interesting here)
https://github.com/llvm/llvm-project/pull/149020
More information about the llvm-commits
mailing list