1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64 %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-LE
3 ; RUN: llc -mtriple=aarch64_be %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-BE
5 @x = common dso_local global i128 0
6 @y = common dso_local global i128 0
11 ; CHECK-NEXT: adrp x8, x
12 ; CHECK-NEXT: add x8, x8, :lo12:x
13 ; CHECK-NEXT: adrp x10, y
14 ; CHECK-NEXT: add x10, x10, :lo12:y
15 ; CHECK-NEXT: ldp x8, x9, [x8]
16 ; CHECK-NEXT: stp x8, x9, [x10]
18 %tmp = load volatile i128, ptr @x
19 store volatile i128 %tmp, ptr @y
23 define void @test2() {
26 ; CHECK-NEXT: adrp x8, x
27 ; CHECK-NEXT: add x8, x8, :lo12:x
28 ; CHECK-NEXT: adrp x10, y
29 ; CHECK-NEXT: add x10, x10, :lo12:y
30 ; CHECK-NEXT: ldp x8, x9, [x8, #504]
31 ; CHECK-NEXT: stp x8, x9, [x10, #504]
33 %tmp = load volatile i128, ptr getelementptr (i8, ptr @x, i64 504)
34 store volatile i128 %tmp, ptr getelementptr (i8, ptr @y, i64 504)
38 define void @test3() {
41 ; CHECK-NEXT: adrp x8, x
42 ; CHECK-NEXT: add x8, x8, :lo12:x
43 ; CHECK-NEXT: adrp x10, y
44 ; CHECK-NEXT: add x10, x10, :lo12:y
45 ; CHECK-NEXT: add x8, x8, #512
46 ; CHECK-NEXT: ldp x8, x9, [x8]
47 ; CHECK-NEXT: add x10, x10, #512
48 ; CHECK-NEXT: stp x8, x9, [x10]
50 %tmp = load volatile i128, ptr getelementptr (i8, ptr @x, i64 512)
51 store volatile i128 %tmp, ptr getelementptr (i8, ptr @y, i64 512)
55 define void @test4() {
58 ; CHECK-NEXT: adrp x8, x
59 ; CHECK-NEXT: add x8, x8, :lo12:x
60 ; CHECK-NEXT: adrp x10, y
61 ; CHECK-NEXT: add x10, x10, :lo12:y
62 ; CHECK-NEXT: ldp x8, x9, [x8, #-512]
63 ; CHECK-NEXT: stp x8, x9, [x10, #-512]
65 %tmp = load volatile i128, ptr getelementptr (i8, ptr @x, i64 -512)
66 store volatile i128 %tmp, ptr getelementptr (i8, ptr @y, i64 -512)
70 define void @test5() {
73 ; CHECK-NEXT: adrp x8, x
74 ; CHECK-NEXT: add x8, x8, :lo12:x
75 ; CHECK-NEXT: adrp x10, y
76 ; CHECK-NEXT: add x10, x10, :lo12:y
77 ; CHECK-NEXT: sub x8, x8, #520
78 ; CHECK-NEXT: ldp x8, x9, [x8]
79 ; CHECK-NEXT: sub x10, x10, #520
80 ; CHECK-NEXT: stp x8, x9, [x10]
82 %tmp = load volatile i128, ptr getelementptr (i8, ptr @x, i64 -520)
83 store volatile i128 %tmp, ptr getelementptr (i8, ptr @y, i64 -520)
87 define void @test6() {
90 ; CHECK-NEXT: adrp x8, x
91 ; CHECK-NEXT: add x8, x8, :lo12:x
92 ; CHECK-NEXT: adrp x10, y
93 ; CHECK-NEXT: add x10, x10, :lo12:y
94 ; CHECK-NEXT: sub x8, x8, #520
95 ; CHECK-NEXT: ldp x8, x9, [x8]
96 ; CHECK-NEXT: sub x10, x10, #520
97 ; CHECK-NEXT: stp x8, x9, [x10]
99 %tmp = load volatile i128, ptr getelementptr (i8, ptr @x, i64 -520)
100 store volatile i128 %tmp, ptr getelementptr (i8, ptr @y, i64 -520)
104 define void @test7() {
105 ; CHECK-LABEL: test7:
107 ; CHECK-NEXT: adrp x8, x
108 ; CHECK-NEXT: add x8, x8, :lo12:x
109 ; CHECK-NEXT: adrp x10, y
110 ; CHECK-NEXT: add x10, x10, :lo12:y
111 ; CHECK-NEXT: add x8, x8, #503
112 ; CHECK-NEXT: ldp x8, x9, [x8]
113 ; CHECK-NEXT: add x10, x10, #503
114 ; CHECK-NEXT: stp x8, x9, [x10]
116 %tmp = load volatile i128, ptr getelementptr (i8, ptr @x, i64 503)
117 store volatile i128 %tmp, ptr getelementptr (i8, ptr @y, i64 503)
121 define i128 @load_nonvol(i32, i32, ptr %p) {
122 ; CHECK-LABEL: load_nonvol:
123 ; CHECK: // %bb.0: // %entry
124 ; CHECK-NEXT: ldp x0, x1, [x2]
127 %l = load i128, ptr %p, align 16
131 define i128 @load_vol(i32, i32, ptr %p) {
132 ; CHECK-LABEL: load_vol:
133 ; CHECK: // %bb.0: // %entry
134 ; CHECK-NEXT: ldp x0, x1, [x2]
137 %l = load volatile i128, ptr %p, align 16
141 define void @store_nonvol(i128 %a, ptr %p) {
142 ; CHECK-LABEL: store_nonvol:
143 ; CHECK: // %bb.0: // %entry
144 ; CHECK-NEXT: stp x0, x1, [x2]
147 store i128 %a, ptr %p, align 16
151 define void @loadstore_vol(i128 %a, ptr %p) {
152 ; CHECK-LABEL: loadstore_vol:
153 ; CHECK: // %bb.0: // %entry
154 ; CHECK-NEXT: stp x0, x1, [x2]
157 store volatile i128 %a, ptr %p, align 16
160 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: