Skip to content

Commit df38766

Browse files
authored
[RISCV] Remove -riscv-v-vector-bits-min from LoopVectorize tests. NFC (#148565)
If I understand correctly there was a point where we used to need this before it was implied by Zvl*b. Now that it is though and we use -mattr=+v in pretty much every test we can remove it. In unroll-in-loop-vectorizer.ll we can force a VF of 1 instead by using -force-vector-width=1, and in scalable-basics.ll the two RUN lines were the same so I merged them.
1 parent 5951c44 commit df38766

14 files changed

+296
-586
lines changed

llvm/test/Transforms/LoopVectorize/RISCV/divrem.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
22
; RUN: opt < %s -passes=loop-vectorize -scalable-vectorization=on -mtriple riscv64-linux-gnu -mattr=+v,+f -S 2>%t | FileCheck %s
3-
; RUN: opt < %s -passes=loop-vectorize -scalable-vectorization=off -riscv-v-vector-bits-min=-1 -mtriple riscv64-linux-gnu -mattr=+v,+f -S 2>%t | FileCheck --check-prefix=FIXED %s
3+
; RUN: opt < %s -passes=loop-vectorize -scalable-vectorization=off -mtriple riscv64-linux-gnu -mattr=+v,+f -S 2>%t | FileCheck --check-prefix=FIXED %s
44

55
; Tests specific to div/rem handling - both predicated and not
66

llvm/test/Transforms/LoopVectorize/RISCV/force-vect-msg.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; REQUIRES: asserts
2-
; RUN: opt < %s -passes=loop-vectorize -mtriple riscv64 -riscv-v-vector-bits-min=128 -mattr="+v" -debug-only=loop-vectorize --disable-output -S 2>&1 | FileCheck %s
2+
; RUN: opt < %s -passes=loop-vectorize -mtriple riscv64 -mattr="+v" -debug-only=loop-vectorize --disable-output -S 2>&1 | FileCheck %s
33

44
; CHECK: LV: Loop hints: force=enabled
55
; CHECK: LV: Scalar loop costs: 4.

llvm/test/Transforms/LoopVectorize/RISCV/low-trip-count.ll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt -passes=loop-vectorize -riscv-v-vector-bits-min=128 -scalable-vectorization=on -force-target-instruction-cost=1 -S < %s | FileCheck %s
3-
4-
target triple = "riscv64"
2+
; RUN: opt -passes=loop-vectorize -mtriple=riscv64 -mattr=+v -S < %s | FileCheck %s
53

64
define void @trip1_i8(ptr noalias nocapture noundef %dst, ptr noalias nocapture noundef readonly %src) #0 {
75
; CHECK-LABEL: @trip1_i8(

llvm/test/Transforms/LoopVectorize/RISCV/masked_gather_scatter.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt < %s -passes=loop-vectorize -mtriple=riscv32 -mattr=+v,+d -riscv-v-vector-bits-min=256 -S | FileCheck %s -check-prefixes=RV32
3-
; RUN: opt < %s -passes=loop-vectorize -mtriple=riscv64 -mattr=+v,+d -riscv-v-vector-bits-min=256 -S | FileCheck %s -check-prefixes=RV64
2+
; RUN: opt < %s -passes=loop-vectorize -mtriple=riscv32 -mattr=+v,+zvl256b,+d -S | FileCheck %s -check-prefixes=RV32
3+
; RUN: opt < %s -passes=loop-vectorize -mtriple=riscv64 -mattr=+v,+zvl256b,+d -S | FileCheck %s -check-prefixes=RV64
44

55
; The source code:
66
;

llvm/test/Transforms/LoopVectorize/RISCV/reg-usage.ll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
; REQUIRES: asserts
22
; RUN: opt -passes=loop-vectorize -mtriple riscv64-linux-gnu \
33
; RUN: -mattr=+v,+d -debug-only=loop-vectorize,vplan --disable-output \
4-
; RUN: -riscv-v-vector-bits-min=128 -force-vector-width=1 \
4+
; RUN: -force-vector-width=1 \
55
; RUN: -S < %s 2>&1 | FileCheck %s --check-prefix=CHECK-SCALAR
66
; RUN: opt -passes=loop-vectorize -mtriple riscv64-linux-gnu \
77
; RUN: -mattr=+v,+d -debug-only=loop-vectorize,vplan --disable-output \
8-
; RUN: -riscv-v-vector-bits-min=128 -riscv-v-register-bit-width-lmul=1 \
8+
; RUN: -riscv-v-register-bit-width-lmul=1 \
99
; RUN: -S < %s 2>&1 | FileCheck %s --check-prefix=CHECK-LMUL1
1010
; RUN: opt -passes=loop-vectorize -mtriple riscv64-linux-gnu \
1111
; RUN: -mattr=+v,+d -debug-only=loop-vectorize,vplan --disable-output \
12-
; RUN: -riscv-v-vector-bits-min=128 -riscv-v-register-bit-width-lmul=2 \
12+
; RUN: -riscv-v-register-bit-width-lmul=2 \
1313
; RUN: -S < %s 2>&1 | FileCheck %s --check-prefix=CHECK-LMUL2
1414
; RUN: opt -passes=loop-vectorize -mtriple riscv64-linux-gnu \
1515
; RUN: -mattr=+v,+d -debug-only=loop-vectorize,vplan --disable-output \
16-
; RUN: -riscv-v-vector-bits-min=128 -riscv-v-register-bit-width-lmul=4 \
16+
; RUN: -riscv-v-register-bit-width-lmul=4 \
1717
; RUN: -S < %s 2>&1 | FileCheck %s --check-prefix=CHECK-LMUL4
1818
; RUN: opt -passes=loop-vectorize -mtriple riscv64-linux-gnu \
1919
; RUN: -mattr=+v,+d -debug-only=loop-vectorize,vplan --disable-output \
20-
; RUN: -riscv-v-vector-bits-min=128 -riscv-v-register-bit-width-lmul=8 \
20+
; RUN: -riscv-v-register-bit-width-lmul=8 \
2121
; RUN: -S < %s 2>&1 | FileCheck %s --check-prefix=CHECK-LMUL8
2222

2323
define void @add(ptr noalias nocapture readonly %src1, ptr noalias nocapture readonly %src2, i32 signext %size, ptr noalias nocapture writeonly %result) {

llvm/test/Transforms/LoopVectorize/RISCV/riscv-interleaved.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; REQUIRES: asserts
22
; RUN: opt -passes=loop-vectorize,dce,instcombine -mtriple riscv64-linux-gnu \
33
; RUN: -mattr=+v -debug-only=loop-vectorize --disable-output \
4-
; RUN: -riscv-v-vector-bits-min=128 -scalable-vectorization=off -S < %s 2>&1 | FileCheck %s
4+
; RUN: -scalable-vectorization=off -S < %s 2>&1 | FileCheck %s
55

66
; CHECK-LABEL: foo
77
; CHECK: LV: IC is 2

llvm/test/Transforms/LoopVectorize/RISCV/riscv-unroll.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt < %s -passes=loop-vectorize -force-target-max-vector-interleave=1 -mtriple=riscv64 -mattr=+v -riscv-v-vector-bits-min=128 -scalable-vectorization=off -S | FileCheck %s --check-prefix=LMUL1
3-
; RUN: opt < %s -passes=loop-vectorize -force-target-max-vector-interleave=1 -mtriple=riscv32 -mattr=+v -riscv-v-vector-bits-min=128 -scalable-vectorization=off -S | FileCheck %s --check-prefix=LMUL1
4-
; RUN: opt < %s -passes=loop-vectorize -force-target-max-vector-interleave=1 -mtriple=riscv64 -mattr=+v -riscv-v-vector-bits-min=128 -scalable-vectorization=off -riscv-v-register-bit-width-lmul=2 -S | FileCheck %s --check-prefix=LMUL2
5-
; RUN: opt < %s -passes=loop-vectorize -force-target-max-vector-interleave=1 -mtriple=riscv32 -mattr=+v -riscv-v-vector-bits-min=128 -scalable-vectorization=off -riscv-v-register-bit-width-lmul=2 -S | FileCheck %s --check-prefix=LMUL2
2+
; RUN: opt < %s -passes=loop-vectorize -force-target-max-vector-interleave=1 -mtriple=riscv64 -mattr=+v -scalable-vectorization=off -S | FileCheck %s --check-prefix=LMUL1
3+
; RUN: opt < %s -passes=loop-vectorize -force-target-max-vector-interleave=1 -mtriple=riscv32 -mattr=+v -scalable-vectorization=off -S | FileCheck %s --check-prefix=LMUL1
4+
; RUN: opt < %s -passes=loop-vectorize -force-target-max-vector-interleave=1 -mtriple=riscv64 -mattr=+v -scalable-vectorization=off -riscv-v-register-bit-width-lmul=2 -S | FileCheck %s --check-prefix=LMUL2
5+
; RUN: opt < %s -passes=loop-vectorize -force-target-max-vector-interleave=1 -mtriple=riscv32 -mattr=+v -scalable-vectorization=off -riscv-v-register-bit-width-lmul=2 -S | FileCheck %s --check-prefix=LMUL2
66

77
; Function Attrs: nounwind
88
define ptr @array_add(ptr noalias nocapture readonly %a, ptr noalias nocapture readonly %b, ptr %c, i32 %size) {

llvm/test/Transforms/LoopVectorize/RISCV/riscv-vector-reverse-output.ll

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@
55
;; for (int i = N-1; i >= 0; --i)
66
;; a[i] = b[i] + 1.0;
77

8-
; RUN: opt -passes=loop-vectorize -mtriple=riscv64 -mattr=+v \
9-
; RUN: -riscv-v-vector-bits-min=128 -S < %s \
8+
; RUN: opt -passes=loop-vectorize -mtriple=riscv64 -mattr=+v -S < %s \
109
; RUN: | FileCheck --check-prefix=RV64 %s
1110

12-
; RUN: opt -passes=loop-vectorize -mtriple=riscv32 -mattr=+v \
13-
; RUN: -riscv-v-vector-bits-min=128 -S < %s \
11+
; RUN: opt -passes=loop-vectorize -mtriple=riscv32 -mattr=+v -S < %s \
1412
; RUN: | FileCheck --check-prefix=RV32 %s
1513

16-
; RUN: opt -passes=loop-vectorize -mtriple=riscv64 -mattr=+v \
17-
; RUN: -riscv-v-vector-bits-min=128 -force-vector-interleave=2 -S < %s \
14+
; RUN: opt -passes=loop-vectorize -mtriple=riscv64 -mattr=+v -force-vector-interleave=2 -S < %s \
1815
; RUN: | FileCheck --check-prefix=RV64-UF2 %s
1916

2017
define void @vector_reverse_i32(ptr noalias %A, ptr noalias %B) {

llvm/test/Transforms/LoopVectorize/RISCV/riscv-vector-reverse.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
; REQUIRES: asserts
99
; RUN: opt -passes=loop-vectorize,dce,instcombine -mtriple riscv64-linux-gnu \
1010
; RUN: -mattr=+v -debug-only=loop-vectorize,vplan -scalable-vectorization=on \
11-
; RUN: -riscv-v-vector-bits-min=128 -disable-output < %s 2>&1 | FileCheck %s
11+
; RUN: -disable-output < %s 2>&1 | FileCheck %s
1212

1313
define void @vector_reverse_i64(ptr nocapture noundef writeonly %A, ptr nocapture noundef readonly %B, i32 noundef signext %n) {
1414
; CHECK-LABEL: 'vector_reverse_i64'

llvm/test/Transforms/LoopVectorize/RISCV/safe-dep-distance.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt < %s -passes=loop-vectorize -scalable-vectorization=on -riscv-v-vector-bits-min=-1 -mtriple riscv64-linux-gnu -mattr=+v,+f -S 2>%t | FileCheck %s
2+
; RUN: opt < %s -passes=loop-vectorize -scalable-vectorization=on -mtriple riscv64-linux-gnu -mattr=+v,+f -S 2>%t | FileCheck %s
33

44
target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n64-S128"
55
target triple = "riscv64"

0 commit comments

Comments
 (0)