1 ; RUN: llc < %s -mtriple=ve-unknown-unknown | FileCheck %s
3 @vi8 = common dso_local local_unnamed_addr global i8 0, align 8
4 @vi16 = common dso_local local_unnamed_addr global i16 0, align 8
5 @vi32 = common dso_local local_unnamed_addr global i32 0, align 8
6 @vi64 = common dso_local local_unnamed_addr global i64 0, align 8
7 @vf32 = common dso_local local_unnamed_addr global float 0.000000e+00, align 8
8 @vf64 = common dso_local local_unnamed_addr global double 0.000000e+00, align 8
10 ; Function Attrs: norecurse nounwind readonly
11 define void @storef64stk(double %0) {
12 ; CHECK-LABEL: storef64stk:
13 ; CHECK: .LBB{{[0-9]+}}_2:
14 ; CHECK-NEXT: st %s0, 8(, %s11)
15 ; CHECK-NEXT: adds.l %s11, 16, %s11
16 ; CHECK-NEXT: b.l.t (, %s10)
17 %addr = alloca double, align 8
18 store double %0, ptr %addr, align 8
22 ; Function Attrs: norecurse nounwind readonly
23 define void @storef32stk(float %0) {
24 ; CHECK-LABEL: storef32stk:
25 ; CHECK: .LBB{{[0-9]+}}_2:
26 ; CHECK-NEXT: stu %s0, 8(, %s11)
27 ; CHECK-NEXT: adds.l %s11, 16, %s11
28 ; CHECK-NEXT: b.l.t (, %s10)
29 %addr = alloca float, align 8
30 store float %0, ptr %addr, align 8
34 ; Function Attrs: norecurse nounwind readonly
35 define void @storei64stk(i64 %0) {
36 ; CHECK-LABEL: storei64stk:
37 ; CHECK: .LBB{{[0-9]+}}_2:
38 ; CHECK-NEXT: st %s0, 8(, %s11)
39 ; CHECK-NEXT: adds.l %s11, 16, %s11
40 ; CHECK-NEXT: b.l.t (, %s10)
41 %addr = alloca i64, align 8
42 store i64 %0, ptr %addr, align 8
46 ; Function Attrs: norecurse nounwind readonly
47 define void @storei32stk(i32 %0) {
48 ; CHECK-LABEL: storei32stk:
49 ; CHECK: .LBB{{[0-9]+}}_2:
50 ; CHECK-NEXT: stl %s0, 8(, %s11)
51 ; CHECK-NEXT: adds.l %s11, 16, %s11
52 ; CHECK-NEXT: b.l.t (, %s10)
53 %addr = alloca i32, align 8
54 store i32 %0, ptr %addr, align 8
58 ; Function Attrs: norecurse nounwind readonly
59 define void @storei16stk(i16 %0) {
60 ; CHECK-LABEL: storei16stk:
61 ; CHECK: .LBB{{[0-9]+}}_2:
62 ; CHECK-NEXT: st2b %s0, 8(, %s11)
63 ; CHECK-NEXT: adds.l %s11, 16, %s11
64 ; CHECK-NEXT: b.l.t (, %s10)
65 %addr = alloca i16, align 8
66 store i16 %0, ptr %addr, align 8
70 ; Function Attrs: norecurse nounwind readonly
71 define void @storei8stk(i8 %0) {
72 ; CHECK-LABEL: storei8stk:
73 ; CHECK: .LBB{{[0-9]+}}_2:
74 ; CHECK-NEXT: st1b %s0, 8(, %s11)
75 ; CHECK-NEXT: adds.l %s11, 16, %s11
76 ; CHECK-NEXT: b.l.t (, %s10)
77 %addr = alloca i8, align 8
78 store i8 %0, ptr %addr, align 8
82 ; Function Attrs: norecurse nounwind readonly
83 define void @storef64com(double %0) {
84 ; CHECK-LABEL: storef64com:
86 ; CHECK-NEXT: lea %s1, vf64@lo
87 ; CHECK-NEXT: and %s1, %s1, (32)0
88 ; CHECK-NEXT: lea.sl %s1, vf64@hi(, %s1)
89 ; CHECK-NEXT: st %s0, (, %s1)
90 ; CHECK-NEXT: b.l.t (, %s10)
91 store double %0, ptr @vf64, align 8
95 ; Function Attrs: norecurse nounwind readonly
96 define void @storef32com(float %0) {
97 ; CHECK-LABEL: storef32com:
99 ; CHECK-NEXT: lea %s1, vf32@lo
100 ; CHECK-NEXT: and %s1, %s1, (32)0
101 ; CHECK-NEXT: lea.sl %s1, vf32@hi(, %s1)
102 ; CHECK-NEXT: stu %s0, (, %s1)
103 ; CHECK-NEXT: b.l.t (, %s10)
104 store float %0, ptr @vf32, align 8
108 ; Function Attrs: norecurse nounwind readonly
109 define void @storei64com(i64 %0) {
110 ; CHECK-LABEL: storei64com:
112 ; CHECK-NEXT: lea %s1, vi64@lo
113 ; CHECK-NEXT: and %s1, %s1, (32)0
114 ; CHECK-NEXT: lea.sl %s1, vi64@hi(, %s1)
115 ; CHECK-NEXT: st %s0, (, %s1)
116 ; CHECK-NEXT: b.l.t (, %s10)
117 store i64 %0, ptr @vi64, align 8
121 ; Function Attrs: norecurse nounwind readonly
122 define void @storei32com(i32 %0) {
123 ; CHECK-LABEL: storei32com:
125 ; CHECK-NEXT: lea %s1, vi32@lo
126 ; CHECK-NEXT: and %s1, %s1, (32)0
127 ; CHECK-NEXT: lea.sl %s1, vi32@hi(, %s1)
128 ; CHECK-NEXT: stl %s0, (, %s1)
129 ; CHECK-NEXT: b.l.t (, %s10)
130 store i32 %0, ptr @vi32, align 8
134 ; Function Attrs: norecurse nounwind readonly
135 define void @storei16com(i16 %0) {
136 ; CHECK-LABEL: storei16com:
138 ; CHECK-NEXT: lea %s1, vi16@lo
139 ; CHECK-NEXT: and %s1, %s1, (32)0
140 ; CHECK-NEXT: lea.sl %s1, vi16@hi(, %s1)
141 ; CHECK-NEXT: st2b %s0, (, %s1)
142 ; CHECK-NEXT: b.l.t (, %s10)
143 store i16 %0, ptr @vi16, align 8
147 ; Function Attrs: norecurse nounwind readonly
148 define void @storei8com(i8 %0) {
149 ; CHECK-LABEL: storei8com:
151 ; CHECK-NEXT: lea %s1, vi8@lo
152 ; CHECK-NEXT: and %s1, %s1, (32)0
153 ; CHECK-NEXT: lea.sl %s1, vi8@hi(, %s1)
154 ; CHECK-NEXT: st1b %s0, (, %s1)
155 ; CHECK-NEXT: b.l.t (, %s10)
156 store i8 %0, ptr @vi8, align 8