11; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2- ; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v \
2+ ; RUN: llc -mtriple=riscv32 -mattr=+v \
33; RUN: -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK
4- ; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v \
4+ ; RUN: llc -mtriple=riscv64 -mattr=+v \
55; RUN: -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK
66
7- define target ("riscv.vector.tuple" , <vscale x 16 x i8 >, 2 ) @test_tuple_zero0 () {
8- ; CHECK-LABEL: test_tuple_zero0 :
7+ define target ("riscv.vector.tuple" , <vscale x 16 x i8 >, 2 ) @test_tuple_zero_power_of_2 () {
8+ ; CHECK-LABEL: test_tuple_zero_power_of_2 :
99; CHECK: # %bb.0: # %entry
1010; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
1111; CHECK-NEXT: vmv.v.i v8, 0
@@ -15,8 +15,20 @@ entry:
1515 ret target ("riscv.vector.tuple" , <vscale x 16 x i8 >, 2 ) zeroinitializer
1616}
1717
18- define target ("riscv.vector.tuple" , <vscale x 16 x i8 >, 2 ) @test_tuple_zero1 (<vscale x 4 x i32 > %a ) {
19- ; CHECK-LABEL: test_tuple_zero1:
18+ define target ("riscv.vector.tuple" , <vscale x 16 x i8 >, 3 ) @test_tuple_zero_non_power_of_2 () {
19+ ; CHECK-LABEL: test_tuple_zero_non_power_of_2:
20+ ; CHECK: # %bb.0: # %entry
21+ ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
22+ ; CHECK-NEXT: vmv.v.i v8, 0
23+ ; CHECK-NEXT: vmv.v.i v10, 0
24+ ; CHECK-NEXT: vmv.v.i v12, 0
25+ ; CHECK-NEXT: ret
26+ entry:
27+ ret target ("riscv.vector.tuple" , <vscale x 16 x i8 >, 3 ) zeroinitializer
28+ }
29+
30+ define target ("riscv.vector.tuple" , <vscale x 16 x i8 >, 2 ) @test_tuple_zero_insert1 (<vscale x 4 x i32 > %a ) {
31+ ; CHECK-LABEL: test_tuple_zero_insert1:
2032; CHECK: # %bb.0: # %entry
2133; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
2234; CHECK-NEXT: vmv.v.i v10, 0
2638 ret target ("riscv.vector.tuple" , <vscale x 16 x i8 >, 2 ) %1
2739}
2840
29- define target ("riscv.vector.tuple" , <vscale x 16 x i8 >, 2 ) @test_tuple_zero2 (<vscale x 4 x i32 > %a ) {
30- ; CHECK-LABEL: test_tuple_zero2 :
41+ define target ("riscv.vector.tuple" , <vscale x 16 x i8 >, 2 ) @test_tuple_zero_insert2 (<vscale x 4 x i32 > %a ) {
42+ ; CHECK-LABEL: test_tuple_zero_insert2 :
3143; CHECK: # %bb.0: # %entry
3244; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
3345; CHECK-NEXT: vmv.v.i v6, 0
0 commit comments