[mips][mips16] MIPS16 is not a CPU/Architecture but is an ASE.
[oota-llvm.git] / test / CodeGen / Mips / hf16_1.ll
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
3
4
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
11
12 define void @foo() nounwind {
13 entry:
14   %0 = load float, float* @x, align 4
15   call void @v_sf(float %0)
16   %1 = load double, double* @xd, align 8
17   call void @v_df(double %1)
18   %2 = load float, float* @x, align 4
19   %3 = load float, float* @y, align 4
20   call void @v_sf_sf(float %2, float %3)
21   %4 = load double, double* @xd, align 8
22   %5 = load float, float* @x, align 4
23   call void @v_df_sf(double %4, float %5)
24   %6 = load double, double* @xd, align 8
25   %7 = load double, double* @yd, align 8
26   call void @v_df_df(double %6, double %7)
27   %call = call float @sf_v()
28   %8 = load float, float* @x, align 4
29   %call1 = call float @sf_sf(float %8)
30   %9 = load double, double* @xd, align 8
31   %call2 = call float @sf_df(double %9)
32   %10 = load float, float* @x, align 4
33   %11 = load float, float* @y, align 4
34   %call3 = call float @sf_sf_sf(float %10, float %11)
35   %12 = load double, double* @xd, align 8
36   %13 = load float, float* @x, align 4
37   %call4 = call float @sf_df_sf(double %12, float %13)
38   %14 = load double, double* @xd, align 8
39   %15 = load double, double* @yd, align 8
40   %call5 = call float @sf_df_df(double %14, double %15)
41   %call6 = call double @df_v()
42   %16 = load float, float* @x, align 4
43   %call7 = call double @df_sf(float %16)
44   %17 = load double, double* @xd, align 8
45   %call8 = call double @df_df(double %17)
46   %18 = load float, float* @x, align 4
47   %19 = load float, float* @y, align 4
48   %call9 = call double @df_sf_sf(float %18, float %19)
49   %20 = load double, double* @xd, align 8
50   %21 = load float, float* @x, align 4
51   %call10 = call double @df_df_sf(double %20, float %21)
52   %22 = load double, double* @xd, align 8
53   %23 = load double, double* @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, float* @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, double* @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, float* @x, align 4
67   %33 = load float, float* @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, double* @xd, align 8
72   %37 = load float, float* @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, double* @xd, align 8
77   %41 = load double, double* @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, float* @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, double* @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, float* @x, align 4
93   %53 = load float, float* @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, double* @xd, align 8
98   %57 = load float, float* @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, double* @xd, align 8
103   %61 = load double, double* @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
107   ret void
108 }
109
110 declare void @v_sf(float)
111
112 declare void @v_df(double)
113
114 declare void @v_sf_sf(float, float)
115
116 declare void @v_df_sf(double, float)
117
118 declare void @v_df_df(double, double)
119
120 declare float @sf_v()
121
122 declare float @sf_sf(float)
123
124 declare float @sf_df(double)
125
126 declare float @sf_sf_sf(float, float)
127
128 declare float @sf_df_sf(double, float)
129
130 declare float @sf_df_df(double, double)
131
132 declare double @df_v()
133
134 declare double @df_sf(float)
135
136 declare double @df_df(double)
137
138 declare double @df_sf_sf(float, float)
139
140 declare double @df_df_sf(double, float)
141
142 declare double @df_df_df(double, double)
143
144 declare { float, float } @sc_v()
145
146 declare { float, float } @sc_sf(float)
147
148 declare { float, float } @sc_df(double)
149
150 declare { float, float } @sc_sf_sf(float, float)
151
152 declare { float, float } @sc_df_sf(double, float)
153
154 declare { float, float } @sc_df_df(double, double)
155
156 declare { double, double } @dc_v()
157
158 declare { double, double } @dc_sf(float)
159
160 declare { double, double } @dc_df(double)
161
162 declare { double, double } @dc_sf_sf(float, float)
163
164 declare { double, double } @dc_df_sf(double, float)
165
166 declare { double, double } @dc_df_df(double, double)
167
168 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_1)(${{[0-9]+}})
169 ; 2:    lw      ${{[0-9]+}}, %call16(v_sf)(${{[0-9]+}})
170
171 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_2)(${{[0-9]+}})
172 ; 2:    lw      ${{[0-9]+}}, %call16(v_df)(${{[0-9]+}})
173
174 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_5)(${{[0-9]+}})
175 ; 2:    lw      ${{[0-9]+}}, %call16(v_sf_sf)(${{[0-9]+}})
176
177 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_6)(${{[0-9]+}})
178 ; 2:    lw      ${{[0-9]+}}, %call16(v_df_sf)(${{[0-9]+}})
179
180 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_10)(${{[0-9]+}})
181 ; 2:    lw      ${{[0-9]+}}, %call16(v_df_df)(${{[0-9]+}})
182
183 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_sf_0)(${{[0-9]+}})
184 ; 2:    lw      ${{[0-9]+}}, %call16(sf_v)(${{[0-9]+}})
185
186 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_sf_1)(${{[0-9]+}})
187 ; 2:    lw      ${{[0-9]+}}, %call16(sf_sf)(${{[0-9]+}})
188
189 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_sf_2)(${{[0-9]+}})
190 ; 2:    lw      ${{[0-9]+}}, %call16(sf_df)(${{[0-9]+}})
191
192 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_sf_5)(${{[0-9]+}})
193 ; 2:    lw      ${{[0-9]+}}, %call16(sf_sf_sf)(${{[0-9]+}})
194
195 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_sf_6)(${{[0-9]+}})
196 ; 2:    lw      ${{[0-9]+}}, %call16(sf_df_sf)(${{[0-9]+}})
197
198 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_sf_10)(${{[0-9]+}})
199 ; 2:    lw      ${{[0-9]+}}, %call16(sf_df_df)(${{[0-9]+}})
200
201 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_df_0)(${{[0-9]+}})
202 ; 2:    lw      ${{[0-9]+}}, %call16(df_v)(${{[0-9]+}})
203
204 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_df_1)(${{[0-9]+}})
205 ; 2:    lw      ${{[0-9]+}}, %call16(df_sf)(${{[0-9]+}})
206
207 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_df_2)(${{[0-9]+}})
208 ; 2:    lw      ${{[0-9]+}}, %call16(df_df)(${{[0-9]+}})
209
210 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_df_5)(${{[0-9]+}})
211 ; 2:    lw      ${{[0-9]+}}, %call16(df_sf_sf)(${{[0-9]+}})
212
213 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_df_6)(${{[0-9]+}})
214 ; 2:    lw      ${{[0-9]+}}, %call16(df_df_sf)(${{[0-9]+}})
215
216 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_df_10)(${{[0-9]+}})
217 ; 2:    lw      ${{[0-9]+}}, %call16(df_df_df)(${{[0-9]+}})
218
219 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_sc_0)(${{[0-9]+}})
220 ; 2:    lw      ${{[0-9]+}}, %call16(sc_v)(${{[0-9]+}})
221
222 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_sc_1)(${{[0-9]+}})
223 ; 2:    lw      ${{[0-9]+}}, %call16(sc_sf)(${{[0-9]+}})
224
225 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_sc_2)(${{[0-9]+}})
226 ; 2:    lw      ${{[0-9]+}}, %call16(sc_df)(${{[0-9]+}})
227
228 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_sc_5)(${{[0-9]+}})
229 ; 2:    lw      ${{[0-9]+}}, %call16(sc_sf_sf)(${{[0-9]+}})
230
231 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_sc_6)(${{[0-9]+}})
232 ; 2:    lw      ${{[0-9]+}}, %call16(sc_df_sf)(${{[0-9]+}})
233
234 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_sc_10)(${{[0-9]+}})
235 ; 2:    lw      ${{[0-9]+}}, %call16(sc_df_df)(${{[0-9]+}})
236
237 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_dc_0)(${{[0-9]+}})
238 ; 2:    lw      ${{[0-9]+}}, %call16(dc_v)(${{[0-9]+}})
239
240 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_dc_1)(${{[0-9]+}})
241 ; 2:    lw      ${{[0-9]+}}, %call16(dc_sf)(${{[0-9]+}})
242
243 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_dc_2)(${{[0-9]+}})
244 ; 2:    lw      ${{[0-9]+}}, %call16(dc_df)(${{[0-9]+}})
245
246 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_dc_5)(${{[0-9]+}})
247 ; 2:    lw      ${{[0-9]+}}, %call16(dc_sf_sf)(${{[0-9]+}})
248
249 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_dc_6)(${{[0-9]+}})
250 ; 2:    lw      ${{[0-9]+}}, %call16(dc_df_sf)(${{[0-9]+}})
251
252 ; 1:    lw      ${{[0-9]+}}, %got(__mips16_call_stub_dc_10)(${{[0-9]+}})
253 ; 2:    lw      ${{[0-9]+}}, %call16(dc_df_df)(${{[0-9]+}})
254
255
256