1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple riscv64 -mattr=+64bit,+m,+d,+zve64f,+zvfh \
3 ; RUN: -target-abi=lp64d < %s | FileCheck %s --check-prefix=CHECK-NO-FELEN64
4 ; RUN: llc -mtriple riscv64 -mattr=+64bit,+m,+d,+zve64d,+zvfh \
5 ; RUN: -target-abi=lp64d < %s | FileCheck %s --check-prefix=CHECK-FELEN64
7 define void @foo(half %y, ptr %i64p) {
8 ; CHECK-NO-FELEN64-LABEL: foo:
9 ; CHECK-NO-FELEN64: # %bb.0: # %entry
10 ; CHECK-NO-FELEN64-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
11 ; CHECK-NO-FELEN64-NEXT: vle64.v v8, (a0)
12 ; CHECK-NO-FELEN64-NEXT: vfmv.s.f v9, fa0
13 ; CHECK-NO-FELEN64-NEXT: #APP
14 ; CHECK-NO-FELEN64-NEXT: # use v8 v9
15 ; CHECK-NO-FELEN64-NEXT: #NO_APP
16 ; CHECK-NO-FELEN64-NEXT: ret
18 ; CHECK-FELEN64-LABEL: foo:
19 ; CHECK-FELEN64: # %bb.0: # %entry
20 ; CHECK-FELEN64-NEXT: vsetivli zero, 1, e64, m1, ta, ma
21 ; CHECK-FELEN64-NEXT: vle64.v v8, (a0)
22 ; CHECK-FELEN64-NEXT: vfmv.s.f v9, fa0
23 ; CHECK-FELEN64-NEXT: #APP
24 ; CHECK-FELEN64-NEXT: # use v8 v9
25 ; CHECK-FELEN64-NEXT: #NO_APP
26 ; CHECK-FELEN64-NEXT: ret
28 %0 = tail call <vscale x 1 x i64> @llvm.riscv.vle.nxv1i64.i64(<vscale x 1 x i64> poison, ptr %i64p, i64 1)
29 %1 = tail call <vscale x 4 x half> @llvm.riscv.vfmv.s.f.nxv4f16.i64(<vscale x 4 x half> poison, half %y, i64 1)
30 tail call void asm sideeffect "# use $0 $1", "^vr,^vr"(<vscale x 1 x i64> %0, <vscale x 4 x half> %1)
34 declare <vscale x 1 x i64> @llvm.riscv.vle.nxv1i64.i64(<vscale x 1 x i64>, ptr nocapture, i64)
35 declare <vscale x 4 x half> @llvm.riscv.vfmv.s.f.nxv4f16.i64(<vscale x 4 x half>, half, i64)
37 define void @bar(half %y, ptr %i32p) {
38 ; CHECK-NO-FELEN64-LABEL: bar:
39 ; CHECK-NO-FELEN64: # %bb.0: # %entry
40 ; CHECK-NO-FELEN64-NEXT: vsetivli zero, 1, e32, m1, ta, ma
41 ; CHECK-NO-FELEN64-NEXT: vle32.v v8, (a0)
42 ; CHECK-NO-FELEN64-NEXT: vfmv.s.f v9, fa0
43 ; CHECK-NO-FELEN64-NEXT: #APP
44 ; CHECK-NO-FELEN64-NEXT: # use v8 v9
45 ; CHECK-NO-FELEN64-NEXT: #NO_APP
46 ; CHECK-NO-FELEN64-NEXT: ret
48 ; CHECK-FELEN64-LABEL: bar:
49 ; CHECK-FELEN64: # %bb.0: # %entry
50 ; CHECK-FELEN64-NEXT: vsetivli zero, 1, e32, m1, ta, ma
51 ; CHECK-FELEN64-NEXT: vle32.v v8, (a0)
52 ; CHECK-FELEN64-NEXT: vfmv.s.f v9, fa0
53 ; CHECK-FELEN64-NEXT: #APP
54 ; CHECK-FELEN64-NEXT: # use v8 v9
55 ; CHECK-FELEN64-NEXT: #NO_APP
56 ; CHECK-FELEN64-NEXT: ret
58 %0 = tail call <vscale x 2 x i32> @llvm.riscv.vle.nxv2i32.i64(<vscale x 2 x i32> poison, ptr %i32p, i64 1)
59 %1 = tail call <vscale x 4 x half> @llvm.riscv.vfmv.s.f.nxv4f16.i64(<vscale x 4 x half> poison, half %y, i64 1)
60 tail call void asm sideeffect "# use $0 $1", "^vr,^vr"(<vscale x 2 x i32> %0, <vscale x 4 x half> %1)
64 declare <vscale x 2 x i32> @llvm.riscv.vle.nxv2i32.i64(<vscale x 2 x i32>, ptr nocapture, i64)