1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv64 -mattr=+m,+v < %s | FileCheck %s
4 declare <4 x ptr> @llvm.vp.inttoptr.v4p0.v4i32(<4 x i32>, <4 x i1>, i32)
6 define <4 x ptr> @inttoptr_v4p0_v4i32(<4 x i32> %va, <4 x i1> %m, i32 zeroext %evl) {
7 ; CHECK-LABEL: inttoptr_v4p0_v4i32:
9 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
10 ; CHECK-NEXT: vzext.vf2 v10, v8, v0.t
11 ; CHECK-NEXT: vmv.v.v v8, v10
13 %v = call <4 x ptr> @llvm.vp.inttoptr.v4p0.v4i32(<4 x i32> %va, <4 x i1> %m, i32 %evl)
17 declare <4 x ptr> @llvm.vp.inttoptr.v4p0.v4i64(<4 x i64>, <4 x i1>, i32)
19 define <4 x ptr> @inttoptr_v4p0_v4i64(<4 x i64> %va, <4 x i1> %m, i32 zeroext %evl) {
20 ; CHECK-LABEL: inttoptr_v4p0_v4i64:
23 %v = call <4 x ptr> @llvm.vp.inttoptr.v4p0.v4i64(<4 x i64> %va, <4 x i1> %m, i32 %evl)
27 declare <4 x i32> @llvm.vp.ptrtoint.v4i32.v4p0(<4 x ptr>, <4 x i1>, i32)
29 define <4 x i32> @ptrtoint_v4i32_v4p0(<4 x ptr> %va, <4 x i1> %m, i32 zeroext %evl) {
30 ; CHECK-LABEL: ptrtoint_v4i32_v4p0:
32 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
33 ; CHECK-NEXT: vnsrl.wi v10, v8, 0, v0.t
34 ; CHECK-NEXT: vmv.v.v v8, v10
36 %v = call <4 x i32> @llvm.vp.ptrtoint.v4i32.v4p0(<4 x ptr> %va, <4 x i1> %m, i32 %evl)
40 declare <4 x i64> @llvm.vp.ptrtoint.v4i64.v4p0(<4 x ptr>, <4 x i1>, i32)
42 define <4 x i64> @ptrtoint_v4i64_v4p0(<4 x ptr> %va, <4 x i1> %m, i32 zeroext %evl) {
43 ; CHECK-LABEL: ptrtoint_v4i64_v4p0:
46 %v = call <4 x i64> @llvm.vp.ptrtoint.v4i64.v4p0(<4 x ptr> %va, <4 x i1> %m, i32 %evl)