1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -mtriple=aarch64-- -mcpu=falkor -O0 -aarch64-enable-atomic-cfg-tidy=0 -stop-after=irtranslator -global-isel -verify-machineinstrs %s -o - | FileCheck %s
4 define i32 @load_invariant(i32* %ptr) {
5 ; CHECK-LABEL: name: load_invariant
6 ; CHECK: bb.1 (%ir-block.0):
8 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
9 ; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (invariant load (s32) from %ir.ptr)
10 ; CHECK: $w0 = COPY [[LOAD]](s32)
11 ; CHECK: RET_ReallyLR implicit $w0
12 %load = load i32, i32* %ptr, align 4, !invariant.load !0
16 define i32 @load_volatile_invariant(i32* %ptr) {
17 ; CHECK-LABEL: name: load_volatile_invariant
18 ; CHECK: bb.1 (%ir-block.0):
20 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
21 ; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (volatile invariant load (s32) from %ir.ptr)
22 ; CHECK: $w0 = COPY [[LOAD]](s32)
23 ; CHECK: RET_ReallyLR implicit $w0
24 %load = load volatile i32, i32* %ptr, align 4, !invariant.load !0
28 define i32 @load_dereferenceable(i32* dereferenceable(4) %ptr) {
29 ; CHECK-LABEL: name: load_dereferenceable
30 ; CHECK: bb.1 (%ir-block.0):
32 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
33 ; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (dereferenceable load (s32) from %ir.ptr)
34 ; CHECK: $w0 = COPY [[LOAD]](s32)
35 ; CHECK: RET_ReallyLR implicit $w0
36 %load = load i32, i32* %ptr, align 4
40 define i32 @load_dereferenceable_invariant(i32* dereferenceable(4) %ptr) {
41 ; CHECK-LABEL: name: load_dereferenceable_invariant
42 ; CHECK: bb.1 (%ir-block.0):
44 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
45 ; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (dereferenceable invariant load (s32) from %ir.ptr)
46 ; CHECK: $w0 = COPY [[LOAD]](s32)
47 ; CHECK: RET_ReallyLR implicit $w0
48 %load = load i32, i32* %ptr, align 4, !invariant.load !0
52 define i32 @load_nontemporal(i32* %ptr) {
53 ; CHECK-LABEL: name: load_nontemporal
54 ; CHECK: bb.1 (%ir-block.0):
56 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
57 ; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (non-temporal load (s32) from %ir.ptr)
58 ; CHECK: $w0 = COPY [[LOAD]](s32)
59 ; CHECK: RET_ReallyLR implicit $w0
60 %load = load i32, i32* %ptr, align 4, !nontemporal !0
64 define i32 @load_falkor_strided_access(i32* %ptr) {
65 ; CHECK-LABEL: name: load_falkor_strided_access
66 ; CHECK: bb.1 (%ir-block.0):
68 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
69 ; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: ("aarch64-strided-access" load (s32) from %ir.ptr)
70 ; CHECK: $w0 = COPY [[LOAD]](s32)
71 ; CHECK: RET_ReallyLR implicit $w0
72 %load = load i32, i32* %ptr, align 4, !falkor.strided.access !0