Code reorganization: s/aux/auxiliary/.
[mesa.git] / src / gallium / auxiliary / llvm / gallivm_builtins.cpp
1 // Generated by llvm2cpp - DO NOT MODIFY!
2
3
4 Module* createGallivmBuiltins(Module *mod) {
5
6 mod->setModuleIdentifier("shader");
7
8 // Type Definitions
9 ArrayType* ArrayTy_0 = ArrayType::get(IntegerType::get(8), 25);
10
11 PointerType* PointerTy_1 = PointerType::get(ArrayTy_0, 0);
12
13 std::vector<const Type*>FuncTy_2_args;
14 FuncTy_2_args.push_back(Type::FloatTy);
15 FuncTy_2_args.push_back(Type::FloatTy);
16 FunctionType* FuncTy_2 = FunctionType::get(
17 /*Result=*/Type::FloatTy,
18 /*Params=*/FuncTy_2_args,
19 /*isVarArg=*/false);
20
21 PointerType* PointerTy_3 = PointerType::get(FuncTy_2, 0);
22
23 VectorType* VectorTy_4 = VectorType::get(Type::FloatTy, 4);
24
25 std::vector<const Type*>FuncTy_5_args;
26 FuncTy_5_args.push_back(VectorTy_4);
27 FunctionType* FuncTy_5 = FunctionType::get(
28 /*Result=*/VectorTy_4,
29 /*Params=*/FuncTy_5_args,
30 /*isVarArg=*/false);
31
32 std::vector<const Type*>FuncTy_6_args;
33 FuncTy_6_args.push_back(VectorTy_4);
34 FuncTy_6_args.push_back(VectorTy_4);
35 FuncTy_6_args.push_back(VectorTy_4);
36 FunctionType* FuncTy_6 = FunctionType::get(
37 /*Result=*/VectorTy_4,
38 /*Params=*/FuncTy_6_args,
39 /*isVarArg=*/false);
40
41 VectorType* VectorTy_7 = VectorType::get(IntegerType::get(32), 4);
42
43 std::vector<const Type*>FuncTy_9_args;
44 FunctionType* FuncTy_9 = FunctionType::get(
45 /*Result=*/IntegerType::get(32),
46 /*Params=*/FuncTy_9_args,
47 /*isVarArg=*/true);
48
49 PointerType* PointerTy_8 = PointerType::get(FuncTy_9, 0);
50
51 PointerType* PointerTy_10 = PointerType::get(IntegerType::get(8), 0);
52
53 std::vector<const Type*>FuncTy_12_args;
54 FuncTy_12_args.push_back(Type::FloatTy);
55 FunctionType* FuncTy_12 = FunctionType::get(
56 /*Result=*/Type::FloatTy,
57 /*Params=*/FuncTy_12_args,
58 /*isVarArg=*/false);
59
60 PointerType* PointerTy_11 = PointerType::get(FuncTy_12, 0);
61
62 std::vector<const Type*>FuncTy_13_args;
63 FuncTy_13_args.push_back(VectorTy_4);
64 FunctionType* FuncTy_13 = FunctionType::get(
65 /*Result=*/IntegerType::get(32),
66 /*Params=*/FuncTy_13_args,
67 /*isVarArg=*/false);
68
69
70 // Function Declarations
71
72 Function* func_approx = new Function(
73 /*Type=*/FuncTy_2,
74 /*Linkage=*/GlobalValue::WeakLinkage,
75 /*Name=*/"approx", mod);
76 func_approx->setCallingConv(CallingConv::C);
77 const ParamAttrsList *func_approx_PAL = 0;
78 func_approx->setParamAttrs(func_approx_PAL);
79
80 Function* func_powf = new Function(
81 /*Type=*/FuncTy_2,
82 /*Linkage=*/GlobalValue::ExternalLinkage,
83 /*Name=*/"powf", mod); // (external, no body)
84 func_powf->setCallingConv(CallingConv::C);
85 const ParamAttrsList *func_powf_PAL = 0;
86 func_powf->setParamAttrs(func_powf_PAL);
87
88 Function* func_lit = new Function(
89 /*Type=*/FuncTy_5,
90 /*Linkage=*/GlobalValue::WeakLinkage,
91 /*Name=*/"lit", mod);
92 func_lit->setCallingConv(CallingConv::C);
93 const ParamAttrsList *func_lit_PAL = 0;
94 func_lit->setParamAttrs(func_lit_PAL);
95
96 Function* func_cmp = new Function(
97 /*Type=*/FuncTy_6,
98 /*Linkage=*/GlobalValue::WeakLinkage,
99 /*Name=*/"cmp", mod);
100 func_cmp->setCallingConv(CallingConv::C);
101 const ParamAttrsList *func_cmp_PAL = 0;
102 {
103 ParamAttrsVector Attrs;
104 ParamAttrsWithIndex PAWI;
105 PAWI.index = 0; PAWI.attrs = 0 | ParamAttr::NoUnwind;
106 Attrs.push_back(PAWI);
107 func_cmp_PAL = ParamAttrsList::get(Attrs);
108
109 }
110 func_cmp->setParamAttrs(func_cmp_PAL);
111
112 Function* func_vcos = new Function(
113 /*Type=*/FuncTy_5,
114 /*Linkage=*/GlobalValue::WeakLinkage,
115 /*Name=*/"vcos", mod);
116 func_vcos->setCallingConv(CallingConv::C);
117 const ParamAttrsList *func_vcos_PAL = 0;
118 func_vcos->setParamAttrs(func_vcos_PAL);
119
120 Function* func_printf = new Function(
121 /*Type=*/FuncTy_9,
122 /*Linkage=*/GlobalValue::ExternalLinkage,
123 /*Name=*/"printf", mod); // (external, no body)
124 func_printf->setCallingConv(CallingConv::C);
125 const ParamAttrsList *func_printf_PAL = 0;
126 func_printf->setParamAttrs(func_printf_PAL);
127
128 Function* func_cosf = new Function(
129 /*Type=*/FuncTy_12,
130 /*Linkage=*/GlobalValue::ExternalLinkage,
131 /*Name=*/"cosf", mod); // (external, no body)
132 func_cosf->setCallingConv(CallingConv::C);
133 const ParamAttrsList *func_cosf_PAL = 0;
134 func_cosf->setParamAttrs(func_cosf_PAL);
135
136 Function* func_scs = new Function(
137 /*Type=*/FuncTy_5,
138 /*Linkage=*/GlobalValue::WeakLinkage,
139 /*Name=*/"scs", mod);
140 func_scs->setCallingConv(CallingConv::C);
141 const ParamAttrsList *func_scs_PAL = 0;
142 func_scs->setParamAttrs(func_scs_PAL);
143
144 Function* func_sinf = new Function(
145 /*Type=*/FuncTy_12,
146 /*Linkage=*/GlobalValue::ExternalLinkage,
147 /*Name=*/"sinf", mod); // (external, no body)
148 func_sinf->setCallingConv(CallingConv::C);
149 const ParamAttrsList *func_sinf_PAL = 0;
150 func_sinf->setParamAttrs(func_sinf_PAL);
151
152 Function* func_vsin = new Function(
153 /*Type=*/FuncTy_5,
154 /*Linkage=*/GlobalValue::WeakLinkage,
155 /*Name=*/"vsin", mod);
156 func_vsin->setCallingConv(CallingConv::C);
157 const ParamAttrsList *func_vsin_PAL = 0;
158 func_vsin->setParamAttrs(func_vsin_PAL);
159
160 Function* func_kilp = new Function(
161 /*Type=*/FuncTy_13,
162 /*Linkage=*/GlobalValue::WeakLinkage,
163 /*Name=*/"kilp", mod);
164 func_kilp->setCallingConv(CallingConv::C);
165 const ParamAttrsList *func_kilp_PAL = 0;
166 {
167 ParamAttrsVector Attrs;
168 ParamAttrsWithIndex PAWI;
169 PAWI.index = 0; PAWI.attrs = 0 | ParamAttr::NoUnwind;
170 Attrs.push_back(PAWI);
171 func_kilp_PAL = ParamAttrsList::get(Attrs);
172
173 }
174 func_kilp->setParamAttrs(func_kilp_PAL);
175
176 // Global Variable Declarations
177
178
179 GlobalVariable* gvar_array__str = new GlobalVariable(
180 /*Type=*/ArrayTy_0,
181 /*isConstant=*/true,
182 /*Linkage=*/GlobalValue::InternalLinkage,
183 /*Initializer=*/0, // has initializer, specified below
184 /*Name=*/".str",
185 mod);
186
187 GlobalVariable* gvar_array__str1 = new GlobalVariable(
188 /*Type=*/ArrayTy_0,
189 /*isConstant=*/true,
190 /*Linkage=*/GlobalValue::InternalLinkage,
191 /*Initializer=*/0, // has initializer, specified below
192 /*Name=*/".str1",
193 mod);
194
195 // Constant Definitions
196 Constant* const_array_14 = ConstantArray::get("VEC IN is %f %f %f %f\x0A", true);
197 Constant* const_array_15 = ConstantArray::get("VEC OUT is %f %f %f %f\x0A", true);
198 ConstantFP* const_float_16 = ConstantFP::get(Type::FloatTy, APFloat(-1.280000e+02f));
199 ConstantFP* const_float_17 = ConstantFP::get(Type::FloatTy, APFloat(1.280000e+02f));
200 Constant* const_float_18 = Constant::getNullValue(Type::FloatTy);
201 Constant* const_int32_19 = Constant::getNullValue(IntegerType::get(32));
202 std::vector<Constant*> const_packed_20_elems;
203 ConstantFP* const_float_21 = ConstantFP::get(Type::FloatTy, APFloat(1.000000e+00f));
204 const_packed_20_elems.push_back(const_float_21);
205 UndefValue* const_float_22 = UndefValue::get(Type::FloatTy);
206 const_packed_20_elems.push_back(const_float_22);
207 const_packed_20_elems.push_back(const_float_22);
208 const_packed_20_elems.push_back(const_float_21);
209 Constant* const_packed_20 = ConstantVector::get(VectorTy_4, const_packed_20_elems);
210 ConstantInt* const_int32_23 = ConstantInt::get(APInt(32, "1", 10));
211 ConstantInt* const_int32_24 = ConstantInt::get(APInt(32, "3", 10));
212 ConstantInt* const_int32_25 = ConstantInt::get(APInt(32, "2", 10));
213 std::vector<Constant*> const_packed_26_elems;
214 const_packed_26_elems.push_back(const_float_21);
215 const_packed_26_elems.push_back(const_float_18);
216 const_packed_26_elems.push_back(const_float_18);
217 const_packed_26_elems.push_back(const_float_21);
218 Constant* const_packed_26 = ConstantVector::get(VectorTy_4, const_packed_26_elems);
219 Constant* const_double_27 = Constant::getNullValue(Type::DoubleTy);
220 std::vector<Constant*> const_packed_28_elems;
221 const_packed_28_elems.push_back(const_int32_19);
222 ConstantInt* const_int32_29 = ConstantInt::get(APInt(32, "5", 10));
223 const_packed_28_elems.push_back(const_int32_29);
224 const_packed_28_elems.push_back(const_int32_25);
225 const_packed_28_elems.push_back(const_int32_24);
226 Constant* const_packed_28 = ConstantVector::get(VectorTy_7, const_packed_28_elems);
227 std::vector<Constant*> const_packed_30_elems;
228 const_packed_30_elems.push_back(const_int32_19);
229 const_packed_30_elems.push_back(const_int32_23);
230 ConstantInt* const_int32_31 = ConstantInt::get(APInt(32, "6", 10));
231 const_packed_30_elems.push_back(const_int32_31);
232 const_packed_30_elems.push_back(const_int32_24);
233 Constant* const_packed_30 = ConstantVector::get(VectorTy_7, const_packed_30_elems);
234 std::vector<Constant*> const_packed_32_elems;
235 const_packed_32_elems.push_back(const_int32_19);
236 const_packed_32_elems.push_back(const_int32_23);
237 const_packed_32_elems.push_back(const_int32_25);
238 ConstantInt* const_int32_33 = ConstantInt::get(APInt(32, "7", 10));
239 const_packed_32_elems.push_back(const_int32_33);
240 Constant* const_packed_32 = ConstantVector::get(VectorTy_7, const_packed_32_elems);
241 std::vector<Constant*> const_ptr_34_indices;
242 const_ptr_34_indices.push_back(const_int32_19);
243 const_ptr_34_indices.push_back(const_int32_19);
244 Constant* const_ptr_34 = ConstantExpr::getGetElementPtr(gvar_array__str, &const_ptr_34_indices[0], const_ptr_34_indices.size() );
245 UndefValue* const_packed_35 = UndefValue::get(VectorTy_4);
246 std::vector<Constant*> const_ptr_36_indices;
247 const_ptr_36_indices.push_back(const_int32_19);
248 const_ptr_36_indices.push_back(const_int32_19);
249 Constant* const_ptr_36 = ConstantExpr::getGetElementPtr(gvar_array__str1, &const_ptr_36_indices[0], const_ptr_36_indices.size() );
250
251 // Global Variable Definitions
252 gvar_array__str->setInitializer(const_array_14);
253 gvar_array__str1->setInitializer(const_array_15);
254
255 // Function Definitions
256
257 // Function: approx (func_approx)
258 {
259 Function::arg_iterator args = func_approx->arg_begin();
260 Value* float_a = args++;
261 float_a->setName("a");
262 Value* float_b = args++;
263 float_b->setName("b");
264
265 BasicBlock* label_entry = new BasicBlock("entry",func_approx,0);
266
267 // Block entry (label_entry)
268 FCmpInst* int1_cmp = new FCmpInst(FCmpInst::FCMP_OLT, float_b, const_float_16, "cmp", label_entry);
269 SelectInst* float_b_addr_0 = new SelectInst(int1_cmp, const_float_16, float_b, "b.addr.0", label_entry);
270 FCmpInst* int1_cmp3 = new FCmpInst(FCmpInst::FCMP_OGT, float_b_addr_0, const_float_17, "cmp3", label_entry);
271 SelectInst* float_b_addr_1 = new SelectInst(int1_cmp3, const_float_17, float_b_addr_0, "b.addr.1", label_entry);
272 FCmpInst* int1_cmp7 = new FCmpInst(FCmpInst::FCMP_OLT, float_a, const_float_18, "cmp7", label_entry);
273 SelectInst* float_a_addr_0 = new SelectInst(int1_cmp7, const_float_18, float_a, "a.addr.0", label_entry);
274 std::vector<Value*> float_call_params;
275 float_call_params.push_back(float_a_addr_0);
276 float_call_params.push_back(float_b_addr_1);
277 CallInst* float_call = new CallInst(func_powf, float_call_params.begin(), float_call_params.end(), "call", label_entry);
278 float_call->setCallingConv(CallingConv::C);
279 float_call->setTailCall(true);const ParamAttrsList *float_call_PAL = 0;
280 float_call->setParamAttrs(float_call_PAL);
281
282 new ReturnInst(float_call, label_entry);
283
284 }
285
286 // Function: lit (func_lit)
287 {
288 Function::arg_iterator args = func_lit->arg_begin();
289 Value* packed_tmp = args++;
290 packed_tmp->setName("tmp");
291
292 BasicBlock* label_entry_38 = new BasicBlock("entry",func_lit,0);
293 BasicBlock* label_ifthen = new BasicBlock("ifthen",func_lit,0);
294 BasicBlock* label_UnifiedReturnBlock = new BasicBlock("UnifiedReturnBlock",func_lit,0);
295
296 // Block entry (label_entry_38)
297 ExtractElementInst* float_tmp6 = new ExtractElementInst(packed_tmp, const_int32_19, "tmp6", label_entry_38);
298 FCmpInst* int1_cmp_39 = new FCmpInst(FCmpInst::FCMP_OGT, float_tmp6, const_float_18, "cmp", label_entry_38);
299 new BranchInst(label_ifthen, label_UnifiedReturnBlock, int1_cmp_39, label_entry_38);
300
301 // Block ifthen (label_ifthen)
302 InsertElementInst* packed_tmp10 = new InsertElementInst(const_packed_20, float_tmp6, const_int32_23, "tmp10", label_ifthen);
303 ExtractElementInst* float_tmp12 = new ExtractElementInst(packed_tmp, const_int32_23, "tmp12", label_ifthen);
304 ExtractElementInst* float_tmp14 = new ExtractElementInst(packed_tmp, const_int32_24, "tmp14", label_ifthen);
305 std::vector<Value*> float_call_41_params;
306 float_call_41_params.push_back(float_tmp12);
307 float_call_41_params.push_back(float_tmp14);
308 CallInst* float_call_41 = new CallInst(func_approx, float_call_41_params.begin(), float_call_41_params.end(), "call", label_ifthen);
309 float_call_41->setCallingConv(CallingConv::C);
310 float_call_41->setTailCall(true);const ParamAttrsList *float_call_41_PAL = 0;
311 float_call_41->setParamAttrs(float_call_41_PAL);
312
313 InsertElementInst* packed_tmp16 = new InsertElementInst(packed_tmp10, float_call_41, const_int32_25, "tmp16", label_ifthen);
314 new ReturnInst(packed_tmp16, label_ifthen);
315
316 // Block UnifiedReturnBlock (label_UnifiedReturnBlock)
317 new ReturnInst(const_packed_26, label_UnifiedReturnBlock);
318
319 }
320
321 // Function: cmp (func_cmp)
322 {
323 Function::arg_iterator args = func_cmp->arg_begin();
324 Value* packed_tmp0 = args++;
325 packed_tmp0->setName("tmp0");
326 Value* packed_tmp1 = args++;
327 packed_tmp1->setName("tmp1");
328 Value* packed_tmp2 = args++;
329 packed_tmp2->setName("tmp2");
330
331 BasicBlock* label_entry_44 = new BasicBlock("entry",func_cmp,0);
332 BasicBlock* label_cond__14 = new BasicBlock("cond.?14",func_cmp,0);
333 BasicBlock* label_cond_cont20 = new BasicBlock("cond.cont20",func_cmp,0);
334 BasicBlock* label_cond__28 = new BasicBlock("cond.?28",func_cmp,0);
335 BasicBlock* label_cond_cont34 = new BasicBlock("cond.cont34",func_cmp,0);
336 BasicBlock* label_cond__42 = new BasicBlock("cond.?42",func_cmp,0);
337 BasicBlock* label_cond_cont48 = new BasicBlock("cond.cont48",func_cmp,0);
338
339 // Block entry (label_entry_44)
340 ExtractElementInst* float_tmp3 = new ExtractElementInst(packed_tmp0, const_int32_19, "tmp3", label_entry_44);
341 CastInst* double_conv = new FPExtInst(float_tmp3, Type::DoubleTy, "conv", label_entry_44);
342 FCmpInst* int1_cmp_45 = new FCmpInst(FCmpInst::FCMP_OLT, double_conv, const_double_27, "cmp", label_entry_44);
343 ExtractElementInst* float_tmp11 = new ExtractElementInst(packed_tmp0, const_int32_23, "tmp11", label_entry_44);
344 CastInst* double_conv12 = new FPExtInst(float_tmp11, Type::DoubleTy, "conv12", label_entry_44);
345 FCmpInst* int1_cmp13 = new FCmpInst(FCmpInst::FCMP_OLT, double_conv12, const_double_27, "cmp13", label_entry_44);
346 SelectInst* packed_tmp1_tmp2 = new SelectInst(int1_cmp_45, packed_tmp1, packed_tmp2, "tmp1.tmp2", label_entry_44);
347 new BranchInst(label_cond__14, label_cond_cont20, int1_cmp13, label_entry_44);
348
349 // Block cond.?14 (label_cond__14)
350 ShuffleVectorInst* packed_tmp233 = new ShuffleVectorInst(packed_tmp1_tmp2, packed_tmp1, const_packed_28, "tmp233", label_cond__14);
351 ExtractElementInst* float_tmp254 = new ExtractElementInst(packed_tmp0, const_int32_25, "tmp254", label_cond__14);
352 CastInst* double_conv265 = new FPExtInst(float_tmp254, Type::DoubleTy, "conv265", label_cond__14);
353 FCmpInst* int1_cmp276 = new FCmpInst(FCmpInst::FCMP_OLT, double_conv265, const_double_27, "cmp276", label_cond__14);
354 new BranchInst(label_cond__28, label_cond_cont34, int1_cmp276, label_cond__14);
355
356 // Block cond.cont20 (label_cond_cont20)
357 ShuffleVectorInst* packed_tmp23 = new ShuffleVectorInst(packed_tmp1_tmp2, packed_tmp2, const_packed_28, "tmp23", label_cond_cont20);
358 ExtractElementInst* float_tmp25 = new ExtractElementInst(packed_tmp0, const_int32_25, "tmp25", label_cond_cont20);
359 CastInst* double_conv26 = new FPExtInst(float_tmp25, Type::DoubleTy, "conv26", label_cond_cont20);
360 FCmpInst* int1_cmp27 = new FCmpInst(FCmpInst::FCMP_OLT, double_conv26, const_double_27, "cmp27", label_cond_cont20);
361 new BranchInst(label_cond__28, label_cond_cont34, int1_cmp27, label_cond_cont20);
362
363 // Block cond.?28 (label_cond__28)
364 PHINode* packed_tmp23_reg2mem_0 = new PHINode(VectorTy_4, "tmp23.reg2mem.0", label_cond__28);
365 packed_tmp23_reg2mem_0->reserveOperandSpace(2);
366 packed_tmp23_reg2mem_0->addIncoming(packed_tmp233, label_cond__14);
367 packed_tmp23_reg2mem_0->addIncoming(packed_tmp23, label_cond_cont20);
368
369 ShuffleVectorInst* packed_tmp378 = new ShuffleVectorInst(packed_tmp23_reg2mem_0, packed_tmp1, const_packed_30, "tmp378", label_cond__28);
370 ExtractElementInst* float_tmp399 = new ExtractElementInst(packed_tmp0, const_int32_24, "tmp399", label_cond__28);
371 CastInst* double_conv4010 = new FPExtInst(float_tmp399, Type::DoubleTy, "conv4010", label_cond__28);
372 FCmpInst* int1_cmp4111 = new FCmpInst(FCmpInst::FCMP_OLT, double_conv4010, const_double_27, "cmp4111", label_cond__28);
373 new BranchInst(label_cond__42, label_cond_cont48, int1_cmp4111, label_cond__28);
374
375 // Block cond.cont34 (label_cond_cont34)
376 PHINode* packed_tmp23_reg2mem_1 = new PHINode(VectorTy_4, "tmp23.reg2mem.1", label_cond_cont34);
377 packed_tmp23_reg2mem_1->reserveOperandSpace(2);
378 packed_tmp23_reg2mem_1->addIncoming(packed_tmp233, label_cond__14);
379 packed_tmp23_reg2mem_1->addIncoming(packed_tmp23, label_cond_cont20);
380
381 ShuffleVectorInst* packed_tmp37 = new ShuffleVectorInst(packed_tmp23_reg2mem_1, packed_tmp2, const_packed_30, "tmp37", label_cond_cont34);
382 ExtractElementInst* float_tmp39 = new ExtractElementInst(packed_tmp0, const_int32_24, "tmp39", label_cond_cont34);
383 CastInst* double_conv40 = new FPExtInst(float_tmp39, Type::DoubleTy, "conv40", label_cond_cont34);
384 FCmpInst* int1_cmp41 = new FCmpInst(FCmpInst::FCMP_OLT, double_conv40, const_double_27, "cmp41", label_cond_cont34);
385 new BranchInst(label_cond__42, label_cond_cont48, int1_cmp41, label_cond_cont34);
386
387 // Block cond.?42 (label_cond__42)
388 PHINode* packed_tmp37_reg2mem_0 = new PHINode(VectorTy_4, "tmp37.reg2mem.0", label_cond__42);
389 packed_tmp37_reg2mem_0->reserveOperandSpace(2);
390 packed_tmp37_reg2mem_0->addIncoming(packed_tmp378, label_cond__28);
391 packed_tmp37_reg2mem_0->addIncoming(packed_tmp37, label_cond_cont34);
392
393 ShuffleVectorInst* packed_tmp5113 = new ShuffleVectorInst(packed_tmp37_reg2mem_0, packed_tmp1, const_packed_32, "tmp5113", label_cond__42);
394 new ReturnInst(packed_tmp5113, label_cond__42);
395
396 // Block cond.cont48 (label_cond_cont48)
397 PHINode* packed_tmp37_reg2mem_1 = new PHINode(VectorTy_4, "tmp37.reg2mem.1", label_cond_cont48);
398 packed_tmp37_reg2mem_1->reserveOperandSpace(2);
399 packed_tmp37_reg2mem_1->addIncoming(packed_tmp378, label_cond__28);
400 packed_tmp37_reg2mem_1->addIncoming(packed_tmp37, label_cond_cont34);
401
402 ShuffleVectorInst* packed_tmp51 = new ShuffleVectorInst(packed_tmp37_reg2mem_1, packed_tmp2, const_packed_32, "tmp51", label_cond_cont48);
403 new ReturnInst(packed_tmp51, label_cond_cont48);
404
405 }
406
407 // Function: vcos (func_vcos)
408 {
409 Function::arg_iterator args = func_vcos->arg_begin();
410 Value* packed_val = args++;
411 packed_val->setName("val");
412
413 BasicBlock* label_entry_53 = new BasicBlock("entry",func_vcos,0);
414
415 // Block entry (label_entry_53)
416 ExtractElementInst* float_tmp1 = new ExtractElementInst(packed_val, const_int32_19, "tmp1", label_entry_53);
417 CastInst* double_conv_54 = new FPExtInst(float_tmp1, Type::DoubleTy, "conv", label_entry_53);
418 ExtractElementInst* float_tmp3_55 = new ExtractElementInst(packed_val, const_int32_23, "tmp3", label_entry_53);
419 CastInst* double_conv4 = new FPExtInst(float_tmp3_55, Type::DoubleTy, "conv4", label_entry_53);
420 ExtractElementInst* float_tmp6_56 = new ExtractElementInst(packed_val, const_int32_25, "tmp6", label_entry_53);
421 CastInst* double_conv7 = new FPExtInst(float_tmp6_56, Type::DoubleTy, "conv7", label_entry_53);
422 ExtractElementInst* float_tmp9 = new ExtractElementInst(packed_val, const_int32_24, "tmp9", label_entry_53);
423 CastInst* double_conv10 = new FPExtInst(float_tmp9, Type::DoubleTy, "conv10", label_entry_53);
424 std::vector<Value*> int32_call_params;
425 int32_call_params.push_back(const_ptr_34);
426 int32_call_params.push_back(double_conv_54);
427 int32_call_params.push_back(double_conv4);
428 int32_call_params.push_back(double_conv7);
429 int32_call_params.push_back(double_conv10);
430 CallInst* int32_call = new CallInst(func_printf, int32_call_params.begin(), int32_call_params.end(), "call", label_entry_53);
431 int32_call->setCallingConv(CallingConv::C);
432 int32_call->setTailCall(true);const ParamAttrsList *int32_call_PAL = 0;
433 int32_call->setParamAttrs(int32_call_PAL);
434
435 CallInst* float_call13 = new CallInst(func_cosf, float_tmp1, "call13", label_entry_53);
436 float_call13->setCallingConv(CallingConv::C);
437 float_call13->setTailCall(true);const ParamAttrsList *float_call13_PAL = 0;
438 float_call13->setParamAttrs(float_call13_PAL);
439
440 InsertElementInst* packed_tmp15 = new InsertElementInst(const_packed_35, float_call13, const_int32_19, "tmp15", label_entry_53);
441 CallInst* float_call18 = new CallInst(func_cosf, float_tmp1, "call18", label_entry_53);
442 float_call18->setCallingConv(CallingConv::C);
443 float_call18->setTailCall(true);const ParamAttrsList *float_call18_PAL = 0;
444 float_call18->setParamAttrs(float_call18_PAL);
445
446 InsertElementInst* packed_tmp20 = new InsertElementInst(packed_tmp15, float_call18, const_int32_23, "tmp20", label_entry_53);
447 CallInst* float_call23 = new CallInst(func_cosf, float_tmp1, "call23", label_entry_53);
448 float_call23->setCallingConv(CallingConv::C);
449 float_call23->setTailCall(true);const ParamAttrsList *float_call23_PAL = 0;
450 float_call23->setParamAttrs(float_call23_PAL);
451
452 InsertElementInst* packed_tmp25 = new InsertElementInst(packed_tmp20, float_call23, const_int32_25, "tmp25", label_entry_53);
453 CallInst* float_call28 = new CallInst(func_cosf, float_tmp1, "call28", label_entry_53);
454 float_call28->setCallingConv(CallingConv::C);
455 float_call28->setTailCall(true);const ParamAttrsList *float_call28_PAL = 0;
456 float_call28->setParamAttrs(float_call28_PAL);
457
458 InsertElementInst* packed_tmp30 = new InsertElementInst(packed_tmp25, float_call28, const_int32_24, "tmp30", label_entry_53);
459 CastInst* double_conv33 = new FPExtInst(float_call13, Type::DoubleTy, "conv33", label_entry_53);
460 CastInst* double_conv36 = new FPExtInst(float_call18, Type::DoubleTy, "conv36", label_entry_53);
461 CastInst* double_conv39 = new FPExtInst(float_call23, Type::DoubleTy, "conv39", label_entry_53);
462 CastInst* double_conv42 = new FPExtInst(float_call28, Type::DoubleTy, "conv42", label_entry_53);
463 std::vector<Value*> int32_call43_params;
464 int32_call43_params.push_back(const_ptr_36);
465 int32_call43_params.push_back(double_conv33);
466 int32_call43_params.push_back(double_conv36);
467 int32_call43_params.push_back(double_conv39);
468 int32_call43_params.push_back(double_conv42);
469 CallInst* int32_call43 = new CallInst(func_printf, int32_call43_params.begin(), int32_call43_params.end(), "call43", label_entry_53);
470 int32_call43->setCallingConv(CallingConv::C);
471 int32_call43->setTailCall(true);const ParamAttrsList *int32_call43_PAL = 0;
472 int32_call43->setParamAttrs(int32_call43_PAL);
473
474 new ReturnInst(packed_tmp30, label_entry_53);
475
476 }
477
478 // Function: scs (func_scs)
479 {
480 Function::arg_iterator args = func_scs->arg_begin();
481 Value* packed_val_58 = args++;
482 packed_val_58->setName("val");
483
484 BasicBlock* label_entry_59 = new BasicBlock("entry",func_scs,0);
485
486 // Block entry (label_entry_59)
487 ExtractElementInst* float_tmp2 = new ExtractElementInst(packed_val_58, const_int32_19, "tmp2", label_entry_59);
488 CallInst* float_call_60 = new CallInst(func_cosf, float_tmp2, "call", label_entry_59);
489 float_call_60->setCallingConv(CallingConv::C);
490 float_call_60->setTailCall(true);const ParamAttrsList *float_call_60_PAL = 0;
491 float_call_60->setParamAttrs(float_call_60_PAL);
492
493 InsertElementInst* packed_tmp5 = new InsertElementInst(const_packed_35, float_call_60, const_int32_19, "tmp5", label_entry_59);
494 CallInst* float_call7 = new CallInst(func_sinf, float_tmp2, "call7", label_entry_59);
495 float_call7->setCallingConv(CallingConv::C);
496 float_call7->setTailCall(true);const ParamAttrsList *float_call7_PAL = 0;
497 float_call7->setParamAttrs(float_call7_PAL);
498
499 InsertElementInst* packed_tmp9 = new InsertElementInst(packed_tmp5, float_call7, const_int32_23, "tmp9", label_entry_59);
500 new ReturnInst(packed_tmp9, label_entry_59);
501
502 }
503
504 // Function: vsin (func_vsin)
505 {
506 Function::arg_iterator args = func_vsin->arg_begin();
507 Value* packed_val_62 = args++;
508 packed_val_62->setName("val");
509
510 BasicBlock* label_entry_63 = new BasicBlock("entry",func_vsin,0);
511
512 // Block entry (label_entry_63)
513 ExtractElementInst* float_tmp2_64 = new ExtractElementInst(packed_val_62, const_int32_19, "tmp2", label_entry_63);
514 CallInst* float_call_65 = new CallInst(func_sinf, float_tmp2_64, "call", label_entry_63);
515 float_call_65->setCallingConv(CallingConv::C);
516 float_call_65->setTailCall(true);const ParamAttrsList *float_call_65_PAL = 0;
517 float_call_65->setParamAttrs(float_call_65_PAL);
518
519 InsertElementInst* packed_tmp6 = new InsertElementInst(const_packed_35, float_call_65, const_int32_19, "tmp6", label_entry_63);
520 InsertElementInst* packed_tmp9_66 = new InsertElementInst(packed_tmp6, float_call_65, const_int32_23, "tmp9", label_entry_63);
521 InsertElementInst* packed_tmp12 = new InsertElementInst(packed_tmp9_66, float_call_65, const_int32_25, "tmp12", label_entry_63);
522 InsertElementInst* packed_tmp15_67 = new InsertElementInst(packed_tmp12, float_call_65, const_int32_24, "tmp15", label_entry_63);
523 new ReturnInst(packed_tmp15_67, label_entry_63);
524
525 }
526
527 // Function: kilp (func_kilp)
528 {
529 Function::arg_iterator args = func_kilp->arg_begin();
530 Value* packed_val_69 = args++;
531 packed_val_69->setName("val");
532
533 BasicBlock* label_entry_70 = new BasicBlock("entry",func_kilp,0);
534 BasicBlock* label_lor_rhs = new BasicBlock("lor_rhs",func_kilp,0);
535 BasicBlock* label_lor_rhs5 = new BasicBlock("lor_rhs5",func_kilp,0);
536 BasicBlock* label_lor_rhs11 = new BasicBlock("lor_rhs11",func_kilp,0);
537 BasicBlock* label_UnifiedReturnBlock_71 = new BasicBlock("UnifiedReturnBlock",func_kilp,0);
538
539 // Block entry (label_entry_70)
540 ExtractElementInst* float_tmp1_72 = new ExtractElementInst(packed_val_69, const_int32_19, "tmp1", label_entry_70);
541 FCmpInst* int1_cmp_73 = new FCmpInst(FCmpInst::FCMP_OLT, float_tmp1_72, const_float_18, "cmp", label_entry_70);
542 new BranchInst(label_UnifiedReturnBlock_71, label_lor_rhs, int1_cmp_73, label_entry_70);
543
544 // Block lor_rhs (label_lor_rhs)
545 ExtractElementInst* float_tmp3_75 = new ExtractElementInst(packed_val_69, const_int32_23, "tmp3", label_lor_rhs);
546 FCmpInst* int1_cmp4 = new FCmpInst(FCmpInst::FCMP_OLT, float_tmp3_75, const_float_18, "cmp4", label_lor_rhs);
547 new BranchInst(label_UnifiedReturnBlock_71, label_lor_rhs5, int1_cmp4, label_lor_rhs);
548
549 // Block lor_rhs5 (label_lor_rhs5)
550 ExtractElementInst* float_tmp7 = new ExtractElementInst(packed_val_69, const_int32_25, "tmp7", label_lor_rhs5);
551 FCmpInst* int1_cmp8 = new FCmpInst(FCmpInst::FCMP_OLT, float_tmp7, const_float_18, "cmp8", label_lor_rhs5);
552 new BranchInst(label_UnifiedReturnBlock_71, label_lor_rhs11, int1_cmp8, label_lor_rhs5);
553
554 // Block lor_rhs11 (label_lor_rhs11)
555 ExtractElementInst* float_tmp13 = new ExtractElementInst(packed_val_69, const_int32_24, "tmp13", label_lor_rhs11);
556 FCmpInst* int1_cmp14 = new FCmpInst(FCmpInst::FCMP_OLT, float_tmp13, const_float_18, "cmp14", label_lor_rhs11);
557 CastInst* int32_retval = new ZExtInst(int1_cmp14, IntegerType::get(32), "retval", label_lor_rhs11);
558 new ReturnInst(int32_retval, label_lor_rhs11);
559
560 // Block UnifiedReturnBlock (label_UnifiedReturnBlock_71)
561 new ReturnInst(const_int32_23, label_UnifiedReturnBlock_71);
562
563 }
564
565 return mod;
566
567 }