1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+m,+v < %s | FileCheck %s
3 ; RUN: llc -mtriple=riscv64 -mattr=+m,+v < %s | FileCheck %s
5 declare <4 x i16> @llvm.vp.zext.v4i16.v4i1(<4 x i1>, <4 x i1>, i32)
7 define <4 x i16> @vzext_v4i16_v4i1(<4 x i1> %va, <4 x i1> %m, i32 zeroext %evl) {
8 ; CHECK-LABEL: vzext_v4i16_v4i1:
10 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
11 ; CHECK-NEXT: vmv.v.i v8, 0
12 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
14 %v = call <4 x i16> @llvm.vp.zext.v4i16.v4i1(<4 x i1> %va, <4 x i1> %m, i32 %evl)
18 define <4 x i16> @vzext_v4i16_v4i1_unmasked(<4 x i1> %va, i32 zeroext %evl) {
19 ; CHECK-LABEL: vzext_v4i16_v4i1_unmasked:
21 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
22 ; CHECK-NEXT: vmv.v.i v8, 0
23 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
25 %v = call <4 x i16> @llvm.vp.zext.v4i16.v4i1(<4 x i1> %va, <4 x i1> splat (i1 true), i32 %evl)
29 declare <4 x i32> @llvm.vp.zext.v4i32.v4i1(<4 x i1>, <4 x i1>, i32)
31 define <4 x i32> @vzext_v4i32_v4i1(<4 x i1> %va, <4 x i1> %m, i32 zeroext %evl) {
32 ; CHECK-LABEL: vzext_v4i32_v4i1:
34 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
35 ; CHECK-NEXT: vmv.v.i v8, 0
36 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
38 %v = call <4 x i32> @llvm.vp.zext.v4i32.v4i1(<4 x i1> %va, <4 x i1> %m, i32 %evl)
42 define <4 x i32> @vzext_v4i32_v4i1_unmasked(<4 x i1> %va, i32 zeroext %evl) {
43 ; CHECK-LABEL: vzext_v4i32_v4i1_unmasked:
45 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
46 ; CHECK-NEXT: vmv.v.i v8, 0
47 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
49 %v = call <4 x i32> @llvm.vp.zext.v4i32.v4i1(<4 x i1> %va, <4 x i1> splat (i1 true), i32 %evl)
53 declare <4 x i64> @llvm.vp.zext.v4i64.v4i1(<4 x i1>, <4 x i1>, i32)
55 define <4 x i64> @vzext_v4i64_v4i1(<4 x i1> %va, <4 x i1> %m, i32 zeroext %evl) {
56 ; CHECK-LABEL: vzext_v4i64_v4i1:
58 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
59 ; CHECK-NEXT: vmv.v.i v8, 0
60 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
62 %v = call <4 x i64> @llvm.vp.zext.v4i64.v4i1(<4 x i1> %va, <4 x i1> %m, i32 %evl)
66 define <4 x i64> @vzext_v4i64_v4i1_unmasked(<4 x i1> %va, i32 zeroext %evl) {
67 ; CHECK-LABEL: vzext_v4i64_v4i1_unmasked:
69 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
70 ; CHECK-NEXT: vmv.v.i v8, 0
71 ; CHECK-NEXT: vmerge.vim v8, v8, 1, v0
73 %v = call <4 x i64> @llvm.vp.zext.v4i64.v4i1(<4 x i1> %va, <4 x i1> splat (i1 true), i32 %evl)