Skip to content

Commit d6d559c

Browse files
committed
[RISCV] Add zvfhmin to zipeven/zipodd shuffle tests per review suggestion
1 parent b3f01a6 commit d6d559c

File tree

1 file changed

+11
-25
lines changed

1 file changed

+11
-25
lines changed

llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-zipeven-zipodd.ll

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2-
; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV32
3-
; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV64
2+
; RUN: llc -mtriple=riscv32 -mattr=+v,+zvfhmin -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV32
3+
; RUN: llc -mtriple=riscv64 -mattr=+v,+zvfhmin -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV64
44

55
define <4 x i32> @zipeven_v4i32(<4 x i32> %a, <4 x i32> %b) {
66
; CHECK-LABEL: zipeven_v4i32:
@@ -41,29 +41,12 @@ entry:
4141
}
4242

4343
define <4 x half> @zipeven_v4f16(<4 x half> %a, <4 x half> %b) {
44-
; RV32-LABEL: zipeven_v4f16:
45-
; RV32: # %bb.0: # %entry
46-
; RV32-NEXT: lh a3, 0(a1)
47-
; RV32-NEXT: lh a4, 0(a2)
48-
; RV32-NEXT: lh a1, 8(a1)
49-
; RV32-NEXT: lh a2, 8(a2)
50-
; RV32-NEXT: sh a3, 0(a0)
51-
; RV32-NEXT: sh a4, 2(a0)
52-
; RV32-NEXT: sh a1, 4(a0)
53-
; RV32-NEXT: sh a2, 6(a0)
54-
; RV32-NEXT: ret
55-
;
56-
; RV64-LABEL: zipeven_v4f16:
57-
; RV64: # %bb.0: # %entry
58-
; RV64-NEXT: lh a3, 0(a1)
59-
; RV64-NEXT: lh a4, 0(a2)
60-
; RV64-NEXT: lh a1, 16(a1)
61-
; RV64-NEXT: lh a2, 16(a2)
62-
; RV64-NEXT: sh a3, 0(a0)
63-
; RV64-NEXT: sh a4, 2(a0)
64-
; RV64-NEXT: sh a1, 4(a0)
65-
; RV64-NEXT: sh a2, 6(a0)
66-
; RV64-NEXT: ret
44+
; CHECK-LABEL: zipeven_v4f16:
45+
; CHECK: # %bb.0: # %entry
46+
; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu
47+
; CHECK-NEXT: vmv.v.i v0, 10
48+
; CHECK-NEXT: vslideup.vi v8, v9, 1, v0.t
49+
; CHECK-NEXT: ret
6750
entry:
6851
%c = shufflevector <4 x half> %a, <4 x half> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
6952
ret <4 x half> %c
@@ -247,3 +230,6 @@ define <16 x i64> @zipodd_v16i64(<16 x i64> %v1, <16 x i64> %v2) {
247230
%out = shufflevector <16 x i64> %v1, <16 x i64> %v2, <16 x i32> <i32 1, i32 17, i32 3, i32 19, i32 5, i32 21, i32 7, i32 23, i32 9, i32 25, i32 11, i32 27, i32 13, i32 29, i32 15, i32 31>
248231
ret <16 x i64> %out
249232
}
233+
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
234+
; RV32: {{.*}}
235+
; RV64: {{.*}}

0 commit comments

Comments
 (0)