1 ; RUN: llc -march=mipsel -mattr=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=1
2 ; RUN: llc -march=mipsel -mattr=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=2
5 @x = common global float 0.000000e+00, align 4
6 @xd = common global double 0.000000e+00, align 8
7 @y = common global float 0.000000e+00, align 4
8 @yd = common global double 0.000000e+00, align 8
9 @xy = common global { float, float } zeroinitializer, align 4
10 @xyd = common global { double, double } zeroinitializer, align 8
12 define void @foo() nounwind {
14 %0 = load float, ptr @x, align 4
15 call void @v_sf(float %0)
16 %1 = load double, ptr @xd, align 8
17 call void @v_df(double %1)
18 %2 = load float, ptr @x, align 4
19 %3 = load float, ptr @y, align 4
20 call void @v_sf_sf(float %2, float %3)
21 %4 = load double, ptr @xd, align 8
22 %5 = load float, ptr @x, align 4
23 call void @v_df_sf(double %4, float %5)
24 %6 = load double, ptr @xd, align 8
25 %7 = load double, ptr @yd, align 8
26 call void @v_df_df(double %6, double %7)
27 %call = call float @sf_v()
28 %8 = load float, ptr @x, align 4
29 %call1 = call float @sf_sf(float %8)
30 %9 = load double, ptr @xd, align 8
31 %call2 = call float @sf_df(double %9)
32 %10 = load float, ptr @x, align 4
33 %11 = load float, ptr @y, align 4
34 %call3 = call float @sf_sf_sf(float %10, float %11)
35 %12 = load double, ptr @xd, align 8
36 %13 = load float, ptr @x, align 4
37 %call4 = call float @sf_df_sf(double %12, float %13)
38 %14 = load double, ptr @xd, align 8
39 %15 = load double, ptr @yd, align 8
40 %call5 = call float @sf_df_df(double %14, double %15)
41 %call6 = call double @df_v()
42 %16 = load float, ptr @x, align 4
43 %call7 = call double @df_sf(float %16)
44 %17 = load double, ptr @xd, align 8
45 %call8 = call double @df_df(double %17)
46 %18 = load float, ptr @x, align 4
47 %19 = load float, ptr @y, align 4
48 %call9 = call double @df_sf_sf(float %18, float %19)
49 %20 = load double, ptr @xd, align 8
50 %21 = load float, ptr @x, align 4
51 %call10 = call double @df_df_sf(double %20, float %21)
52 %22 = load double, ptr @xd, align 8
53 %23 = load double, ptr @yd, align 8
54 %call11 = call double @df_df_df(double %22, double %23)
55 %call12 = call { float, float } @sc_v()
56 %24 = extractvalue { float, float } %call12, 0
57 %25 = extractvalue { float, float } %call12, 1
58 %26 = load float, ptr @x, align 4
59 %call13 = call { float, float } @sc_sf(float %26)
60 %27 = extractvalue { float, float } %call13, 0
61 %28 = extractvalue { float, float } %call13, 1
62 %29 = load double, ptr @xd, align 8
63 %call14 = call { float, float } @sc_df(double %29)
64 %30 = extractvalue { float, float } %call14, 0
65 %31 = extractvalue { float, float } %call14, 1
66 %32 = load float, ptr @x, align 4
67 %33 = load float, ptr @y, align 4
68 %call15 = call { float, float } @sc_sf_sf(float %32, float %33)
69 %34 = extractvalue { float, float } %call15, 0
70 %35 = extractvalue { float, float } %call15, 1
71 %36 = load double, ptr @xd, align 8
72 %37 = load float, ptr @x, align 4
73 %call16 = call { float, float } @sc_df_sf(double %36, float %37)
74 %38 = extractvalue { float, float } %call16, 0
75 %39 = extractvalue { float, float } %call16, 1
76 %40 = load double, ptr @xd, align 8
77 %41 = load double, ptr @yd, align 8
78 %call17 = call { float, float } @sc_df_df(double %40, double %41)
79 %42 = extractvalue { float, float } %call17, 0
80 %43 = extractvalue { float, float } %call17, 1
81 %call18 = call { double, double } @dc_v()
82 %44 = extractvalue { double, double } %call18, 0
83 %45 = extractvalue { double, double } %call18, 1
84 %46 = load float, ptr @x, align 4
85 %call19 = call { double, double } @dc_sf(float %46)
86 %47 = extractvalue { double, double } %call19, 0
87 %48 = extractvalue { double, double } %call19, 1
88 %49 = load double, ptr @xd, align 8
89 %call20 = call { double, double } @dc_df(double %49)
90 %50 = extractvalue { double, double } %call20, 0
91 %51 = extractvalue { double, double } %call20, 1
92 %52 = load float, ptr @x, align 4
93 %53 = load float, ptr @y, align 4
94 %call21 = call { double, double } @dc_sf_sf(float %52, float %53)
95 %54 = extractvalue { double, double } %call21, 0
96 %55 = extractvalue { double, double } %call21, 1
97 %56 = load double, ptr @xd, align 8
98 %57 = load float, ptr @x, align 4
99 %call22 = call { double, double } @dc_df_sf(double %56, float %57)
100 %58 = extractvalue { double, double } %call22, 0
101 %59 = extractvalue { double, double } %call22, 1
102 %60 = load double, ptr @xd, align 8
103 %61 = load double, ptr @yd, align 8
104 %call23 = call { double, double } @dc_df_df(double %60, double %61)
105 %62 = extractvalue { double, double } %call23, 0
106 %63 = extractvalue { double, double } %call23, 1
110 declare void @v_sf(float)
112 declare void @v_df(double)
114 declare void @v_sf_sf(float, float)
116 declare void @v_df_sf(double, float)
118 declare void @v_df_df(double, double)
120 declare float @sf_v()
122 declare float @sf_sf(float)
124 declare float @sf_df(double)
126 declare float @sf_sf_sf(float, float)
128 declare float @sf_df_sf(double, float)
130 declare float @sf_df_df(double, double)
132 declare double @df_v()
134 declare double @df_sf(float)
136 declare double @df_df(double)
138 declare double @df_sf_sf(float, float)
140 declare double @df_df_sf(double, float)
142 declare double @df_df_df(double, double)
144 declare { float, float } @sc_v()
146 declare { float, float } @sc_sf(float)
148 declare { float, float } @sc_df(double)
150 declare { float, float } @sc_sf_sf(float, float)
152 declare { float, float } @sc_df_sf(double, float)
154 declare { float, float } @sc_df_df(double, double)
156 declare { double, double } @dc_v()
158 declare { double, double } @dc_sf(float)
160 declare { double, double } @dc_df(double)
162 declare { double, double } @dc_sf_sf(float, float)
164 declare { double, double } @dc_df_sf(double, float)
166 declare { double, double } @dc_df_df(double, double)
168 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_1)(${{[0-9]+}})
169 ; 2: lw ${{[0-9]+}}, %call16(v_sf)(${{[0-9]+}})
171 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_2)(${{[0-9]+}})
172 ; 2: lw ${{[0-9]+}}, %call16(v_df)(${{[0-9]+}})
174 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_5)(${{[0-9]+}})
175 ; 2: lw ${{[0-9]+}}, %call16(v_sf_sf)(${{[0-9]+}})
177 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_6)(${{[0-9]+}})
178 ; 2: lw ${{[0-9]+}}, %call16(v_df_sf)(${{[0-9]+}})
180 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_10)(${{[0-9]+}})
181 ; 2: lw ${{[0-9]+}}, %call16(v_df_df)(${{[0-9]+}})
183 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_sf_0)(${{[0-9]+}})
184 ; 2: lw ${{[0-9]+}}, %call16(sf_v)(${{[0-9]+}})
186 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_sf_1)(${{[0-9]+}})
187 ; 2: lw ${{[0-9]+}}, %call16(sf_sf)(${{[0-9]+}})
189 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_sf_2)(${{[0-9]+}})
190 ; 2: lw ${{[0-9]+}}, %call16(sf_df)(${{[0-9]+}})
192 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_sf_5)(${{[0-9]+}})
193 ; 2: lw ${{[0-9]+}}, %call16(sf_sf_sf)(${{[0-9]+}})
195 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_sf_6)(${{[0-9]+}})
196 ; 2: lw ${{[0-9]+}}, %call16(sf_df_sf)(${{[0-9]+}})
198 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_sf_10)(${{[0-9]+}})
199 ; 2: lw ${{[0-9]+}}, %call16(sf_df_df)(${{[0-9]+}})
201 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_df_0)(${{[0-9]+}})
202 ; 2: lw ${{[0-9]+}}, %call16(df_v)(${{[0-9]+}})
204 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_df_1)(${{[0-9]+}})
205 ; 2: lw ${{[0-9]+}}, %call16(df_sf)(${{[0-9]+}})
207 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_df_2)(${{[0-9]+}})
208 ; 2: lw ${{[0-9]+}}, %call16(df_df)(${{[0-9]+}})
210 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_df_5)(${{[0-9]+}})
211 ; 2: lw ${{[0-9]+}}, %call16(df_sf_sf)(${{[0-9]+}})
213 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_df_6)(${{[0-9]+}})
214 ; 2: lw ${{[0-9]+}}, %call16(df_df_sf)(${{[0-9]+}})
216 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_df_10)(${{[0-9]+}})
217 ; 2: lw ${{[0-9]+}}, %call16(df_df_df)(${{[0-9]+}})
219 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_sc_0)(${{[0-9]+}})
220 ; 2: lw ${{[0-9]+}}, %call16(sc_v)(${{[0-9]+}})
222 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_sc_1)(${{[0-9]+}})
223 ; 2: lw ${{[0-9]+}}, %call16(sc_sf)(${{[0-9]+}})
225 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_sc_2)(${{[0-9]+}})
226 ; 2: lw ${{[0-9]+}}, %call16(sc_df)(${{[0-9]+}})
228 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_sc_5)(${{[0-9]+}})
229 ; 2: lw ${{[0-9]+}}, %call16(sc_sf_sf)(${{[0-9]+}})
231 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_sc_6)(${{[0-9]+}})
232 ; 2: lw ${{[0-9]+}}, %call16(sc_df_sf)(${{[0-9]+}})
234 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_sc_10)(${{[0-9]+}})
235 ; 2: lw ${{[0-9]+}}, %call16(sc_df_df)(${{[0-9]+}})
237 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_dc_0)(${{[0-9]+}})
238 ; 2: lw ${{[0-9]+}}, %call16(dc_v)(${{[0-9]+}})
240 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_dc_1)(${{[0-9]+}})
241 ; 2: lw ${{[0-9]+}}, %call16(dc_sf)(${{[0-9]+}})
243 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_dc_2)(${{[0-9]+}})
244 ; 2: lw ${{[0-9]+}}, %call16(dc_df)(${{[0-9]+}})
246 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_dc_5)(${{[0-9]+}})
247 ; 2: lw ${{[0-9]+}}, %call16(dc_sf_sf)(${{[0-9]+}})
249 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_dc_6)(${{[0-9]+}})
250 ; 2: lw ${{[0-9]+}}, %call16(dc_df_sf)(${{[0-9]+}})
252 ; 1: lw ${{[0-9]+}}, %got(__mips16_call_stub_dc_10)(${{[0-9]+}})
253 ; 2: lw ${{[0-9]+}}, %call16(dc_df_df)(${{[0-9]+}})