1 ; RUN: llc < %s -mtriple=ve -mattr=+vpu | FileCheck %s
3 ;;; Test prefetch vector intrinsic instructions
6 ;;; We test PFCHVrrl, PFCHVirl, PFCHVNCrrl, and PFCHVNCirl instructions.
8 ; Function Attrs: nounwind
9 define void @pfchv_vssl(ptr %0, i64 %1) {
10 ; CHECK-LABEL: pfchv_vssl:
12 ; CHECK-NEXT: lea %s2, 256
14 ; CHECK-NEXT: pfchv %s1, %s0
15 ; CHECK-NEXT: b.l.t (, %s10)
16 tail call void @llvm.ve.vl.pfchv.ssl(i64 %1, ptr %0, i32 256)
20 ; Function Attrs: inaccessiblemem_or_argmemonly nounwind
21 declare void @llvm.ve.vl.pfchv.ssl(i64, ptr, i32)
23 ; Function Attrs: nounwind
24 define void @pfchv_vssl_imm(ptr %0) {
25 ; CHECK-LABEL: pfchv_vssl_imm:
27 ; CHECK-NEXT: lea %s1, 256
29 ; CHECK-NEXT: pfchv 8, %s0
30 ; CHECK-NEXT: b.l.t (, %s10)
31 tail call void @llvm.ve.vl.pfchv.ssl(i64 8, ptr %0, i32 256)
35 ; Function Attrs: nounwind
36 define void @pfchvnc_vssl(ptr %0, i64 %1) {
37 ; CHECK-LABEL: pfchvnc_vssl:
39 ; CHECK-NEXT: lea %s2, 256
41 ; CHECK-NEXT: pfchv.nc %s1, %s0
42 ; CHECK-NEXT: b.l.t (, %s10)
43 tail call void @llvm.ve.vl.pfchvnc.ssl(i64 %1, ptr %0, i32 256)
47 ; Function Attrs: inaccessiblemem_or_argmemonly nounwind
48 declare void @llvm.ve.vl.pfchvnc.ssl(i64, ptr, i32)
50 ; Function Attrs: nounwind
51 define void @pfchvnc_vssl_imm(ptr %0) {
52 ; CHECK-LABEL: pfchvnc_vssl_imm:
54 ; CHECK-NEXT: lea %s1, 256
56 ; CHECK-NEXT: pfchv.nc 8, %s0
57 ; CHECK-NEXT: b.l.t (, %s10)
58 tail call void @llvm.ve.vl.pfchvnc.ssl(i64 8, ptr %0, i32 256)