1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -mtriple=aarch64 < %s | FileCheck %s
define void @imm9(ptr %object) {
; CHECK-LABEL: imm9:
; CHECK: // %bb.0:
; CHECK-NEXT: prfum pldl1keep, [x0, #7]
; CHECK-NEXT: ret
%incdec.ptr = getelementptr inbounds i8, ptr %object, i64 7
call void @llvm.prefetch.p0(ptr %incdec.ptr, i32 0, i32 3, i32 1)
ret void
}
define void @imm9_max(ptr %object) {
; CHECK-LABEL: imm9_max:
; CHECK: // %bb.0:
; CHECK-NEXT: prfum pldl1keep, [x0, #255]
; CHECK-NEXT: ret
%incdec.ptr = getelementptr inbounds i8, ptr %object, i64 255
call void @llvm.prefetch.p0(ptr %incdec.ptr, i32 0, i32 3, i32 1)
ret void
}
define void @imm9_above_max(ptr %object) {
; CHECK-LABEL: imm9_above_max:
; CHECK: // %bb.0:
; CHECK-NEXT: add x8, x0, #257
; CHECK-NEXT: prfm pldl1keep, [x8]
; CHECK-NEXT: ret
%incdec.ptr = getelementptr inbounds i8, ptr %object, i64 257 ; 256 would use the imm12 mode
call void @llvm.prefetch.p0(ptr %incdec.ptr, i32 0, i32 3, i32 1)
ret void
}
define void @imm9_min(ptr %object) {
; CHECK-LABEL: imm9_min:
; CHECK: // %bb.0:
; CHECK-NEXT: prfum pldl1keep, [x0, #-256]
; CHECK-NEXT: ret
%incdec.ptr = getelementptr inbounds i8, ptr %object, i64 -256
call void @llvm.prefetch.p0(ptr %incdec.ptr, i32 0, i32 3, i32 1)
ret void
}
define void @imm9_below_min(ptr %object) {
; CHECK-LABEL: imm9_below_min:
; CHECK: // %bb.0:
; CHECK-NEXT: sub x8, x0, #257
; CHECK-NEXT: prfm pldl1keep, [x8]
; CHECK-NEXT: ret
%incdec.ptr = getelementptr inbounds i8, ptr %object, i64 -257
call void @llvm.prefetch.p0(ptr %incdec.ptr, i32 0, i32 3, i32 1)
ret void
}
define void @imm12(ptr %object) {
; CHECK-LABEL: imm12:
; CHECK: // %bb.0:
; CHECK-NEXT: prfm pldl1keep, [x0, #8]
; CHECK-NEXT: ret
%incdec.ptr = getelementptr inbounds i64, ptr %object, i64 1
call void @llvm.prefetch.p0(ptr %incdec.ptr, i32 0, i32 3, i32 1)
ret void
}
define void @imm12_max(ptr %object) {
; CHECK-LABEL: imm12_max:
; CHECK: // %bb.0:
; CHECK-NEXT: prfm pldl1keep, [x0, #32760]
; CHECK-NEXT: ret
%incdec.ptr = getelementptr inbounds i64, ptr %object, i64 4095
call void @llvm.prefetch.p0(ptr %incdec.ptr, i32 0, i32 3, i32 1)
ret void
}
define void @imm12_above_max(ptr %object) {
; CHECK-LABEL: imm12_above_max:
; CHECK: // %bb.0:
; CHECK-NEXT: mov w8, #32768 // =0x8000
; CHECK-NEXT: prfm pldl1keep, [x0, x8]
; CHECK-NEXT: ret
%incdec.ptr = getelementptr inbounds i64, ptr %object, i64 4096
call void @llvm.prefetch.p0(ptr %incdec.ptr, i32 0, i32 3, i32 1)
ret void
}
define void @reg(ptr %object, i64 %a) {
; CHECK-LABEL: reg:
; CHECK: // %bb.0:
; CHECK-NEXT: prfm pldl1keep, [x0, x1]
; CHECK-NEXT: ret
%incdec.ptr = getelementptr inbounds i8, ptr %object, i64 %a
call void @llvm.prefetch.p0(ptr %incdec.ptr, i32 0, i32 3, i32 1)
ret void
}
define void @reg_shift(ptr %object, i64 %a) {
; CHECK-LABEL: reg_shift:
; CHECK: // %bb.0:
; CHECK-NEXT: prfm pldl1keep, [x0, x1, lsl #3]
; CHECK-NEXT: ret
%incdec.ptr = getelementptr inbounds i64, ptr %object, i64 %a
call void @llvm.prefetch.p0(ptr %incdec.ptr, i32 0, i32 3, i32 1)
ret void
}
define void @reg_sext(ptr %object, i32 %a) {
; CHECK-LABEL: reg_sext:
; CHECK: // %bb.0:
; CHECK-NEXT: prfm pldl1keep, [x0, w1, sxtw]
; CHECK-NEXT: ret
%incdec.ptr = getelementptr inbounds i8, ptr %object, i32 %a
call void @llvm.prefetch.p0(ptr %incdec.ptr, i32 0, i32 3, i32 1)
ret void
}
define void @reg_sext_shift(ptr %object, i32 %a) {
; CHECK-LABEL: reg_sext_shift:
; CHECK: // %bb.0:
; CHECK-NEXT: prfm pldl1keep, [x0, w1, sxtw #3]
; CHECK-NEXT: ret
%incdec.ptr = getelementptr inbounds i64, ptr %object, i32 %a
call void @llvm.prefetch.p0(ptr %incdec.ptr, i32 0, i32 3, i32 1)
ret void
}
define void @reg_zext(ptr %object, i32 %a) {
; CHECK-LABEL: reg_zext:
; CHECK: // %bb.0:
; CHECK-NEXT: prfm pldl1keep, [x0, w1, uxtw]
; CHECK-NEXT: ret
%a.zext = zext i32 %a to i64
%incdec.ptr = getelementptr inbounds i8, ptr %object, i64 %a.zext
call void @llvm.prefetch.p0(ptr %incdec.ptr, i32 0, i32 3, i32 1)
ret void
}
define void @reg_zext_shift(ptr %object, i32 %a) {
; CHECK-LABEL: reg_zext_shift:
; CHECK: // %bb.0:
; CHECK-NEXT: prfm pldl1keep, [x0, w1, uxtw #3]
; CHECK-NEXT: ret
%a.zext = zext i32 %a to i64
%incdec.ptr = getelementptr inbounds i64, ptr %object, i64 %a.zext
call void @llvm.prefetch.p0(ptr %incdec.ptr, i32 0, i32 3, i32 1)
ret void
}
|