1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64 -mattr=+ls64 -verify-machineinstrs -o - %s | FileCheck %s
4 %struct.foo = type { [8 x i64] }
6 define void @load(ptr %output, ptr %addr) {
8 ; CHECK: // %bb.0: // %entry
10 ; CHECK-NEXT: ld64b x2, [x1]
11 ; CHECK-NEXT: //NO_APP
12 ; CHECK-NEXT: stp x8, x9, [x0, #48]
13 ; CHECK-NEXT: stp x6, x7, [x0, #32]
14 ; CHECK-NEXT: stp x4, x5, [x0, #16]
15 ; CHECK-NEXT: stp x2, x3, [x0]
18 %val = call i512 asm sideeffect "ld64b $0,[$1]", "=r,r,~{memory}"(ptr %addr)
19 store i512 %val, ptr %output, align 8
23 define void @store(ptr %input, ptr %addr) {
25 ; CHECK: // %bb.0: // %entry
26 ; CHECK-NEXT: ldp x8, x9, [x0, #48]
27 ; CHECK-NEXT: ldp x6, x7, [x0, #32]
28 ; CHECK-NEXT: ldp x4, x5, [x0, #16]
29 ; CHECK-NEXT: ldp x2, x3, [x0]
31 ; CHECK-NEXT: st64b x2, [x1]
32 ; CHECK-NEXT: //NO_APP
35 %val = load i512, ptr %input, align 8
36 call void asm sideeffect "st64b $0,[$1]", "r,r,~{memory}"(i512 %val, ptr %addr)
40 define void @store2(ptr %in, ptr %addr) {
41 ; CHECK-LABEL: store2:
42 ; CHECK: // %bb.0: // %entry
43 ; CHECK-NEXT: sub sp, sp, #64
44 ; CHECK-NEXT: .cfi_def_cfa_offset 64
45 ; CHECK-NEXT: ldpsw x2, x3, [x0]
46 ; CHECK-NEXT: ldrsw x4, [x0, #16]
47 ; CHECK-NEXT: ldrsw x5, [x0, #64]
48 ; CHECK-NEXT: ldrsw x6, [x0, #100]
49 ; CHECK-NEXT: ldrsw x7, [x0, #144]
50 ; CHECK-NEXT: ldrsw x8, [x0, #196]
51 ; CHECK-NEXT: ldrsw x9, [x0, #256]
53 ; CHECK-NEXT: st64b x2, [x1]
54 ; CHECK-NEXT: //NO_APP
55 ; CHECK-NEXT: add sp, sp, #64
58 %0 = load i32, ptr %in, align 4
59 %conv = sext i32 %0 to i64
60 %arrayidx1 = getelementptr inbounds i32, ptr %in, i64 1
61 %1 = load i32, ptr %arrayidx1, align 4
62 %conv2 = sext i32 %1 to i64
63 %arrayidx4 = getelementptr inbounds i32, ptr %in, i64 4
64 %2 = load i32, ptr %arrayidx4, align 4
65 %conv5 = sext i32 %2 to i64
66 %arrayidx7 = getelementptr inbounds i32, ptr %in, i64 16
67 %3 = load i32, ptr %arrayidx7, align 4
68 %conv8 = sext i32 %3 to i64
69 %arrayidx10 = getelementptr inbounds i32, ptr %in, i64 25
70 %4 = load i32, ptr %arrayidx10, align 4
71 %conv11 = sext i32 %4 to i64
72 %arrayidx13 = getelementptr inbounds i32, ptr %in, i64 36
73 %5 = load i32, ptr %arrayidx13, align 4
74 %conv14 = sext i32 %5 to i64
75 %arrayidx16 = getelementptr inbounds i32, ptr %in, i64 49
76 %6 = load i32, ptr %arrayidx16, align 4
77 %conv17 = sext i32 %6 to i64
78 %arrayidx19 = getelementptr inbounds i32, ptr %in, i64 64
79 %7 = load i32, ptr %arrayidx19, align 4
80 %conv20 = sext i32 %7 to i64
81 %s.sroa.10.0.insert.ext = zext i64 %conv20 to i512
82 %s.sroa.10.0.insert.shift = shl nuw i512 %s.sroa.10.0.insert.ext, 448
83 %s.sroa.9.0.insert.ext = zext i64 %conv17 to i512
84 %s.sroa.9.0.insert.shift = shl nuw nsw i512 %s.sroa.9.0.insert.ext, 384
85 %s.sroa.9.0.insert.insert = or i512 %s.sroa.10.0.insert.shift, %s.sroa.9.0.insert.shift
86 %s.sroa.8.0.insert.ext = zext i64 %conv14 to i512
87 %s.sroa.8.0.insert.shift = shl nuw nsw i512 %s.sroa.8.0.insert.ext, 320
88 %s.sroa.8.0.insert.insert = or i512 %s.sroa.9.0.insert.insert, %s.sroa.8.0.insert.shift
89 %s.sroa.7.0.insert.ext = zext i64 %conv11 to i512
90 %s.sroa.7.0.insert.shift = shl nuw nsw i512 %s.sroa.7.0.insert.ext, 256
91 %s.sroa.7.0.insert.insert = or i512 %s.sroa.8.0.insert.insert, %s.sroa.7.0.insert.shift
92 %s.sroa.6.0.insert.ext = zext i64 %conv8 to i512
93 %s.sroa.6.0.insert.shift = shl nuw nsw i512 %s.sroa.6.0.insert.ext, 192
94 %s.sroa.6.0.insert.insert = or i512 %s.sroa.7.0.insert.insert, %s.sroa.6.0.insert.shift
95 %s.sroa.5.0.insert.ext = zext i64 %conv5 to i512
96 %s.sroa.5.0.insert.shift = shl nuw nsw i512 %s.sroa.5.0.insert.ext, 128
97 %s.sroa.4.0.insert.ext = zext i64 %conv2 to i512
98 %s.sroa.4.0.insert.shift = shl nuw nsw i512 %s.sroa.4.0.insert.ext, 64
99 %s.sroa.4.0.insert.mask = or i512 %s.sroa.6.0.insert.insert, %s.sroa.5.0.insert.shift
100 %s.sroa.0.0.insert.ext = zext i64 %conv to i512
101 %s.sroa.0.0.insert.mask = or i512 %s.sroa.4.0.insert.mask, %s.sroa.4.0.insert.shift
102 %s.sroa.0.0.insert.insert = or i512 %s.sroa.0.0.insert.mask, %s.sroa.0.0.insert.ext
103 call void asm sideeffect "st64b $0,[$1]", "r,r,~{memory}"(i512 %s.sroa.0.0.insert.insert, ptr %addr)