1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64 %s -o - | FileCheck %s
4 @x = common dso_local global i128 0
5 @y = common dso_local global i128 0
10 ; CHECK-NEXT: adrp x8, x
11 ; CHECK-NEXT: add x8, x8, :lo12:x
12 ; CHECK-NEXT: adrp x10, y
13 ; CHECK-NEXT: add x10, x10, :lo12:y
14 ; CHECK-NEXT: ldp x8, x9, [x8]
15 ; CHECK-NEXT: stp x8, x9, [x10]
17 %tmp = load volatile i128, ptr @x
18 store volatile i128 %tmp, ptr @y
22 define void @test2() {
25 ; CHECK-NEXT: adrp x8, x
26 ; CHECK-NEXT: add x8, x8, :lo12:x
27 ; CHECK-NEXT: adrp x10, y
28 ; CHECK-NEXT: add x10, x10, :lo12:y
29 ; CHECK-NEXT: ldp x8, x9, [x8, #504]
30 ; CHECK-NEXT: stp x8, x9, [x10, #504]
32 %tmp = load volatile i128, ptr getelementptr (i8, ptr @x, i64 504)
33 store volatile i128 %tmp, ptr getelementptr (i8, ptr @y, i64 504)
37 define void @test3() {
40 ; CHECK-NEXT: adrp x8, x
41 ; CHECK-NEXT: add x8, x8, :lo12:x
42 ; CHECK-NEXT: adrp x10, y
43 ; CHECK-NEXT: add x10, x10, :lo12:y
44 ; CHECK-NEXT: add x8, x8, #512
45 ; CHECK-NEXT: ldp x8, x9, [x8]
46 ; CHECK-NEXT: add x10, x10, #512
47 ; CHECK-NEXT: stp x8, x9, [x10]
49 %tmp = load volatile i128, ptr getelementptr (i8, ptr @x, i64 512)
50 store volatile i128 %tmp, ptr getelementptr (i8, ptr @y, i64 512)
54 define void @test4() {
57 ; CHECK-NEXT: adrp x8, x
58 ; CHECK-NEXT: add x8, x8, :lo12:x
59 ; CHECK-NEXT: adrp x10, y
60 ; CHECK-NEXT: add x10, x10, :lo12:y
61 ; CHECK-NEXT: ldp x8, x9, [x8, #-512]
62 ; CHECK-NEXT: stp x8, x9, [x10, #-512]
64 %tmp = load volatile i128, ptr getelementptr (i8, ptr @x, i64 -512)
65 store volatile i128 %tmp, ptr getelementptr (i8, ptr @y, i64 -512)
69 define void @test5() {
72 ; CHECK-NEXT: adrp x8, x
73 ; CHECK-NEXT: add x8, x8, :lo12:x
74 ; CHECK-NEXT: adrp x10, y
75 ; CHECK-NEXT: add x10, x10, :lo12:y
76 ; CHECK-NEXT: sub x8, x8, #520
77 ; CHECK-NEXT: ldp x8, x9, [x8]
78 ; CHECK-NEXT: sub x10, x10, #520
79 ; CHECK-NEXT: stp x8, x9, [x10]
81 %tmp = load volatile i128, ptr getelementptr (i8, ptr @x, i64 -520)
82 store volatile i128 %tmp, ptr getelementptr (i8, ptr @y, i64 -520)
86 define void @test6() {
89 ; CHECK-NEXT: adrp x8, x
90 ; CHECK-NEXT: add x8, x8, :lo12:x
91 ; CHECK-NEXT: adrp x10, y
92 ; CHECK-NEXT: add x10, x10, :lo12:y
93 ; CHECK-NEXT: sub x8, x8, #520
94 ; CHECK-NEXT: ldp x8, x9, [x8]
95 ; CHECK-NEXT: sub x10, x10, #520
96 ; CHECK-NEXT: stp x8, x9, [x10]
98 %tmp = load volatile i128, ptr getelementptr (i8, ptr @x, i64 -520)
99 store volatile i128 %tmp, ptr getelementptr (i8, ptr @y, i64 -520)
103 define void @test7() {
104 ; CHECK-LABEL: test7:
106 ; CHECK-NEXT: adrp x8, x
107 ; CHECK-NEXT: add x8, x8, :lo12:x
108 ; CHECK-NEXT: adrp x10, y
109 ; CHECK-NEXT: add x10, x10, :lo12:y
110 ; CHECK-NEXT: add x8, x8, #503
111 ; CHECK-NEXT: ldp x8, x9, [x8]
112 ; CHECK-NEXT: add x10, x10, #503
113 ; CHECK-NEXT: stp x8, x9, [x10]
115 %tmp = load volatile i128, ptr getelementptr (i8, ptr @x, i64 503)
116 store volatile i128 %tmp, ptr getelementptr (i8, ptr @y, i64 503)