diff options
author | dim <dim@FreeBSD.org> | 2011-07-17 15:36:56 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-07-17 15:36:56 +0000 |
commit | 1176aa52646fe641a4243a246aa7f960c708a274 (patch) | |
tree | c8086addb211fa670a9d2b1038d8c2e453229755 /test/CodeGen/ARM | |
parent | ece02cd5829cea836e9365b0845a8ef042d17b0a (diff) | |
download | FreeBSD-src-1176aa52646fe641a4243a246aa7f960c708a274.zip FreeBSD-src-1176aa52646fe641a4243a246aa7f960c708a274.tar.gz |
Vendor import of llvm trunk r135360:
http://llvm.org/svn/llvm-project/llvm/trunk@135360
Diffstat (limited to 'test/CodeGen/ARM')
67 files changed, 1001 insertions, 1604 deletions
diff --git a/test/CodeGen/ARM/2007-03-26-RegScavengerAssert.ll b/test/CodeGen/ARM/2007-03-26-RegScavengerAssert.ll deleted file mode 100644 index 76fa364..0000000 --- a/test/CodeGen/ARM/2007-03-26-RegScavengerAssert.ll +++ /dev/null @@ -1,947 +0,0 @@ -; RUN: llc < %s -march=arm -; PR1266 - -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" -target triple = "arm-unknown-linux-gnueabi" - %struct.CUMULATIVE_ARGS = type { i32, i32, i32, i32, i32, i32 } - %struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i32, [52 x i8] } - %struct.VEC_edge = type { i32, i32, [1 x %struct.edge_def*] } - %struct.VEC_tree = type { i32, i32, [1 x %struct.tree_node*] } - %struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 } - %struct._obstack_chunk = type { i8*, %struct._obstack_chunk*, [4 x i8] } - %struct.addr_diff_vec_flags = type { i8, i8, i8, i8 } - %struct.arm_stack_offsets = type { i32, i32, i32, i32, i32 } - %struct.attribute_spec = type { i8*, i32, i32, i8, i8, i8, %struct.tree_node* (%struct.tree_node**, %struct.tree_node*, %struct.tree_node*, i32, i8*)* } - %struct.basic_block_def = type { %struct.rtx_def*, %struct.rtx_def*, %struct.tree_node*, %struct.VEC_edge*, %struct.VEC_edge*, %struct.bitmap_head_def*, %struct.bitmap_head_def*, i8*, %struct.loop*, [2 x %struct.et_node*], %struct.basic_block_def*, %struct.basic_block_def*, %struct.reorder_block_def*, %struct.bb_ann_d*, i64, i32, i32, i32, i32 } - %struct.bb_ann_d = type { %struct.tree_node*, i8, %struct.edge_prediction* } - %struct.bitmap_element_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, i32, [4 x i32] } - %struct.bitmap_head_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, i32, %struct.bitmap_obstack* } - %struct.bitmap_obstack = type { %struct.bitmap_element_def*, %struct.bitmap_head_def*, %struct.obstack } - %struct.cgraph_edge = type { %struct.cgraph_node*, %struct.cgraph_node*, %struct.cgraph_edge*, %struct.cgraph_edge*, %struct.cgraph_edge*, %struct.cgraph_edge*, %struct.tree_node*, i8*, i8* } - %struct.cgraph_global_info = type { %struct.cgraph_node*, i32, i8 } - %struct.cgraph_local_info = type { i32, i8, i8, i8, i8, i8, i8, i8 } - %struct.cgraph_node = type { %struct.tree_node*, %struct.cgraph_edge*, %struct.cgraph_edge*, %struct.cgraph_node*, %struct.cgraph_node*, %struct.cgraph_node*, %struct.cgraph_node*, %struct.cgraph_node*, %struct.cgraph_node*, %struct.cgraph_node*, i8*, %struct.cgraph_local_info, %struct.cgraph_global_info, %struct.cgraph_rtl_info, i32, i8, i8, i8, i8, i8 } - %struct.cgraph_rtl_info = type { i32, i8, i8 } - %struct.cl_perfunc_opts = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32 } - %struct.cselib_val_struct = type opaque - %struct.dataflow_d = type { %struct.varray_head_tag*, [2 x %struct.tree_node*] } - %struct.def_operand_ptr = type { %struct.tree_node** } - %struct.def_optype_d = type { i32, [1 x %struct.def_operand_ptr] } - %struct.diagnostic_context = type { %struct.pretty_printer*, [8 x i32], i8, i8, i8, void (%struct.diagnostic_context*, %struct.diagnostic_info*)*, void (%struct.diagnostic_context*, %struct.diagnostic_info*)*, void (i8*, i8**)*, %struct.tree_node*, i32, i32 } - %struct.diagnostic_info = type { %struct.text_info, %struct.location_t, i32 } - %struct.die_struct = type opaque - %struct.edge_def = type { %struct.basic_block_def*, %struct.basic_block_def*, %struct.edge_def_insns, i8*, %struct.location_t*, i32, i32, i64, i32 } - %struct.edge_def_insns = type { %struct.rtx_def* } - %struct.edge_prediction = type { %struct.edge_prediction*, %struct.edge_def*, i32, i32 } - %struct.eh_status = type opaque - %struct.elt_list = type opaque - %struct.elt_t = type { %struct.tree_node*, %struct.tree_node* } - %struct.emit_status = type { i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack*, i32, %struct.location_t, i32, i8*, %struct.rtx_def** } - %struct.et_node = type opaque - %struct.expr_status = type { i32, i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def* } - %struct.function = type { %struct.eh_status*, %struct.expr_status*, %struct.emit_status*, %struct.varasm_status*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.function*, i32, i32, i32, i32, %struct.rtx_def*, %struct.CUMULATIVE_ARGS, %struct.rtx_def*, %struct.rtx_def*, %struct.initial_value_struct*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, i8, i32, i64, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, %struct.varray_head_tag*, %struct.temp_slot*, i32, %struct.var_refs_queue*, i32, i32, %struct.rtvec_def*, %struct.tree_node*, i32, i32, i32, %struct.machine_function*, i32, i32, i8, i8, %struct.language_function*, %struct.rtx_def*, i32, i32, i32, i32, %struct.location_t, %struct.varray_head_tag*, %struct.tree_node*, i8, i8, i8 } - %struct.ggc_root_tab = type { i8*, i32, i32, void (i8*)*, void (i8*)* } - %struct.gimplify_ctx = type { %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.varray_head_tag*, %struct.htab*, i32, i8, i8 } - %struct.gimplify_init_ctor_preeval_data = type { %struct.tree_node*, i32 } - %struct.ht_identifier = type { i8*, i32, i32 } - %struct.htab = type { i32 (i8*)*, i32 (i8*, i8*)*, void (i8*)*, i8**, i32, i32, i32, i32, i32, i8* (i32, i32)*, void (i8*)*, i8*, i8* (i8*, i32, i32)*, void (i8*, i8*)*, i32 } - %struct.initial_value_struct = type opaque - %struct.lang_decl = type opaque - %struct.lang_hooks = type { i8*, i32, i32 (i32)*, i32 (i32, i8**)*, void (%struct.diagnostic_context*)*, i32 (i32, i8*, i32)*, i8 (i8*, i32) zeroext *, i8 (i8**) zeroext *, i8 () zeroext *, void ()*, void ()*, void (i32)*, void ()*, i64 (%struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*)*, %struct.rtx_def* (%struct.tree_node*, %struct.rtx_def*, i32, i32, %struct.rtx_def**)*, i32 (%struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*)*, i32 (%struct.rtx_def*, %struct.tree_node*)*, void (%struct.tree_node*)*, i8 (%struct.tree_node*) zeroext *, %struct.tree_node* (%struct.tree_node*)*, void (%struct.tree_node*)*, void (%struct.tree_node*)*, i8 () zeroext *, i8, i8, void ()*, void (%struct.FILE*, %struct.tree_node*, i32)*, void (%struct.FILE*, %struct.tree_node*, i32)*, void (%struct.FILE*, %struct.tree_node*, i32)*, void (%struct.FILE*, %struct.tree_node*, i32)*, i8* (%struct.tree_node*, i32)*, i32 (%struct.tree_node*, %struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*)*, void (%struct.diagnostic_context*, i8*)*, %struct.tree_node* (%struct.tree_node*)*, i64 (i64)*, %struct.attribute_spec*, %struct.attribute_spec*, %struct.attribute_spec*, i32 (%struct.tree_node*)*, %struct.lang_hooks_for_functions, %struct.lang_hooks_for_tree_inlining, %struct.lang_hooks_for_callgraph, %struct.lang_hooks_for_tree_dump, %struct.lang_hooks_for_decls, %struct.lang_hooks_for_types, i32 (%struct.tree_node**, %struct.tree_node**, %struct.tree_node**)*, %struct.tree_node* (%struct.tree_node*, %struct.tree_node*)*, %struct.tree_node* (i8*, %struct.tree_node*, i32, i32, i8*, %struct.tree_node*)* } - %struct.lang_hooks_for_callgraph = type { %struct.tree_node* (%struct.tree_node**, i32*, %struct.tree_node*)*, void (%struct.tree_node*)* } - %struct.lang_hooks_for_decls = type { i32 ()*, void (%struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*)*, %struct.tree_node* ()*, i8 (%struct.tree_node*) zeroext *, void ()*, void (%struct.tree_node*)*, i8 (%struct.tree_node*) zeroext *, i8* (%struct.tree_node*)* } - %struct.lang_hooks_for_functions = type { void (%struct.function*)*, void (%struct.function*)*, void (%struct.function*)*, void (%struct.function*)*, i8 (%struct.tree_node*) zeroext * } - %struct.lang_hooks_for_tree_dump = type { i8 (i8*, %struct.tree_node*) zeroext *, i32 (%struct.tree_node*)* } - %struct.lang_hooks_for_tree_inlining = type { %struct.tree_node* (%struct.tree_node**, i32*, %struct.tree_node* (%struct.tree_node**, i32*, i8*)*, i8*, %struct.pointer_set_t*)*, i32 (%struct.tree_node**)*, i32 (%struct.tree_node*)*, %struct.tree_node* (i8*, %struct.tree_node*)*, i32 (%struct.tree_node*, %struct.tree_node*)*, i32 (%struct.tree_node*)*, i8 (%struct.tree_node*, %struct.tree_node*) zeroext *, i32 (%struct.tree_node*)*, void (%struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i32)* } - %struct.lang_hooks_for_types = type { %struct.tree_node* (i32)*, %struct.tree_node* (i32, i32)*, %struct.tree_node* (i32, i32)*, %struct.tree_node* (%struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*)*, %struct.tree_node* (i32, %struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*)*, void (%struct.tree_node*, i8*)*, void (%struct.tree_node*, %struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*)*, i8 } - %struct.lang_type = type opaque - %struct.language_function = type opaque - %struct.location_t = type { i8*, i32 } - %struct.loop = type opaque - %struct.machine_function = type { %struct.rtx_def*, i32, i32, i32, %struct.arm_stack_offsets, i32, i32, i32, [14 x %struct.rtx_def*] } - %struct.mem_attrs = type { i64, %struct.tree_node*, %struct.rtx_def*, %struct.rtx_def*, i32 } - %struct.obstack = type { i32, %struct._obstack_chunk*, i8*, i8*, i8*, i32, i32, %struct._obstack_chunk* (i8*, i32)*, void (i8*, %struct._obstack_chunk*)*, i8*, i8 } - %struct.output_buffer = type { %struct.obstack, %struct.FILE*, i32, [128 x i8] } - %struct.phi_arg_d = type { %struct.tree_node*, i8 } - %struct.pointer_set_t = type opaque - %struct.pretty_printer = type { %struct.output_buffer*, i8*, i32, i32, i32, i32, i32, i8 (%struct.pretty_printer*, %struct.text_info*) zeroext *, i8, i8 } - %struct.ptr_info_def = type { i8, %struct.bitmap_head_def*, %struct.tree_node* } - %struct.real_value = type { i8, [3 x i8], [5 x i32] } - %struct.reg_attrs = type { %struct.tree_node*, i64 } - %struct.reg_info_def = type opaque - %struct.reorder_block_def = type { %struct.rtx_def*, %struct.rtx_def*, %struct.basic_block_def*, %struct.basic_block_def*, %struct.basic_block_def*, i32, i32, i32 } - %struct.rtunion = type { i32 } - %struct.rtvec_def = type { i32, [1 x %struct.rtx_def*] } - %struct.rtx_def = type { i16, i8, i8, %struct.u } - %struct.sequence_stack = type { %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack* } - %struct.stmt_ann_d = type { %struct.tree_ann_common_d, i8, %struct.basic_block_def*, %struct.stmt_operands_d, %struct.dataflow_d*, %struct.bitmap_head_def*, i32 } - %struct.stmt_operands_d = type { %struct.def_optype_d*, %struct.def_optype_d*, %struct.v_may_def_optype_d*, %struct.vuse_optype_d*, %struct.v_may_def_optype_d* } - %struct.temp_slot = type opaque - %struct.text_info = type { i8*, i8**, i32 } - %struct.tree_ann_common_d = type { i32, i8*, %struct.tree_node* } - %struct.tree_ann_d = type { %struct.stmt_ann_d } - %struct.tree_binfo = type { %struct.tree_common, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.VEC_tree*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.VEC_tree } - %struct.tree_block = type { %struct.tree_common, i8, [3 x i8], %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node* } - %struct.tree_common = type { %struct.tree_node*, %struct.tree_node*, %struct.tree_ann_d*, i8, i8, i8, i8, i8 } - %struct.tree_complex = type { %struct.tree_common, %struct.tree_node*, %struct.tree_node* } - %struct.tree_decl = type { %struct.tree_common, %struct.location_t, i32, %struct.tree_node*, i8, i8, i8, i8, i8, i8, i8, i8, i32, %struct.tree_decl_u1, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, i32, %struct.tree_decl_u2, %struct.tree_node*, %struct.tree_node*, i64, %struct.lang_decl* } - %struct.tree_decl_u1 = type { i64 } - %struct.tree_decl_u1_a = type { i32 } - %struct.tree_decl_u2 = type { %struct.function* } - %struct.tree_exp = type { %struct.tree_common, %struct.location_t*, i32, %struct.tree_node*, [1 x %struct.tree_node*] } - %struct.tree_identifier = type { %struct.tree_common, %struct.ht_identifier } - %struct.tree_int_cst = type { %struct.tree_common, %struct.tree_int_cst_lowhi } - %struct.tree_int_cst_lowhi = type { i64, i64 } - %struct.tree_list = type { %struct.tree_common, %struct.tree_node*, %struct.tree_node* } - %struct.tree_node = type { %struct.tree_decl } - %struct.tree_phi_node = type { %struct.tree_common, %struct.tree_node*, i32, i32, i32, %struct.basic_block_def*, %struct.dataflow_d*, [1 x %struct.phi_arg_d] } - %struct.tree_real_cst = type { %struct.tree_common, %struct.real_value* } - %struct.tree_ssa_name = type { %struct.tree_common, %struct.tree_node*, i32, %struct.ptr_info_def*, %struct.tree_node*, i8* } - %struct.tree_statement_list = type { %struct.tree_common, %struct.tree_statement_list_node*, %struct.tree_statement_list_node* } - %struct.tree_statement_list_node = type { %struct.tree_statement_list_node*, %struct.tree_statement_list_node*, %struct.tree_node* } - %struct.tree_stmt_iterator = type { %struct.tree_statement_list_node*, %struct.tree_node* } - %struct.tree_string = type { %struct.tree_common, i32, [1 x i8] } - %struct.tree_type = type { %struct.tree_common, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i32, i16, i8, i8, i32, %struct.tree_node*, %struct.tree_node*, %struct.rtunion, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i64, %struct.lang_type* } - %struct.tree_type_symtab = type { i32 } - %struct.tree_value_handle = type { %struct.tree_common, %struct.value_set*, i32 } - %struct.tree_vec = type { %struct.tree_common, i32, [1 x %struct.tree_node*] } - %struct.tree_vector = type { %struct.tree_common, %struct.tree_node* } - %struct.u = type { [1 x i64] } - %struct.use_operand_ptr = type { %struct.tree_node** } - %struct.use_optype_d = type { i32, [1 x %struct.def_operand_ptr] } - %struct.v_def_use_operand_type_t = type { %struct.tree_node*, %struct.tree_node* } - %struct.v_may_def_optype_d = type { i32, [1 x %struct.elt_t] } - %struct.v_must_def_optype_d = type { i32, [1 x %struct.elt_t] } - %struct.value_set = type opaque - %struct.var_ann_d = type { %struct.tree_ann_common_d, i8, i8, %struct.tree_node*, %struct.varray_head_tag*, i32, i32, i32, %struct.tree_node*, %struct.tree_node* } - %struct.var_refs_queue = type { %struct.rtx_def*, i32, i32, %struct.var_refs_queue* } - %struct.varasm_status = type opaque - %struct.varray_data = type { [1 x i64] } - %struct.varray_head_tag = type { i32, i32, i32, i8*, %struct.u } - %struct.vuse_optype_d = type { i32, [1 x %struct.tree_node*] } -@gt_pch_rs_gt_gimplify_h = external global [2 x %struct.ggc_root_tab] ; <[2 x %struct.ggc_root_tab]*> [#uses=0] -@tmp_var_id_num = external global i32 ; <i32*> [#uses=0] -@gt_ggc_r_gt_gimplify_h = external global [1 x %struct.ggc_root_tab] ; <[1 x %struct.ggc_root_tab]*> [#uses=0] -@__FUNCTION__.19956 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] -@str = external global [42 x i8] ; <[42 x i8]*> [#uses=1] -@__FUNCTION__.19974 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] -@gimplify_ctxp = external global %struct.gimplify_ctx* ; <%struct.gimplify_ctx**> [#uses=0] -@cl_pf_opts = external global %struct.cl_perfunc_opts ; <%struct.cl_perfunc_opts*> [#uses=0] -@__FUNCTION__.20030 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] -@__FUNCTION__.20099 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] -@global_trees = external global [47 x %struct.tree_node*] ; <[47 x %struct.tree_node*]*> [#uses=0] -@tree_code_type = external global [0 x i32] ; <[0 x i32]*> [#uses=2] -@current_function_decl = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=0] -@str1 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] -@str2 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] -@__FUNCTION__.20151 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] -@__FUNCTION__.20221 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] -@tree_code_length = external global [0 x i8] ; <[0 x i8]*> [#uses=0] -@__FUNCTION__.20435 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] -@__FUNCTION__.20496 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] -@cfun = external global %struct.function* ; <%struct.function**> [#uses=0] -@__FUNCTION__.20194 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] -@__FUNCTION__.19987 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] -@__FUNCTION__.20532 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] -@__FUNCTION__.20583 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] -@__FUNCTION__.20606 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] -@__FUNCTION__.20644 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] -@__FUNCTION__.20681 = external global [13 x i8] ; <[13 x i8]*> [#uses=0] -@__FUNCTION__.20700 = external global [13 x i8] ; <[13 x i8]*> [#uses=0] -@__FUNCTION__.21426 = external global [20 x i8] ; <[20 x i8]*> [#uses=0] -@__FUNCTION__.21471 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] -@__FUNCTION__.21962 = external global [27 x i8] ; <[27 x i8]*> [#uses=0] -@__FUNCTION__.22992 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] -@__FUNCTION__.23735 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] -@lang_hooks = external global %struct.lang_hooks ; <%struct.lang_hooks*> [#uses=0] -@__FUNCTION__.27383 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] -@__FUNCTION__.20776 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] -@__FUNCTION__.10672 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] -@str3 = external global [47 x i8] ; <[47 x i8]*> [#uses=0] -@str4 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] -@__FUNCTION__.20065 = external global [25 x i8] ; <[25 x i8]*> [#uses=0] -@__FUNCTION__.23256 = external global [16 x i8] ; <[16 x i8]*> [#uses=0] -@__FUNCTION__.23393 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] -@__FUNCTION__.20043 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] -@__FUNCTION__.20729 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] -@__FUNCTION__.20563 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] -@__FUNCTION__.10663 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] -@__FUNCTION__.20367 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] -@__FUNCTION__.20342 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] -@input_location = external global %struct.location_t ; <%struct.location_t*> [#uses=0] -@__FUNCTION__.24510 = external global [27 x i8] ; <[27 x i8]*> [#uses=0] -@__FUNCTION__.25097 = external global [25 x i8] ; <[25 x i8]*> [#uses=0] -@__FUNCTION__.24705 = external global [26 x i8] ; <[26 x i8]*> [#uses=0] -@str5 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] -@__FUNCTION__.25136 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] -@__FUNCTION__.24450 = external global [31 x i8] ; <[31 x i8]*> [#uses=0] -@implicit_built_in_decls = external global [471 x %struct.tree_node*] ; <[471 x %struct.tree_node*]*> [#uses=0] -@__FUNCTION__.24398 = external global [31 x i8] ; <[31 x i8]*> [#uses=0] -@__FUNCTION__.26156 = external global [14 x i8] ; <[14 x i8]*> [#uses=1] -@unknown_location = external global %struct.location_t ; <%struct.location_t*> [#uses=0] -@__FUNCTION__.23038 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] -@str6 = external global [43 x i8] ; <[43 x i8]*> [#uses=0] -@__FUNCTION__.25476 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] -@__FUNCTION__.22136 = external global [20 x i8] ; <[20 x i8]*> [#uses=1] -@__FUNCTION__.21997 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] -@__FUNCTION__.21247 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] -@built_in_decls = external global [471 x %struct.tree_node*] ; <[471 x %struct.tree_node*]*> [#uses=0] -@__FUNCTION__.21924 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] -@__FUNCTION__.21861 = external global [25 x i8] ; <[25 x i8]*> [#uses=0] -@global_dc = external global %struct.diagnostic_context* ; <%struct.diagnostic_context**> [#uses=0] -@__FUNCTION__.25246 = external global [32 x i8] ; <[32 x i8]*> [#uses=0] -@str7 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] -@stderr = external global %struct.FILE* ; <%struct.FILE**> [#uses=0] -@str8 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] -@str9 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] -@__FUNCTION__.27653 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] -@__FUNCTION__.27322 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] -@__FUNCTION__.27139 = external global [20 x i8] ; <[20 x i8]*> [#uses=0] -@__FUNCTION__.22462 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] -@str10 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] -@__FUNCTION__.25389 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] -@__FUNCTION__.25650 = external global [18 x i8] ; <[18 x i8]*> [#uses=0] -@str11 = external global [32 x i8] ; <[32 x i8]*> [#uses=0] -@str12 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] -@str13 = external global [44 x i8] ; <[44 x i8]*> [#uses=0] -@__FUNCTION__.27444 = external global [14 x i8] ; <[14 x i8]*> [#uses=0] -@timevar_enable = external global i8 ; <i8*> [#uses=0] -@__FUNCTION__.27533 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] -@flag_instrument_function_entry_exit = external global i32 ; <i32*> [#uses=0] -@__FUNCTION__.25331 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] -@__FUNCTION__.20965 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] -@str14 = external global [12 x i8] ; <[12 x i8]*> [#uses=0] -@__FUNCTION__.26053 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] -@__FUNCTION__.26004 = external global [20 x i8] ; <[20 x i8]*> [#uses=0] -@str15 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] -@__FUNCTION__.21584 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] -@str16 = external global [12 x i8] ; <[12 x i8]*> [#uses=0] -@__FUNCTION__.25903 = external global [28 x i8] ; <[28 x i8]*> [#uses=0] -@__FUNCTION__.22930 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] -@__FUNCTION__.23832 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] -@str17 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] -@__FUNCTION__.24620 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] -@__FUNCTION__.24582 = external global [30 x i8] ; <[30 x i8]*> [#uses=0] -@__FUNCTION__.21382 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] -@__FUNCTION__.21117 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] - - -declare void @push_gimplify_context() - -declare i32 @gimple_tree_hash(i8*) - -declare i32 @iterative_hash_expr(%struct.tree_node*, i32) - -declare i32 @gimple_tree_eq(i8*, i8*) - -declare i32 @operand_equal_p(%struct.tree_node*, %struct.tree_node*, i32) - -declare void @fancy_abort(i8*, i32, i8*) - -declare i8* @xcalloc(i32, i32) - -declare %struct.htab* @htab_create(i32, i32 (i8*)*, i32 (i8*, i8*)*, void (i8*)*) - -declare void @free(i8*) - -declare void @gimple_push_bind_expr(%struct.tree_node*) - -declare void @gimple_pop_bind_expr() - -declare %struct.tree_node* @gimple_current_bind_expr() - -declare fastcc void @gimple_push_condition() - -declare %struct.tree_node* @create_artificial_label() - -declare %struct.tree_node* @build_decl_stat(i32, %struct.tree_node*, %struct.tree_node*) - -declare void @tree_class_check_failed(%struct.tree_node*, i32, i8*, i32, i8*) - -declare %struct.tree_node* @create_tmp_var_name(i8*) - -declare i32 @strlen(i8*) - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) - -declare i32 @sprintf(i8*, i8*, ...) - -declare %struct.tree_node* @get_identifier(i8*) - -declare %struct.tree_node* @create_tmp_var_raw(%struct.tree_node*, i8*) - -declare %struct.tree_node* @build_qualified_type(%struct.tree_node*, i32) - -declare i8* @get_name(%struct.tree_node*) - -declare void @tree_operand_check_failed(i32, i32, i8*, i32, i8*) - -declare void @tree_check_failed(%struct.tree_node*, i8*, i32, i8*, ...) - -declare void @declare_tmp_vars(%struct.tree_node*, %struct.tree_node*) - -declare %struct.tree_node* @nreverse(%struct.tree_node*) - -declare void @gimple_add_tmp_var(%struct.tree_node*) - -declare void @record_vars(%struct.tree_node*) - -declare %struct.tree_node* @create_tmp_var(%struct.tree_node*, i8*) - -declare void @pop_gimplify_context(%struct.tree_node*) - -declare void @htab_delete(%struct.htab*) - -declare fastcc void @annotate_one_with_locus(%struct.tree_node*, i32, i32) - -declare void @annotate_with_locus(%struct.tree_node*, i32, i32) - -declare %struct.tree_node* @mostly_copy_tree_r(%struct.tree_node**, i32*, i8*) - -declare %struct.tree_node* @copy_tree_r(%struct.tree_node**, i32*, i8*) - -declare %struct.tree_node* @mark_decls_volatile_r(%struct.tree_node**, i32*, i8*) - -declare %struct.tree_node* @copy_if_shared_r(%struct.tree_node**, i32*, i8*) - -declare %struct.tree_node* @walk_tree(%struct.tree_node**, %struct.tree_node* (%struct.tree_node**, i32*, i8*)*, i8*, %struct.pointer_set_t*) - -declare %struct.tree_node* @unmark_visited_r(%struct.tree_node**, i32*, i8*) - -declare fastcc void @unshare_body(%struct.tree_node**, %struct.tree_node*) - -declare %struct.cgraph_node* @cgraph_node(%struct.tree_node*) - -declare fastcc void @unvisit_body(%struct.tree_node**, %struct.tree_node*) - -declare void @unshare_all_trees(%struct.tree_node*) - -declare %struct.tree_node* @unshare_expr(%struct.tree_node*) - -declare %struct.tree_node* @build_and_jump(%struct.tree_node**) - -declare %struct.tree_node* @build1_stat(i32, %struct.tree_node*, %struct.tree_node*) - -declare i32 @compare_case_labels(i8*, i8*) - -declare i32 @tree_int_cst_compare(%struct.tree_node*, %struct.tree_node*) - -declare void @sort_case_labels(%struct.tree_node*) - -declare void @tree_vec_elt_check_failed(i32, i32, i8*, i32, i8*) - -declare void @qsort(i8*, i32, i32, i32 (i8*, i8*)*) - -declare %struct.tree_node* @force_labels_r(%struct.tree_node**, i32*, i8*) - -declare fastcc void @canonicalize_component_ref(%struct.tree_node**) - -declare %struct.tree_node* @get_unwidened(%struct.tree_node*, %struct.tree_node*) - -declare fastcc void @maybe_with_size_expr(%struct.tree_node**) - -declare %struct.tree_node* @substitute_placeholder_in_expr(%struct.tree_node*, %struct.tree_node*) - -declare %struct.tree_node* @build2_stat(i32, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*) - -declare fastcc %struct.tree_node* @gimple_boolify(%struct.tree_node*) - -declare %struct.tree_node* @convert(%struct.tree_node*, %struct.tree_node*) - -declare %struct.tree_node* @gimplify_init_ctor_preeval_1(%struct.tree_node**, i32*, i8*) - -declare i64 @get_alias_set(%struct.tree_node*) - -declare i32 @alias_sets_conflict_p(i64, i64) - -declare fastcc i8 @cpt_same_type(%struct.tree_node*, %struct.tree_node*) zeroext - -declare %struct.tree_node* @check_pointer_types_r(%struct.tree_node**, i32*, i8*) - -declare %struct.tree_node* @voidify_wrapper_expr(%struct.tree_node*, %struct.tree_node*) - -declare i32 @integer_zerop(%struct.tree_node*) - -declare fastcc void @append_to_statement_list_1(%struct.tree_node*, %struct.tree_node**) - -declare %struct.tree_node* @alloc_stmt_list() - -declare void @tsi_link_after(%struct.tree_stmt_iterator*, %struct.tree_node*, i32) - -declare void @append_to_statement_list_force(%struct.tree_node*, %struct.tree_node**) - -declare void @append_to_statement_list(%struct.tree_node*, %struct.tree_node**) - -declare fastcc %struct.tree_node* @shortcut_cond_r(%struct.tree_node*, %struct.tree_node**, %struct.tree_node**) - -declare %struct.tree_node* @build3_stat(i32, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*) - -declare fastcc %struct.tree_node* @shortcut_cond_expr(%struct.tree_node*) - -declare %struct.tree_node* @expr_last(%struct.tree_node*) - -declare i8 @block_may_fallthru(%struct.tree_node*) zeroext - -declare fastcc void @gimple_pop_condition(%struct.tree_node**) - -declare %struct.tree_node* @gimple_build_eh_filter(%struct.tree_node*, %struct.tree_node*, %struct.tree_node*) - -declare void @annotate_all_with_locus(%struct.tree_node**, i32, i32) - -declare fastcc %struct.tree_node* @internal_get_tmp_var(%struct.tree_node*, %struct.tree_node**, %struct.tree_node**, i8 zeroext ) - -define i32 @gimplify_expr(%struct.tree_node** %expr_p, %struct.tree_node** %pre_p, %struct.tree_node** %post_p, i8 (%struct.tree_node*) zeroext * %gimple_test_f, i32 %fallback) { -entry: - %internal_post = alloca %struct.tree_node*, align 4 ; <%struct.tree_node**> [#uses=2] - %pre_p_addr.0 = select i1 false, %struct.tree_node** null, %struct.tree_node** %pre_p ; <%struct.tree_node**> [#uses=7] - %post_p_addr.0 = select i1 false, %struct.tree_node** %internal_post, %struct.tree_node** %post_p ; <%struct.tree_node**> [#uses=7] - br i1 false, label %bb277, label %bb191 - -bb191: ; preds = %entry - ret i32 0 - -bb277: ; preds = %entry - %tmp283 = call i32 null( %struct.tree_node** %expr_p, %struct.tree_node** %pre_p_addr.0, %struct.tree_node** %post_p_addr.0 ) ; <i32> [#uses=1] - switch i32 %tmp283, label %bb7478 [ - i32 0, label %cond_next289 - i32 -1, label %cond_next298 - ] - -cond_next289: ; preds = %bb277 - ret i32 0 - -cond_next298: ; preds = %bb277 - switch i32 0, label %bb7444 [ - i32 24, label %bb7463 - i32 25, label %bb7463 - i32 26, label %bb7463 - i32 27, label %bb7463 - i32 28, label %bb7463 - i32 33, label %bb4503 - i32 39, label %bb397 - i32 40, label %bb5650 - i32 41, label %bb4339 - i32 42, label %bb4350 - i32 43, label %bb4350 - i32 44, label %bb319 - i32 45, label %bb397 - i32 46, label %bb6124 - i32 47, label %bb7463 - i32 49, label %bb5524 - i32 50, label %bb1283 - i32 51, label %bb1289 - i32 52, label %bb1289 - i32 53, label %bb5969 - i32 54, label %bb408 - i32 56, label %bb5079 - i32 57, label %bb428 - i32 59, label %bb5965 - i32 74, label %bb4275 - i32 75, label %bb4275 - i32 76, label %bb4275 - i32 77, label %bb4275 - i32 91, label %bb1296 - i32 92, label %bb1296 - i32 96, label %bb1322 - i32 112, label %bb2548 - i32 113, label %bb2548 - i32 115, label %bb397 - i32 116, label %bb5645 - i32 117, label %bb1504 - i32 121, label %bb397 - i32 122, label %bb397 - i32 123, label %bb313 - i32 124, label %bb313 - i32 125, label %bb313 - i32 126, label %bb313 - i32 127, label %bb2141 - i32 128, label %cond_next5873 - i32 129, label %cond_next5873 - i32 130, label %bb4536 - i32 131, label %bb5300 - i32 132, label %bb5170 - i32 133, label %bb5519 - i32 134, label %bb5091 - i32 135, label %bb5083 - i32 136, label %bb5087 - i32 137, label %bb5382 - i32 139, label %bb7463 - i32 140, label %bb7463 - i32 142, label %bb5974 - i32 143, label %bb6049 - i32 147, label %bb6296 - i32 151, label %cond_next6474 - ] - -bb313: ; preds = %cond_next298, %cond_next298, %cond_next298, %cond_next298 - ret i32 0 - -bb319: ; preds = %cond_next298 - ret i32 0 - -bb397: ; preds = %cond_next298, %cond_next298, %cond_next298, %cond_next298, %cond_next298 - ret i32 0 - -bb408: ; preds = %cond_next298 - %tmp413 = call fastcc i32 @gimplify_cond_expr( %struct.tree_node** %expr_p, %struct.tree_node** %pre_p_addr.0, %struct.tree_node** %post_p_addr.0, %struct.tree_node* null, i32 %fallback ) ; <i32> [#uses=0] - ret i32 0 - -bb428: ; preds = %cond_next298 - ret i32 0 - -bb1283: ; preds = %cond_next298 - ret i32 0 - -bb1289: ; preds = %cond_next298, %cond_next298 - ret i32 0 - -bb1296: ; preds = %cond_next298, %cond_next298 - ret i32 0 - -bb1322: ; preds = %cond_next298 - ret i32 0 - -bb1504: ; preds = %cond_next298 - ret i32 0 - -bb2141: ; preds = %cond_next298 - ret i32 0 - -bb2548: ; preds = %cond_next298, %cond_next298 - %tmp2554 = load %struct.tree_node** %expr_p ; <%struct.tree_node*> [#uses=2] - %tmp2562 = and i32 0, 255 ; <i32> [#uses=1] - %tmp2569 = add i8 0, -4 ; <i8> [#uses=1] - icmp ugt i8 %tmp2569, 5 ; <i1>:0 [#uses=2] - %tmp2587 = load i8* null ; <i8> [#uses=1] - icmp eq i8 %tmp2587, 0 ; <i1>:1 [#uses=2] - %tmp2607 = load %struct.tree_node** null ; <%struct.tree_node*> [#uses=2] - br i1 false, label %bb2754, label %cond_next2617 - -cond_next2617: ; preds = %bb2548 - ret i32 0 - -bb2754: ; preds = %bb2548 - br i1 %0, label %cond_true2780, label %cond_next2783 - -cond_true2780: ; preds = %bb2754 - call void @tree_class_check_failed( %struct.tree_node* %tmp2554, i32 9, i8* getelementptr ([42 x i8]* @str, i32 0, i32 0), i32 1415, i8* getelementptr ([20 x i8]* @__FUNCTION__.22136, i32 0, i32 0) ) - unreachable - -cond_next2783: ; preds = %bb2754 - %tmp2825 = and i32 0, 255 ; <i32> [#uses=1] - %tmp2829 = load i32* null ; <i32> [#uses=1] - %tmp28292830 = trunc i32 %tmp2829 to i8 ; <i8> [#uses=1] - %tmp2832 = add i8 %tmp28292830, -4 ; <i8> [#uses=1] - icmp ugt i8 %tmp2832, 5 ; <i1>:2 [#uses=1] - icmp eq i8 0, 0 ; <i1>:3 [#uses=1] - %tmp28652866 = bitcast %struct.tree_node* %tmp2607 to %struct.tree_exp* ; <%struct.tree_exp*> [#uses=1] - %tmp2868 = getelementptr %struct.tree_exp* %tmp28652866, i32 0, i32 4, i32 0 ; <%struct.tree_node**> [#uses=1] - %tmp2870 = load %struct.tree_node** %tmp2868 ; <%struct.tree_node*> [#uses=1] - br i1 %1, label %cond_true2915, label %cond_next2927 - -cond_true2915: ; preds = %cond_next2783 - unreachable - -cond_next2927: ; preds = %cond_next2783 - %tmp2938 = load %struct.tree_node** null ; <%struct.tree_node*> [#uses=1] - %tmp2944 = load i32* null ; <i32> [#uses=1] - %tmp2946 = and i32 %tmp2944, 255 ; <i32> [#uses=1] - %tmp2949 = getelementptr [0 x i32]* @tree_code_type, i32 0, i32 %tmp2946 ; <i32*> [#uses=1] - %tmp2950 = load i32* %tmp2949 ; <i32> [#uses=1] - icmp eq i32 %tmp2950, 2 ; <i1>:4 [#uses=1] - br i1 %4, label %cond_next2954, label %cond_true2951 - -cond_true2951: ; preds = %cond_next2927 - call void @tree_class_check_failed( %struct.tree_node* %tmp2938, i32 2, i8* getelementptr ([42 x i8]* @str, i32 0, i32 0), i32 1415, i8* getelementptr ([20 x i8]* @__FUNCTION__.22136, i32 0, i32 0) ) - unreachable - -cond_next2954: ; preds = %cond_next2927 - br i1 %0, label %cond_true2991, label %cond_next2994 - -cond_true2991: ; preds = %cond_next2954 - unreachable - -cond_next2994: ; preds = %cond_next2954 - br i1 %1, label %cond_true3009, label %cond_next3021 - -cond_true3009: ; preds = %cond_next2994 - call void @tree_operand_check_failed( i32 0, i32 %tmp2562, i8* getelementptr ([42 x i8]* @str, i32 0, i32 0), i32 1415, i8* getelementptr ([20 x i8]* @__FUNCTION__.22136, i32 0, i32 0) ) - unreachable - -cond_next3021: ; preds = %cond_next2994 - br i1 %2, label %cond_true3044, label %cond_next3047 - -cond_true3044: ; preds = %cond_next3021 - call void @tree_class_check_failed( %struct.tree_node* %tmp2607, i32 9, i8* getelementptr ([42 x i8]* @str, i32 0, i32 0), i32 1415, i8* getelementptr ([20 x i8]* @__FUNCTION__.22136, i32 0, i32 0) ) - unreachable - -cond_next3047: ; preds = %cond_next3021 - br i1 %3, label %cond_true3062, label %cond_next3074 - -cond_true3062: ; preds = %cond_next3047 - call void @tree_operand_check_failed( i32 0, i32 %tmp2825, i8* getelementptr ([42 x i8]* @str, i32 0, i32 0), i32 1415, i8* getelementptr ([20 x i8]* @__FUNCTION__.22136, i32 0, i32 0) ) - unreachable - -cond_next3074: ; preds = %cond_next3047 - %tmp3084 = getelementptr %struct.tree_node* %tmp2870, i32 0, i32 0, i32 0, i32 1 ; <%struct.tree_node**> [#uses=1] - %tmp3085 = load %struct.tree_node** %tmp3084 ; <%struct.tree_node*> [#uses=1] - %tmp31043105 = bitcast %struct.tree_node* %tmp3085 to %struct.tree_type* ; <%struct.tree_type*> [#uses=1] - %tmp3106 = getelementptr %struct.tree_type* %tmp31043105, i32 0, i32 6 ; <i16*> [#uses=1] - %tmp31063107 = bitcast i16* %tmp3106 to i32* ; <i32*> [#uses=1] - %tmp3108 = load i32* %tmp31063107 ; <i32> [#uses=1] - xor i32 %tmp3108, 0 ; <i32>:5 [#uses=1] - %tmp81008368 = and i32 %5, 65024 ; <i32> [#uses=1] - icmp eq i32 %tmp81008368, 0 ; <i1>:6 [#uses=1] - br i1 %6, label %cond_next3113, label %bb3351 - -cond_next3113: ; preds = %cond_next3074 - ret i32 0 - -bb3351: ; preds = %cond_next3074 - %tmp3354 = call i8 @tree_ssa_useless_type_conversion( %struct.tree_node* %tmp2554 ) zeroext ; <i8> [#uses=1] - icmp eq i8 %tmp3354, 0 ; <i1>:7 [#uses=1] - %tmp3424 = load i32* null ; <i32> [#uses=1] - br i1 %7, label %cond_next3417, label %cond_true3356 - -cond_true3356: ; preds = %bb3351 - ret i32 0 - -cond_next3417: ; preds = %bb3351 - br i1 false, label %cond_true3429, label %cond_next4266 - -cond_true3429: ; preds = %cond_next3417 - %tmp3443 = and i32 %tmp3424, 255 ; <i32> [#uses=0] - ret i32 0 - -cond_next4266: ; preds = %cond_next3417 - %tmp4268 = load %struct.tree_node** %expr_p ; <%struct.tree_node*> [#uses=1] - icmp eq %struct.tree_node* %tmp4268, null ; <i1>:8 [#uses=1] - br i1 %8, label %bb4275, label %bb7463 - -bb4275: ; preds = %cond_next4266, %cond_next298, %cond_next298, %cond_next298, %cond_next298 - %tmp4289 = and i32 0, 255 ; <i32> [#uses=2] - %tmp4292 = getelementptr [0 x i32]* @tree_code_type, i32 0, i32 %tmp4289 ; <i32*> [#uses=1] - %tmp4293 = load i32* %tmp4292 ; <i32> [#uses=1] - %tmp42934294 = trunc i32 %tmp4293 to i8 ; <i8> [#uses=1] - %tmp4296 = add i8 %tmp42934294, -4 ; <i8> [#uses=1] - icmp ugt i8 %tmp4296, 5 ; <i1>:9 [#uses=1] - br i1 %9, label %cond_true4297, label %cond_next4300 - -cond_true4297: ; preds = %bb4275 - unreachable - -cond_next4300: ; preds = %bb4275 - %tmp4314 = load i8* null ; <i8> [#uses=1] - icmp eq i8 %tmp4314, 0 ; <i1>:10 [#uses=1] - br i1 %10, label %cond_true4315, label %cond_next4327 - -cond_true4315: ; preds = %cond_next4300 - call void @tree_operand_check_failed( i32 0, i32 %tmp4289, i8* getelementptr ([42 x i8]* @str, i32 0, i32 0), i32 3997, i8* getelementptr ([14 x i8]* @__FUNCTION__.26156, i32 0, i32 0) ) - unreachable - -cond_next4327: ; preds = %cond_next4300 - %tmp4336 = call i32 @gimplify_expr( %struct.tree_node** null, %struct.tree_node** %pre_p_addr.0, %struct.tree_node** %post_p_addr.0, i8 (%struct.tree_node*) zeroext * @is_gimple_val, i32 1 ) ; <i32> [#uses=0] - ret i32 0 - -bb4339: ; preds = %cond_next298 - ret i32 0 - -bb4350: ; preds = %cond_next298, %cond_next298 - ret i32 0 - -bb4503: ; preds = %cond_next298 - ret i32 0 - -bb4536: ; preds = %cond_next298 - ret i32 0 - -bb5079: ; preds = %cond_next298 - ret i32 0 - -bb5083: ; preds = %cond_next298 - ret i32 0 - -bb5087: ; preds = %cond_next298 - ret i32 0 - -bb5091: ; preds = %cond_next298 - ret i32 0 - -bb5170: ; preds = %cond_next298 - ret i32 0 - -bb5300: ; preds = %cond_next298 - ret i32 0 - -bb5382: ; preds = %cond_next298 - ret i32 0 - -bb5519: ; preds = %cond_next298 - ret i32 0 - -bb5524: ; preds = %cond_next298 - ret i32 0 - -bb5645: ; preds = %cond_next298 - ret i32 0 - -bb5650: ; preds = %cond_next298 - ret i32 0 - -cond_next5873: ; preds = %cond_next298, %cond_next298 - ret i32 0 - -bb5965: ; preds = %cond_next298 - %tmp5968 = call fastcc i32 @gimplify_cleanup_point_expr( %struct.tree_node** %expr_p, %struct.tree_node** %pre_p_addr.0 ) ; <i32> [#uses=0] - ret i32 0 - -bb5969: ; preds = %cond_next298 - %tmp5973 = call fastcc i32 @gimplify_target_expr( %struct.tree_node** %expr_p, %struct.tree_node** %pre_p_addr.0, %struct.tree_node** %post_p_addr.0 ) ; <i32> [#uses=0] - ret i32 0 - -bb5974: ; preds = %cond_next298 - ret i32 0 - -bb6049: ; preds = %cond_next298 - ret i32 0 - -bb6124: ; preds = %cond_next298 - ret i32 0 - -bb6296: ; preds = %cond_next298 - ret i32 0 - -cond_next6474: ; preds = %cond_next298 - icmp eq %struct.tree_node** %internal_post, %post_p_addr.0 ; <i1>:11 [#uses=1] - %iftmp.381.0 = select i1 %11, %struct.tree_node** null, %struct.tree_node** %post_p_addr.0 ; <%struct.tree_node**> [#uses=1] - %tmp6490 = call i32 @gimplify_expr( %struct.tree_node** null, %struct.tree_node** %pre_p_addr.0, %struct.tree_node** %iftmp.381.0, i8 (%struct.tree_node*) zeroext * %gimple_test_f, i32 %fallback ) ; <i32> [#uses=0] - %tmp6551 = call i32 @gimplify_expr( %struct.tree_node** null, %struct.tree_node** %pre_p_addr.0, %struct.tree_node** %post_p_addr.0, i8 (%struct.tree_node*) zeroext * @is_gimple_val, i32 1 ) ; <i32> [#uses=0] - ret i32 0 - -bb7444: ; preds = %cond_next298 - ret i32 0 - -bb7463: ; preds = %cond_next4266, %cond_next298, %cond_next298, %cond_next298, %cond_next298, %cond_next298, %cond_next298, %cond_next298, %cond_next298 - ret i32 0 - -bb7478: ; preds = %bb277 - ret i32 0 -} - -declare i8 @is_gimple_formal_tmp_rhs(%struct.tree_node*) zeroext - -declare void @gimplify_and_add(%struct.tree_node*, %struct.tree_node**) - -declare %struct.tree_node* @get_initialized_tmp_var(%struct.tree_node*, %struct.tree_node**, %struct.tree_node**) - -declare %struct.tree_node* @get_formal_tmp_var(%struct.tree_node*, %struct.tree_node**) - -declare fastcc void @gimplify_init_ctor_preeval(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, %struct.gimplify_init_ctor_preeval_data*) - -declare i8 @type_contains_placeholder_p(%struct.tree_node*) zeroext - -declare i8 @is_gimple_mem_rhs(%struct.tree_node*) zeroext - -declare fastcc i32 @gimplify_modify_expr_rhs(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i8 zeroext ) - -declare %struct.tree_node* @fold_indirect_ref(%struct.tree_node*) - -declare fastcc i32 @gimplify_compound_expr(%struct.tree_node**, %struct.tree_node**, i8 zeroext ) - -declare i8 @is_gimple_lvalue(%struct.tree_node*) zeroext - -declare void @categorize_ctor_elements(%struct.tree_node*, i64*, i64*, i64*, i8*) - -declare void @lhd_set_decl_assembler_name(%struct.tree_node*) - -declare i64 @int_size_in_bytes(%struct.tree_node*) - -declare i32 @can_move_by_pieces(i64, i32) - -declare i64 @count_type_elements(%struct.tree_node*) - -declare void @gimplify_stmt(%struct.tree_node**) - -declare %struct.tree_node* @get_base_address(%struct.tree_node*) - -declare fastcc void @gimplify_init_ctor_eval(%struct.tree_node*, %struct.tree_node*, %struct.tree_node**, i8 zeroext ) - -declare %struct.tree_node* @build_complex(%struct.tree_node*, %struct.tree_node*, %struct.tree_node*) - -declare i8 (%struct.tree_node*) zeroext * @rhs_predicate_for(%struct.tree_node*) - -declare %struct.tree_node* @build_vector(%struct.tree_node*, %struct.tree_node*) - -declare i8 @is_gimple_val(%struct.tree_node*) zeroext - -declare i8 @is_gimple_reg_type(%struct.tree_node*) zeroext - -declare fastcc i32 @gimplify_cond_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, %struct.tree_node*, i32) - -declare fastcc i32 @gimplify_modify_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i8 zeroext ) - -declare %struct.tree_node* @tree_cons_stat(%struct.tree_node*, %struct.tree_node*, %struct.tree_node*) - -declare %struct.tree_node* @build_fold_addr_expr(%struct.tree_node*) - -declare %struct.tree_node* @build_function_call_expr(%struct.tree_node*, %struct.tree_node*) - -declare i8 @is_gimple_addressable(%struct.tree_node*) zeroext - -declare i8 @is_gimple_reg(%struct.tree_node*) zeroext - -declare %struct.tree_node* @make_ssa_name(%struct.tree_node*, %struct.tree_node*) - -declare i8 @tree_ssa_useless_type_conversion(%struct.tree_node*) zeroext - -declare fastcc i32 @gimplify_self_mod_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i8 zeroext ) - -declare fastcc i32 @gimplify_compound_lval(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i32) - -declare %struct.tree_node* @get_callee_fndecl(%struct.tree_node*) - -declare %struct.tree_node* @fold_builtin(%struct.tree_node*, i8 zeroext ) - -declare void @error(i8*, ...) - -declare %struct.tree_node* @build_empty_stmt() - -declare i8 @fold_builtin_next_arg(%struct.tree_node*) zeroext - -declare fastcc i32 @gimplify_arg(%struct.tree_node**, %struct.tree_node**) - -declare i8 @is_gimple_call_addr(%struct.tree_node*) zeroext - -declare i32 @call_expr_flags(%struct.tree_node*) - -declare void @recalculate_side_effects(%struct.tree_node*) - -declare %struct.tree_node* @fold_convert(%struct.tree_node*, %struct.tree_node*) - -declare void @recompute_tree_invarant_for_addr_expr(%struct.tree_node*) - -declare i32 @gimplify_va_arg_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**) - -declare %struct.tree_node* @size_int_kind(i64, i32) - -declare %struct.tree_node* @size_binop(i32, %struct.tree_node*, %struct.tree_node*) - -declare %struct.tree_node* @build4_stat(i32, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*) - -declare void @gimplify_type_sizes(%struct.tree_node*, %struct.tree_node**) - -declare void @gimplify_one_sizepos(%struct.tree_node**, %struct.tree_node**) - -declare %struct.tree_node* @build_pointer_type(%struct.tree_node*) - -declare %struct.tree_node* @build_fold_indirect_ref(%struct.tree_node*) - -declare fastcc i32 @gimplify_bind_expr(%struct.tree_node**, %struct.tree_node*, %struct.tree_node**) - -declare fastcc void @gimplify_loop_expr(%struct.tree_node**, %struct.tree_node**) - -declare fastcc i32 @gimplify_switch_expr(%struct.tree_node**, %struct.tree_node**) - -declare %struct.tree_node* @decl_function_context(%struct.tree_node*) - -declare %struct.varray_head_tag* @varray_grow(%struct.varray_head_tag*, i32) - -declare fastcc void @gimplify_return_expr(%struct.tree_node*, %struct.tree_node**) - -declare fastcc i32 @gimplify_save_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**) - -declare fastcc i32 @gimplify_asm_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**) - -declare void @gimplify_to_stmt_list(%struct.tree_node**) - -declare fastcc i32 @gimplify_cleanup_point_expr(%struct.tree_node**, %struct.tree_node**) - -declare fastcc i32 @gimplify_target_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**) - -declare void @tsi_delink(%struct.tree_stmt_iterator*) - -declare void @tsi_link_before(%struct.tree_stmt_iterator*, %struct.tree_node*, i32) - -declare i8 @is_gimple_stmt(%struct.tree_node*) zeroext - -declare void @print_generic_expr(%struct.FILE*, %struct.tree_node*, i32) - -declare void @debug_tree(%struct.tree_node*) - -declare void @internal_error(i8*, ...) - -declare %struct.tree_node* @force_gimple_operand(%struct.tree_node*, %struct.tree_node**, i8 zeroext , %struct.tree_node*) - -declare i8 @is_gimple_reg_rhs(%struct.tree_node*) zeroext - -declare void @add_referenced_tmp_var(%struct.tree_node*) - -declare i8 @contains_placeholder_p(%struct.tree_node*) zeroext - -declare %struct.varray_head_tag* @varray_init(i32, i32, i8*) - -declare i32 @handled_component_p(%struct.tree_node*) - -declare void @varray_check_failed(%struct.varray_head_tag*, i32, i8*, i32, i8*) - -declare %struct.tree_node* @array_ref_low_bound(%struct.tree_node*) - -declare i8 @is_gimple_min_invariant(%struct.tree_node*) zeroext - -declare i8 @is_gimple_formal_tmp_reg(%struct.tree_node*) zeroext - -declare %struct.tree_node* @array_ref_element_size(%struct.tree_node*) - -declare %struct.tree_node* @component_ref_field_offset(%struct.tree_node*) - -declare i8 @is_gimple_min_lval(%struct.tree_node*) zeroext - -declare void @varray_underflow(%struct.varray_head_tag*, i8*, i32, i8*) - -declare i32 @list_length(%struct.tree_node*) - -declare i8 @parse_output_constraint(i8**, i32, i32, i32, i8*, i8*, i8*) zeroext - -declare i8* @xstrdup(i8*) - -declare %struct.tree_node* @build_string(i32, i8*) - -declare i8* @strchr(i8*, i32) - -declare %struct.tree_node* @build_tree_list_stat(%struct.tree_node*, %struct.tree_node*) - -declare %struct.tree_node* @chainon(%struct.tree_node*, %struct.tree_node*) - -declare i8 @parse_input_constraint(i8**, i32, i32, i32, i32, i8**, i8*, i8*) zeroext - -declare i8 @is_gimple_asm_val(%struct.tree_node*) zeroext - -declare void @gimplify_body(%struct.tree_node**, %struct.tree_node*, i8 zeroext ) - -declare void @timevar_push_1(i32) - -declare %struct.tree_node* @gimplify_parameters() - -declare %struct.tree_node* @expr_only(%struct.tree_node*) - -declare void @timevar_pop_1(i32) - -declare void @gimplify_function_tree(%struct.tree_node*) - -declare void @allocate_struct_function(%struct.tree_node*) - -declare %struct.tree_node* @make_tree_vec_stat(i32) - -declare %struct.tree_node* @tsi_split_statement_list_after(%struct.tree_stmt_iterator*) - -declare i8 @is_gimple_condexpr(%struct.tree_node*) zeroext - -declare %struct.tree_node* @invert_truthvalue(%struct.tree_node*) - -declare i8 @initializer_zerop(%struct.tree_node*) zeroext - -declare i32 @simple_cst_equal(%struct.tree_node*, %struct.tree_node*) - -declare i32 @aggregate_value_p(%struct.tree_node*, %struct.tree_node*) - -declare i32 @fwrite(i8*, i32, i32, %struct.FILE*) diff --git a/test/CodeGen/ARM/2007-05-03-BadPostIndexedLd.ll b/test/CodeGen/ARM/2007-05-03-BadPostIndexedLd.ll index c73b679..25ac52e 100644 --- a/test/CodeGen/ARM/2007-05-03-BadPostIndexedLd.ll +++ b/test/CodeGen/ARM/2007-05-03-BadPostIndexedLd.ll @@ -2,7 +2,7 @@ %struct.Connection = type { i32, [10 x i8], i32 } %struct.IntChunk = type { %struct.cppobjtype, i32, i32*, i32 } - %struct.Point = type { i8*, %struct.cppobjtype, i16 (%struct.Point*) signext *, i16 (%struct.Point*) signext *, double (%struct.Point*)*, double (%struct.Point*)* } + %struct.Point = type { i8*, %struct.cppobjtype, i16 (%struct.Point*) *, i16 (%struct.Point*) *, double (%struct.Point*)*, double (%struct.Point*)* } %struct.RefPoint = type { %struct.Point*, %struct.cppobjtype } %struct.ShortArray = type { %struct.cppobjtype, i32, i16* } %struct.TestObj = type { i8*, %struct.cppobjtype, i8, [32 x i8], i8*, i8**, i16, i16, i32, i32, i32, i32, float, double, %struct.cppobjtype, i32, i16*, i16**, i8**, i32, %struct.XyPoint, [3 x %struct.Connection], %struct.Point*, %struct.XyPoint*, i32, i8*, i8*, i16*, %struct.ShortArray, %struct.IntChunk, %struct.cppobjtype, %struct.cppobjtype, %struct.RefPoint, i32, %struct.cppobjtype, %struct.cppobjtype } diff --git a/test/CodeGen/ARM/2007-05-07-jumptoentry.ll b/test/CodeGen/ARM/2007-05-07-jumptoentry.ll deleted file mode 100644 index 26864f1..0000000 --- a/test/CodeGen/ARM/2007-05-07-jumptoentry.ll +++ /dev/null @@ -1,58 +0,0 @@ -; RUN: llc < %s | not grep 1_0 -; This used to create an extra branch to 'entry', LBB1_0. - -; ModuleID = 'bug.bc' -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:64" -target triple = "arm-apple-darwin8" - %struct.HexxagonMove = type { i8, i8, i32 } - %struct.HexxagonMoveList = type { i32, %struct.HexxagonMove* } - -define void @_ZN16HexxagonMoveList8sortListEv(%struct.HexxagonMoveList* %this) { -entry: - %tmp51 = getelementptr %struct.HexxagonMoveList* %this, i32 0, i32 0 ; <i32*> [#uses=1] - %tmp2 = getelementptr %struct.HexxagonMoveList* %this, i32 0, i32 1 ; <%struct.HexxagonMove**> [#uses=2] - br label %bb49 - -bb1: ; preds = %bb49 - %tmp3 = load %struct.HexxagonMove** %tmp2 ; <%struct.HexxagonMove*> [#uses=5] - %tmp6 = getelementptr %struct.HexxagonMove* %tmp3, i32 %i.1, i32 2 ; <i32*> [#uses=1] - %tmp7 = load i32* %tmp6 ; <i32> [#uses=2] - %tmp12 = add i32 %i.1, 1 ; <i32> [#uses=7] - %tmp14 = getelementptr %struct.HexxagonMove* %tmp3, i32 %tmp12, i32 2 ; <i32*> [#uses=1] - %tmp15 = load i32* %tmp14 ; <i32> [#uses=1] - %tmp16 = icmp slt i32 %tmp7, %tmp15 ; <i1> [#uses=1] - br i1 %tmp16, label %cond_true, label %bb49 - -cond_true: ; preds = %bb1 - %tmp23.0 = getelementptr %struct.HexxagonMove* %tmp3, i32 %i.1, i32 0 ; <i8*> [#uses=2] - %tmp67 = load i8* %tmp23.0 ; <i8> [#uses=1] - %tmp23.1 = getelementptr %struct.HexxagonMove* %tmp3, i32 %i.1, i32 1 ; <i8*> [#uses=1] - %tmp68 = load i8* %tmp23.1 ; <i8> [#uses=1] - %tmp3638 = getelementptr %struct.HexxagonMove* %tmp3, i32 %tmp12, i32 0 ; <i8*> [#uses=1] - tail call void @llvm.memcpy.i32( i8* %tmp23.0, i8* %tmp3638, i32 8, i32 4 ) - %tmp41 = load %struct.HexxagonMove** %tmp2 ; <%struct.HexxagonMove*> [#uses=3] - %tmp44.0 = getelementptr %struct.HexxagonMove* %tmp41, i32 %tmp12, i32 0 ; <i8*> [#uses=1] - store i8 %tmp67, i8* %tmp44.0 - %tmp44.1 = getelementptr %struct.HexxagonMove* %tmp41, i32 %tmp12, i32 1 ; <i8*> [#uses=1] - store i8 %tmp68, i8* %tmp44.1 - %tmp44.2 = getelementptr %struct.HexxagonMove* %tmp41, i32 %tmp12, i32 2 ; <i32*> [#uses=1] - store i32 %tmp7, i32* %tmp44.2 - br label %bb49 - -bb49: ; preds = %bb59, %cond_true, %bb1, %entry - %i.1 = phi i32 [ 0, %entry ], [ %tmp12, %bb1 ], [ %tmp12, %cond_true ], [ 0, %bb59 ] ; <i32> [#uses=5] - %move.2 = phi i32 [ 0, %entry ], [ 1, %cond_true ], [ %move.2, %bb1 ], [ 0, %bb59 ] ; <i32> [#uses=2] - %tmp52 = load i32* %tmp51 ; <i32> [#uses=1] - %tmp53 = add i32 %tmp52, -1 ; <i32> [#uses=1] - %tmp55 = icmp sgt i32 %tmp53, %i.1 ; <i1> [#uses=1] - br i1 %tmp55, label %bb1, label %bb59 - -bb59: ; preds = %bb49 - %tmp61 = icmp eq i32 %move.2, 0 ; <i1> [#uses=1] - br i1 %tmp61, label %return, label %bb49 - -return: ; preds = %bb59 - ret void -} - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) diff --git a/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll b/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll index 52937c1..55cea3a 100644 --- a/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll +++ b/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll @@ -12,7 +12,6 @@ entry: %i_addr = alloca i32 ; <i32*> [#uses=2] %q_addr = alloca i32 ; <i32*> [#uses=2] %retval = alloca i32, align 4 ; <i32*> [#uses=1] - "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] store i32 %i, i32* %i_addr store i32 %q, i32* %q_addr %tmp = load i32* %i_addr ; <i32> [#uses=1] diff --git a/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll b/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll index c925fa8..4894116 100644 --- a/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll +++ b/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll @@ -12,7 +12,6 @@ entry: %i_addr = alloca i32 ; <i32*> [#uses=2] %q_addr = alloca i32 ; <i32*> [#uses=2] %retval = alloca i32, align 4 ; <i32*> [#uses=1] - "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] store i32 %i, i32* %i_addr store i32 %q, i32* %q_addr %tmp = load i32* %i_addr ; <i32> [#uses=1] diff --git a/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll b/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll index 9df5af5..acbab8a 100644 --- a/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll +++ b/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll @@ -14,7 +14,6 @@ entry: %i_addr = alloca i32 ; <i32*> [#uses=2] %q_addr = alloca i32 ; <i32*> [#uses=2] %retval = alloca i32, align 4 ; <i32*> [#uses=1] - "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] store i32 %i, i32* %i_addr store i32 %q, i32* %q_addr %tmp = load i32* %i_addr ; <i32> [#uses=1] diff --git a/test/CodeGen/ARM/2007-05-31-RegScavengerInfiniteLoop.ll b/test/CodeGen/ARM/2007-05-31-RegScavengerInfiniteLoop.ll deleted file mode 100644 index 7ba2a19..0000000 --- a/test/CodeGen/ARM/2007-05-31-RegScavengerInfiniteLoop.ll +++ /dev/null @@ -1,237 +0,0 @@ -; RUN: llc < %s -; PR1424 - -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64" -target triple = "arm-unknown-linux-gnueabi" - %struct.AVClass = type { i8*, i8* (i8*)*, %struct.AVOption* } - %struct.AVCodec = type { i8*, i32, i32, i32, i32 (%struct.AVCodecContext*)*, i32 (%struct.AVCodecContext*, i8*, i32, i8*)*, i32 (%struct.AVCodecContext*)*, i32 (%struct.AVCodecContext*, i8*, i32*, i8*, i32)*, i32, %struct.AVCodec*, void (%struct.AVCodecContext*)*, %struct.AVRational*, i32* } - %struct.AVCodecContext = type { %struct.AVClass*, i32, i32, i32, i32, i32, i8*, i32, %struct.AVRational, i32, i32, i32, i32, i32, void (%struct.AVCodecContext*, %struct.AVFrame*, i32*, i32, i32, i32)*, i32, i32, i32, i32, i32, i32, i32, float, float, i32, i32, i32, i32, float, i32, i32, i32, %struct.AVCodec*, i8*, i32, i32, void (%struct.AVCodecContext*, i8*, i32, i32)*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, [32 x i8], i32, i32, i32, i32, i32, i32, i32, float, i32, i32 (%struct.AVCodecContext*, %struct.AVFrame*)*, void (%struct.AVCodecContext*, %struct.AVFrame*)*, i32, i32, i32, i32, i8*, i8*, float, float, i32, %struct.RcOverride*, i32, i8*, i32, i32, i32, float, float, float, float, i32, float, float, float, float, float, i32, i32, i32, i32*, i32, i32, i32, i32, %struct.AVRational, %struct.AVFrame*, i32, i32, [4 x i64], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 (%struct.AVCodecContext*, i32*)*, i32, i32, i32, i32, i32, i32, i8*, i32, i32, i32, i32, i32, i32, i16*, i16*, i32, i32, i32, i32, %struct.AVPaletteControl*, i32, i32 (%struct.AVCodecContext*, %struct.AVFrame*)*, i32, i32, i32, i32, i32, i32, i32, i32 (%struct.AVCodecContext*, i32 (%struct.AVCodecContext*, i8*)*, i8**, i32*, i32)*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 } - %struct.AVEvalExpr = type opaque - %struct.AVFrame = type { [4 x i8*], [4 x i32], [4 x i8*], i32, i32, i64, i32, i32, i32, i32, i32, i8*, i32, i8*, [2 x [2 x i16]*], i32*, i8, i8*, [4 x i64], i32, i32, i32, i32, i32, %struct.AVPanScan*, i32, i32, i16*, [2 x i8*] } - %struct.AVOption = type opaque - %struct.AVPaletteControl = type { i32, [256 x i32] } - %struct.AVPanScan = type { i32, i32, i32, [3 x [2 x i16]] } - %struct.AVRational = type { i32, i32 } - %struct.BlockNode = type { i16, i16, i8, [3 x i8], i8, i8 } - %struct.DSPContext = type { void (i16*, i8*, i32)*, void (i16*, i8*, i8*, i32)*, void (i16*, i8*, i32)*, void (i16*, i8*, i32)*, void (i16*, i8*, i32)*, void (i8*, i16*, i32)*, void (i8*, i16*, i32)*, i32 (i16*)*, void (i8*, i8*, i32, i32, i32, i32, i32)*, void (i8*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32)*, void (i16*)*, i32 (i8*, i32)*, i32 (i8*, i32)*, [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], i32 (i8*, i16*, i32)*, [4 x [4 x void (i8*, i8*, i32, i32)*]], [4 x [4 x void (i8*, i8*, i32, i32)*]], [4 x [4 x void (i8*, i8*, i32, i32)*]], [4 x [4 x void (i8*, i8*, i32, i32)*]], [2 x void (i8*, i8*, i8*, i32, i32)*], [11 x void (i8*, i8*, i32, i32, i32)*], [11 x void (i8*, i8*, i32, i32, i32)*], [2 x [16 x void (i8*, i8*, i32)*]], [2 x [16 x void (i8*, i8*, i32)*]], [2 x [16 x void (i8*, i8*, i32)*]], [2 x [16 x void (i8*, i8*, i32)*]], [8 x void (i8*, i8*, i32)*], [3 x void (i8*, i8*, i32, i32, i32, i32)*], [3 x void (i8*, i8*, i32, i32, i32, i32)*], [3 x void (i8*, i8*, i32, i32, i32, i32)*], [4 x [16 x void (i8*, i8*, i32)*]], [4 x [16 x void (i8*, i8*, i32)*]], [4 x [16 x void (i8*, i8*, i32)*]], [4 x [16 x void (i8*, i8*, i32)*]], [10 x void (i8*, i32, i32, i32, i32)*], [10 x void (i8*, i8*, i32, i32, i32, i32, i32)*], [2 x [16 x void (i8*, i8*, i32)*]], [2 x [16 x void (i8*, i8*, i32)*]], void (i8*, i32, i32, i32, i32, i32, i32)*, void (i8*, i32, i32, i32, i32, i32, i32)*, void (i8*, i32, i32, i32, i32, i32, i32)*, void (i8*, i32, i32, i32, i32, i32, i32)*, void (i8*, i16*, i32)*, [2 x [4 x i32 (i8*, i8*, i8*, i32, i32)*]], void (i8*, i8*, i32)*, void (i8*, i8*, i8*, i32)*, void (i8*, i8*, i8*, i32, i32*, i32*)*, void (i32*, i32*, i32)*, void (i8*, i32, i32, i32, i8*)*, void (i8*, i32, i32, i32, i8*)*, void (i8*, i32, i32, i32, i8*)*, void (i8*, i32, i32, i32, i8*)*, void (i8*, i32, i32, i32)*, void (i8*, i32, i32, i32)*, void ([4 x [4 x i16]]*, i8*, [40 x i8]*, [40 x [2 x i16]]*, i32, i32, i32, i32, i32)*, void (i8*, i32, i32)*, void (i8*, i32, i32)*, void (i8*, i32)*, void (float*, float*, i32)*, void (float*, float*, i32)*, void (float*, float*, float*, i32)*, void (float*, float*, float*, float*, i32, i32, i32)*, void (i16*, float*, i32)*, void (i16*)*, void (i16*)*, void (i16*)*, void (i8*, i32, i16*)*, void (i8*, i32, i16*)*, [64 x i8], i32, i32 (i16*, i16*, i16*, i32)*, void (i16*, i16*, i32)*, void (i8*, i16*, i32)*, void (i8*, i16*, i32)*, void (i8*, i16*, i32)*, void (i8*, i16*, i32)*, void ([4 x i16]*)*, void (i32*, i32*, i32*, i32*, i32*, i32*, i32)*, void (i32*, i32)*, void (i8*, i32, i8**, i32, i32, i32, i32, i32, %struct.slice_buffer*, i32, i8*)*, void (i8*, i32, i32)*, [4 x void (i8*, i32, i8*, i32, i32, i32)*], void (i16*)*, void (i16*, i32)*, void (i16*, i32)*, void (i16*, i32)*, void (i8*, i32)*, void (i8*, i32)*, [16 x void (i8*, i8*, i32, i32)*] } - %struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i32, i32, [40 x i8] } - %struct.GetBitContext = type { i8*, i8*, i32*, i32, i32, i32, i32 } - %struct.MJpegContext = type opaque - %struct.MotionEstContext = type { %struct.AVCodecContext*, i32, [4 x [2 x i32]], [4 x [2 x i32]], i8*, i8*, [2 x i8*], i8*, i32, i32*, i32*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x [4 x i8*]], [4 x [4 x i8*]], i32, i32, i32, i32, i32, [4 x void (i8*, i8*, i32, i32)*]*, [4 x void (i8*, i8*, i32, i32)*]*, [16 x void (i8*, i8*, i32)*]*, [16 x void (i8*, i8*, i32)*]*, [4097 x i8]*, i8*, i32 (%struct.MpegEncContext*, i32*, i32*, i32, i32, i32, i32, i32)* } - %struct.MpegEncContext = type { %struct.AVCodecContext*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.PutBitContext, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.Picture*, %struct.Picture**, %struct.Picture**, i32, i32, [8 x %struct.MpegEncContext*], %struct.Picture, %struct.Picture, %struct.Picture, %struct.Picture, %struct.Picture*, %struct.Picture*, %struct.Picture*, [3 x i8*], [3 x i32], i16*, [3 x i16*], [20 x i16], i32, i32, i8*, i8*, i8*, i8*, i8*, [16 x i16]*, [3 x [16 x i16]*], i32, i8*, i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i32, i32, i32, i32, i32*, i32, i32, i32, i32, i32, i32, i32, [5 x i32], i32, i32, i32, i32, %struct.DSPContext, i32, i32, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x [2 x [2 x i16]*]], [2 x [2 x [2 x [2 x i16]*]]], [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x [2 x [2 x i16]*]], [2 x [2 x [2 x [2 x i16]*]]], [2 x i8*], [2 x [2 x i8*]], i32, i32, i32, [2 x [4 x [2 x i32]]], [2 x [2 x i32]], [2 x [2 x [2 x i32]]], i8*, [2 x [64 x i16]], %struct.MotionEstContext, i32, i32, i32, i32, i32, i32, i16*, [6 x i32], [6 x i32], [3 x i8*], i32*, [64 x i16], [64 x i16], [64 x i16], [64 x i16], i32, i32, i32, i32, i32, i8*, i8*, i8*, i8*, i8*, i8*, [8 x i32], [64 x i32]*, [64 x i32]*, [2 x [64 x i16]]*, [2 x [64 x i16]]*, [12 x i32], %struct.ScanTable, %struct.ScanTable, %struct.ScanTable, %struct.ScanTable, [64 x i32]*, [2 x i32], [64 x i16]*, i8*, i64, i64, i32, i32, %struct.RateControlContext, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i32, i32, %struct.GetBitContext, i32, i32, i32, %struct.ParseContext, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i16, i16, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x [2 x i32]], [2 x [2 x i32]], [2 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.PutBitContext, %struct.PutBitContext, i32, i32, i32, i32, i32, i32, i8*, i32, i32, i32, i32, i32, [3 x i32], %struct.MJpegContext*, [3 x i32], [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x [65 x [65 x [2 x i32]]]]*, i32, i32, %struct.GetBitContext, i32, i32, i32, i8*, i32, [2 x [2 x i32]], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x i32], i32, i32, i32, i32, i8*, i32, [12 x i16*], [64 x i16]*, [8 x [64 x i16]]*, i32 (%struct.MpegEncContext*, [64 x i16]*)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, i32 (%struct.MpegEncContext*, i16*, i32, i32, i32*)*, i32 (%struct.MpegEncContext*, i16*, i32, i32, i32*)*, void (%struct.MpegEncContext*, i16*)* } - %struct.ParseContext = type { i8*, i32, i32, i32, i32, i32, i32, i32 } - %struct.Picture = type { [4 x i8*], [4 x i32], [4 x i8*], i32, i32, i64, i32, i32, i32, i32, i32, i8*, i32, i8*, [2 x [2 x i16]*], i32*, i8, i8*, [4 x i64], i32, i32, i32, i32, i32, %struct.AVPanScan*, i32, i32, i16*, [2 x i8*], [3 x i8*], [2 x [2 x i16]*], i32*, [2 x i32], i32, i32, i32, i32, [2 x [16 x i32]], [2 x i32], i32, i32, i16*, i16*, i8*, i32*, i32 } - %struct.Plane = type { i32, i32, [8 x [4 x %struct.SubBand]] } - %struct.Predictor = type { double, double, double } - %struct.PutBitContext = type { i32, i32, i8*, i8*, i8* } - %struct.RangeCoder = type { i32, i32, i32, i32, [256 x i8], [256 x i8], i8*, i8*, i8* } - %struct.RateControlContext = type { %struct.FILE*, i32, %struct.RateControlEntry*, double, [5 x %struct.Predictor], double, double, double, double, double, [5 x double], i32, i32, [5 x i64], [5 x i64], [5 x i64], [5 x i64], [5 x i32], i32, i8*, float, i32, %struct.AVEvalExpr* } - %struct.RateControlEntry = type { i32, float, i32, i32, i32, i32, i32, i64, i32, float, i32, i32, i32, i32, i32, i32 } - %struct.RcOverride = type { i32, i32, i32, float } - %struct.ScanTable = type { i8*, [64 x i8], [64 x i8] } - %struct.SnowContext = type { %struct.AVCodecContext*, %struct.RangeCoder, %struct.DSPContext, %struct.AVFrame, %struct.AVFrame, %struct.AVFrame, [8 x %struct.AVFrame], %struct.AVFrame, [32 x i8], [4224 x i8], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [8 x [2 x i16]*], [8 x i32*], i32*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x %struct.Plane], %struct.BlockNode*, [1024 x i32], i32, %struct.slice_buffer, %struct.MpegEncContext } - %struct.SubBand = type { i32, i32, i32, i32, i32, i32*, i32, i32, i32, %struct.x_and_coeff*, %struct.SubBand*, [519 x [32 x i8]] } - %struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 } - %struct.slice_buffer = type { i32**, i32**, i32, i32, i32, i32, i32* } - %struct.x_and_coeff = type { i16, i16 } - -define fastcc void @iterative_me(%struct.SnowContext* %s) { -entry: - %state = alloca [4224 x i8], align 8 ; <[4224 x i8]*> [#uses=0] - %best_rd4233 = alloca i32, align 4 ; <i32*> [#uses=0] - %tmp21 = getelementptr %struct.SnowContext* %s, i32 0, i32 36 ; <i32*> [#uses=2] - br label %bb4198 - -bb79: ; preds = %bb4189.preheader - br i1 false, label %cond_next239, label %cond_true - -cond_true: ; preds = %bb79 - ret void - -cond_next239: ; preds = %bb79 - %tmp286 = alloca i8, i32 0 ; <i8*> [#uses=0] - ret void - -bb4198: ; preds = %bb4189.preheader, %entry - br i1 false, label %bb4189.preheader, label %bb4204 - -bb4189.preheader: ; preds = %bb4198 - br i1 false, label %bb79, label %bb4198 - -bb4204: ; preds = %bb4198 - br i1 false, label %bb4221, label %cond_next4213 - -cond_next4213: ; preds = %bb4204 - ret void - -bb4221: ; preds = %bb4204 - br i1 false, label %bb5242.preheader, label %UnifiedReturnBlock - -bb5242.preheader: ; preds = %bb4221 - br label %bb5242 - -bb4231: ; preds = %bb5233 - %tmp4254.sum = add i32 0, 1 ; <i32> [#uses=2] - br i1 false, label %bb4559, label %cond_next4622 - -bb4559: ; preds = %bb4231 - ret void - -cond_next4622: ; preds = %bb4231 - %tmp4637 = load i16* null ; <i16> [#uses=1] - %tmp46374638 = sext i16 %tmp4637 to i32 ; <i32> [#uses=1] - %tmp4642 = load i16* null ; <i16> [#uses=1] - %tmp46424643 = sext i16 %tmp4642 to i32 ; <i32> [#uses=1] - %tmp4648 = load i16* null ; <i16> [#uses=1] - %tmp46484649 = sext i16 %tmp4648 to i32 ; <i32> [#uses=1] - %tmp4653 = getelementptr %struct.BlockNode* null, i32 %tmp4254.sum, i32 0 ; <i16*> [#uses=1] - %tmp4654 = load i16* %tmp4653 ; <i16> [#uses=1] - %tmp46544655 = sext i16 %tmp4654 to i32 ; <i32> [#uses=1] - %tmp4644 = add i32 %tmp46374638, 2 ; <i32> [#uses=1] - %tmp4650 = add i32 %tmp4644, %tmp46424643 ; <i32> [#uses=1] - %tmp4656 = add i32 %tmp4650, %tmp46484649 ; <i32> [#uses=1] - %tmp4657 = add i32 %tmp4656, %tmp46544655 ; <i32> [#uses=2] - %tmp4658 = ashr i32 %tmp4657, 2 ; <i32> [#uses=1] - %tmp4662 = load i16* null ; <i16> [#uses=1] - %tmp46624663 = sext i16 %tmp4662 to i32 ; <i32> [#uses=1] - %tmp4672 = getelementptr %struct.BlockNode* null, i32 0, i32 1 ; <i16*> [#uses=1] - %tmp4673 = load i16* %tmp4672 ; <i16> [#uses=1] - %tmp46734674 = sext i16 %tmp4673 to i32 ; <i32> [#uses=1] - %tmp4678 = getelementptr %struct.BlockNode* null, i32 %tmp4254.sum, i32 1 ; <i16*> [#uses=1] - %tmp4679 = load i16* %tmp4678 ; <i16> [#uses=1] - %tmp46794680 = sext i16 %tmp4679 to i32 ; <i32> [#uses=1] - %tmp4669 = add i32 %tmp46624663, 2 ; <i32> [#uses=1] - %tmp4675 = add i32 %tmp4669, 0 ; <i32> [#uses=1] - %tmp4681 = add i32 %tmp4675, %tmp46734674 ; <i32> [#uses=1] - %tmp4682 = add i32 %tmp4681, %tmp46794680 ; <i32> [#uses=2] - %tmp4683 = ashr i32 %tmp4682, 2 ; <i32> [#uses=1] - %tmp4703 = load i32* %tmp21 ; <i32> [#uses=1] - %tmp4707 = shl i32 %tmp4703, 0 ; <i32> [#uses=4] - %tmp4710 = load %struct.BlockNode** null ; <%struct.BlockNode*> [#uses=6] - %tmp4713 = mul i32 %tmp4707, %mb_y.4 ; <i32> [#uses=1] - %tmp4715 = add i32 %tmp4713, %mb_x.7 ; <i32> [#uses=7] - store i8 0, i8* null - store i8 0, i8* null - %tmp47594761 = bitcast %struct.BlockNode* null to i8* ; <i8*> [#uses=2] - call void @llvm.memcpy.i32( i8* null, i8* %tmp47594761, i32 10, i32 0 ) - %tmp4716.sum5775 = add i32 %tmp4715, 1 ; <i32> [#uses=1] - %tmp4764 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4716.sum5775 ; <%struct.BlockNode*> [#uses=1] - %tmp47644766 = bitcast %struct.BlockNode* %tmp4764 to i8* ; <i8*> [#uses=1] - %tmp4716.sum5774 = add i32 %tmp4715, %tmp4707 ; <i32> [#uses=0] - %tmp47704772 = bitcast %struct.BlockNode* null to i8* ; <i8*> [#uses=1] - %tmp4774 = add i32 %tmp4707, 1 ; <i32> [#uses=1] - %tmp4716.sum5773 = add i32 %tmp4774, %tmp4715 ; <i32> [#uses=1] - %tmp4777 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4716.sum5773 ; <%struct.BlockNode*> [#uses=1] - %tmp47774779 = bitcast %struct.BlockNode* %tmp4777 to i8* ; <i8*> [#uses=1] - %tmp4781 = icmp slt i32 %mb_x.7, 0 ; <i1> [#uses=1] - %tmp4788 = or i1 %tmp4781, %tmp4784 ; <i1> [#uses=2] - br i1 %tmp4788, label %cond_true4791, label %cond_next4794 - -cond_true4791: ; preds = %cond_next4622 - unreachable - -cond_next4794: ; preds = %cond_next4622 - %tmp4797 = icmp slt i32 %mb_x.7, %tmp4707 ; <i1> [#uses=1] - br i1 %tmp4797, label %cond_next4803, label %cond_true4800 - -cond_true4800: ; preds = %cond_next4794 - unreachable - -cond_next4803: ; preds = %cond_next4794 - %tmp4825 = ashr i32 %tmp4657, 12 ; <i32> [#uses=1] - shl i32 %tmp4682, 4 ; <i32>:0 [#uses=1] - %tmp4828 = and i32 %0, -64 ; <i32> [#uses=1] - %tmp4831 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4715, i32 2 ; <i8*> [#uses=0] - %tmp4826 = add i32 %tmp4828, %tmp4825 ; <i32> [#uses=1] - %tmp4829 = add i32 %tmp4826, 0 ; <i32> [#uses=1] - %tmp4835 = add i32 %tmp4829, 0 ; <i32> [#uses=1] - store i32 %tmp4835, i32* null - %tmp48534854 = trunc i32 %tmp4658 to i16 ; <i16> [#uses=1] - %tmp4856 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4715, i32 0 ; <i16*> [#uses=1] - store i16 %tmp48534854, i16* %tmp4856 - %tmp48574858 = trunc i32 %tmp4683 to i16 ; <i16> [#uses=1] - %tmp4860 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4715, i32 1 ; <i16*> [#uses=1] - store i16 %tmp48574858, i16* %tmp4860 - %tmp4866 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4715, i32 4 ; <i8*> [#uses=0] - br i1 false, label %bb4933, label %cond_false4906 - -cond_false4906: ; preds = %cond_next4803 - call void @llvm.memcpy.i32( i8* %tmp47594761, i8* null, i32 10, i32 0 ) - call void @llvm.memcpy.i32( i8* %tmp47644766, i8* null, i32 10, i32 0 ) - call void @llvm.memcpy.i32( i8* %tmp47704772, i8* null, i32 10, i32 0 ) - call void @llvm.memcpy.i32( i8* %tmp47774779, i8* null, i32 10, i32 0 ) - br label %bb5215 - -bb4933: ; preds = %bb5215, %cond_next4803 - br i1 false, label %cond_true4944, label %bb5215 - -cond_true4944: ; preds = %bb4933 - %tmp4982 = load i32* %tmp21 ; <i32> [#uses=1] - %tmp4986 = shl i32 %tmp4982, 0 ; <i32> [#uses=2] - %tmp4992 = mul i32 %tmp4986, %mb_y.4 ; <i32> [#uses=1] - %tmp4994 = add i32 %tmp4992, %mb_x.7 ; <i32> [#uses=5] - %tmp4995.sum5765 = add i32 %tmp4994, 1 ; <i32> [#uses=1] - %tmp5043 = getelementptr %struct.BlockNode* null, i32 %tmp4995.sum5765 ; <%struct.BlockNode*> [#uses=1] - %tmp50435045 = bitcast %struct.BlockNode* %tmp5043 to i8* ; <i8*> [#uses=2] - call void @llvm.memcpy.i32( i8* null, i8* %tmp50435045, i32 10, i32 0 ) - %tmp4995.sum5764 = add i32 %tmp4994, %tmp4986 ; <i32> [#uses=1] - %tmp5049 = getelementptr %struct.BlockNode* null, i32 %tmp4995.sum5764 ; <%struct.BlockNode*> [#uses=1] - %tmp50495051 = bitcast %struct.BlockNode* %tmp5049 to i8* ; <i8*> [#uses=2] - call void @llvm.memcpy.i32( i8* null, i8* %tmp50495051, i32 10, i32 0 ) - %tmp4995.sum5763 = add i32 0, %tmp4994 ; <i32> [#uses=1] - %tmp5056 = getelementptr %struct.BlockNode* null, i32 %tmp4995.sum5763 ; <%struct.BlockNode*> [#uses=1] - %tmp50565058 = bitcast %struct.BlockNode* %tmp5056 to i8* ; <i8*> [#uses=1] - br i1 %tmp4788, label %cond_true5070, label %cond_next5073 - -cond_true5070: ; preds = %cond_true4944 - unreachable - -cond_next5073: ; preds = %cond_true4944 - %tmp5139 = getelementptr %struct.BlockNode* null, i32 %tmp4994, i32 1 ; <i16*> [#uses=0] - %tmp5145 = getelementptr %struct.BlockNode* null, i32 %tmp4994, i32 4 ; <i8*> [#uses=0] - call void @llvm.memcpy.i32( i8* %tmp50435045, i8* null, i32 10, i32 0 ) - call void @llvm.memcpy.i32( i8* %tmp50495051, i8* null, i32 10, i32 0 ) - call void @llvm.memcpy.i32( i8* %tmp50565058, i8* null, i32 10, i32 0 ) - br label %bb5215 - -bb5215: ; preds = %cond_next5073, %bb4933, %cond_false4906 - %i4232.3 = phi i32 [ 0, %cond_false4906 ], [ 0, %cond_next5073 ], [ 0, %bb4933 ] ; <i32> [#uses=1] - %tmp5217 = icmp slt i32 %i4232.3, 4 ; <i1> [#uses=1] - br i1 %tmp5217, label %bb4933, label %bb5220 - -bb5220: ; preds = %bb5215 - br i1 false, label %bb5230, label %cond_true5226 - -cond_true5226: ; preds = %bb5220 - ret void - -bb5230: ; preds = %bb5220 - %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1] - br label %bb5233 - -bb5233: ; preds = %bb5233.preheader, %bb5230 - %indvar = phi i32 [ 0, %bb5233.preheader ], [ %indvar.next, %bb5230 ] ; <i32> [#uses=2] - %mb_x.7 = shl i32 %indvar, 1 ; <i32> [#uses=4] - br i1 false, label %bb4231, label %bb5239 - -bb5239: ; preds = %bb5233 - %indvar.next37882 = add i32 %indvar37881, 1 ; <i32> [#uses=1] - br label %bb5242 - -bb5242: ; preds = %bb5239, %bb5242.preheader - %indvar37881 = phi i32 [ 0, %bb5242.preheader ], [ %indvar.next37882, %bb5239 ] ; <i32> [#uses=2] - %mb_y.4 = shl i32 %indvar37881, 1 ; <i32> [#uses=3] - br i1 false, label %bb5233.preheader, label %bb5248 - -bb5233.preheader: ; preds = %bb5242 - %tmp4784 = icmp slt i32 %mb_y.4, 0 ; <i1> [#uses=1] - br label %bb5233 - -bb5248: ; preds = %bb5242 - ret void - -UnifiedReturnBlock: ; preds = %bb4221 - ret void -} - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) diff --git a/test/CodeGen/ARM/2008-04-04-ScavengerAssert.ll b/test/CodeGen/ARM/2008-04-04-ScavengerAssert.ll index 234c7b6..6b39a76 100644 --- a/test/CodeGen/ARM/2008-04-04-ScavengerAssert.ll +++ b/test/CodeGen/ARM/2008-04-04-ScavengerAssert.ll @@ -46,7 +46,8 @@ bb17.i: ; preds = %cond_next119.i cond_true53.i: ; preds = %bb17.i ret { i16, %struct.rnode* }* null cond_false99.i: ; preds = %bb17.i - %tmp106.i = malloc %struct.ch_set ; <%struct.ch_set*> [#uses=1] + %malloccall = tail call i8* @malloc(i32 trunc (i64 mul nuw (i64 ptrtoint (i1** getelementptr (i1** null, i32 1) to i64), i64 2) to i32)) + %tmp106.i = bitcast i8* %malloccall to %struct.ch_set* br i1 false, label %bb126.i, label %cond_next119.i cond_next119.i: ; preds = %cond_false99.i, %bb42 %curr_ptr.0.reg2mem.0.i = phi %struct.ch_set* [ %tmp106.i, %cond_false99.i ], [ null, %bb42 ] ; <%struct.ch_set*> [#uses=2] @@ -58,3 +59,5 @@ bb126.i: ; preds = %cond_next119.i, %cond_false99.i bb78: ; preds = %entry ret { i16, %struct.rnode* }* null } + +declare noalias i8* @malloc(i32) diff --git a/test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll b/test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll index 77418be..c9a8a67 100644 --- a/test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll +++ b/test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll @@ -188,11 +188,6 @@ bb231: ; preds = %bb226 ret void } - %struct.III_psy_xmin = type { [22 x double], [13 x [3 x double]] } - %struct.III_scalefac_t = type { [22 x i32], [13 x [3 x i32]] } - %struct.gr_info = type { i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32*, [4 x i32] } - %struct.lame_global_flags = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i8*, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, float, float, float, float, i32, i32, i32, i32, i32, i32, i32, i32 } - define fastcc void @outer_loop2(%struct.lame_global_flags* %gfp, double* %xr, i32 %targ_bits, double* %best_noise, %struct.III_psy_xmin* %l3_xmin, i32* %l3_enc, %struct.III_scalefac_t* %scalefac, %struct.gr_info* %cod_info, i32 %ch) { entry: %cod_info.20128.1 = getelementptr %struct.gr_info* %cod_info, i32 0, i32 20, i32 1 ; <i32*> [#uses=1] diff --git a/test/CodeGen/ARM/2008-09-14-CoalescerBug.ll b/test/CodeGen/ARM/2008-09-14-CoalescerBug.ll deleted file mode 100644 index 5f9d9ae..0000000 --- a/test/CodeGen/ARM/2008-09-14-CoalescerBug.ll +++ /dev/null @@ -1,29 +0,0 @@ -; RUN: llc < %s -mtriple=arm-apple-darwin - -@"\01LC1" = external constant [288 x i8] ; <[288 x i8]*> [#uses=1] - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind - -define i32 @main(i32 %argc, i8** %argv) nounwind { -entry: - br label %bb.i - -bb.i: ; preds = %bb.i, %entry - %i.01.i = phi i32 [ 0, %entry ], [ %indvar.next52, %bb.i ] ; <i32> [#uses=1] - %indvar.next52 = add i32 %i.01.i, 1 ; <i32> [#uses=2] - %exitcond53 = icmp eq i32 %indvar.next52, 15 ; <i1> [#uses=1] - br i1 %exitcond53, label %bb.i33.loopexit, label %bb.i - -bb.i33.loopexit: ; preds = %bb.i - %0 = malloc [347 x i8] ; <[347 x i8]*> [#uses=2] - %.sub = getelementptr [347 x i8]* %0, i32 0, i32 0 ; <i8*> [#uses=1] - call void @llvm.memcpy.i32( i8* %.sub, i8* getelementptr ([288 x i8]* @"\01LC1", i32 0, i32 0), i32 287, i32 1 ) nounwind - br label %bb.i28 - -bb.i28: ; preds = %bb.i28, %bb.i33.loopexit - br i1 false, label %repeat_fasta.exit, label %bb.i28 - -repeat_fasta.exit: ; preds = %bb.i28 - free [347 x i8]* %0 - unreachable -} diff --git a/test/CodeGen/ARM/2009-03-07-SpillerBug.ll b/test/CodeGen/ARM/2009-03-07-SpillerBug.ll index 0ec17ae..377bbd2 100644 --- a/test/CodeGen/ARM/2009-03-07-SpillerBug.ll +++ b/test/CodeGen/ARM/2009-03-07-SpillerBug.ll @@ -1,16 +1,15 @@ ; RUN: llc < %s -mtriple=armv6-apple-darwin9 -mattr=+vfp2 ; rdar://6653182 - %struct.ggBRDF = type { i32 (...)** } - %struct.ggPoint2 = type { [2 x double] } - %struct.ggPoint3 = type { [3 x double] } - %struct.ggSpectrum = type { [8 x float] } - %struct.ggSphere = type { %struct.ggPoint3, double } - %struct.mrDiffuseAreaSphereLuminaire = type { %struct.mrSphere, %struct.ggSpectrum } - %struct.mrDiffuseCosineSphereLuminaire = type { %struct.mrDiffuseAreaSphereLuminaire } - %struct.mrSphere = type { %struct.ggBRDF, %struct.ggSphere } -declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind +%struct.ggBRDF = type { i32 (...)** } +%struct.ggPoint2 = type { [2 x double] } +%struct.ggPoint3 = type { [3 x double] } +%struct.ggSpectrum = type { [8 x float] } +%struct.ggSphere = type { %struct.ggPoint3, double } +%struct.mrDiffuseAreaSphereLuminaire = type { %struct.mrSphere, %struct.ggSpectrum } +%struct.mrDiffuseCosineSphereLuminaire = type { %struct.mrDiffuseAreaSphereLuminaire } +%struct.mrSphere = type { %struct.ggBRDF, %struct.ggSphere } declare double @llvm.sqrt.f64(double) nounwind readonly @@ -20,59 +19,61 @@ declare double @acos(double) nounwind readonly define i32 @_ZNK34mrDiffuseSolidAngleSphereLuminaire18selectVisiblePointERK8ggPoint3RK9ggVector3RK8ggPoint2dRS0_Rd(%struct.mrDiffuseCosineSphereLuminaire* nocapture %this, %struct.ggPoint3* nocapture %x, %struct.ggPoint3* nocapture %unnamed_arg, %struct.ggPoint2* nocapture %uv, double %unnamed_arg2, %struct.ggPoint3* nocapture %on_light, double* nocapture %invProb) nounwind { entry: - %0 = call double @llvm.sqrt.f64(double 0.000000e+00) nounwind ; <double> [#uses=4] - %1 = fcmp ult double 0.000000e+00, %0 ; <i1> [#uses=1] - br i1 %1, label %bb3, label %bb7 + %0 = call double @llvm.sqrt.f64(double 0.000000e+00) nounwind + %1 = fcmp ult double 0.000000e+00, %0 + br i1 %1, label %bb3, label %bb7 -bb3: ; preds = %entry - %2 = fdiv double 1.000000e+00, 0.000000e+00 ; <double> [#uses=1] - %3 = fmul double 0.000000e+00, %2 ; <double> [#uses=2] - %4 = call double @llvm.sqrt.f64(double 0.000000e+00) nounwind ; <double> [#uses=1] - %5 = fdiv double 1.000000e+00, %4 ; <double> [#uses=2] - %6 = fmul double %3, %5 ; <double> [#uses=2] - %7 = fmul double 0.000000e+00, %5 ; <double> [#uses=2] - %8 = fmul double %3, %7 ; <double> [#uses=1] - %9 = fsub double %8, 0.000000e+00 ; <double> [#uses=1] - %10 = fmul double 0.000000e+00, %6 ; <double> [#uses=1] - %11 = fsub double 0.000000e+00, %10 ; <double> [#uses=1] - %12 = fsub double -0.000000e+00, %11 ; <double> [#uses=1] - %13 = fmul double %0, %0 ; <double> [#uses=2] - %14 = fsub double %13, 0.000000e+00 ; <double> [#uses=1] - %15 = call double @llvm.sqrt.f64(double %14) ; <double> [#uses=1] - %16 = fmul double 0.000000e+00, %15 ; <double> [#uses=1] - %17 = fdiv double %16, %0 ; <double> [#uses=1] - %18 = fadd double 0.000000e+00, %17 ; <double> [#uses=1] - %19 = call double @acos(double %18) nounwind readonly ; <double> [#uses=1] - %20 = load double* null, align 4 ; <double> [#uses=1] - %21 = fmul double %20, 0x401921FB54442D18 ; <double> [#uses=1] - %22 = call double @sin(double %19) nounwind readonly ; <double> [#uses=2] - %23 = fmul double %22, 0.000000e+00 ; <double> [#uses=2] - %24 = fmul double %6, %23 ; <double> [#uses=1] - %25 = fmul double %7, %23 ; <double> [#uses=1] - %26 = call double @sin(double %21) nounwind readonly ; <double> [#uses=1] - %27 = fmul double %22, %26 ; <double> [#uses=2] - %28 = fmul double %9, %27 ; <double> [#uses=1] - %29 = fmul double %27, %12 ; <double> [#uses=1] - %30 = fadd double %24, %28 ; <double> [#uses=1] - %31 = fadd double 0.000000e+00, %29 ; <double> [#uses=1] - %32 = fadd double %25, 0.000000e+00 ; <double> [#uses=1] - %33 = fadd double %30, 0.000000e+00 ; <double> [#uses=1] - %34 = fadd double %31, 0.000000e+00 ; <double> [#uses=1] - %35 = fadd double %32, 0.000000e+00 ; <double> [#uses=1] - %36 = bitcast %struct.ggPoint3* %x to i8* ; <i8*> [#uses=1] - call void @llvm.memcpy.i32(i8* null, i8* %36, i32 24, i32 4) nounwind - store double %33, double* null, align 8 - br i1 false, label %_Z20ggRaySphereIntersectRK6ggRay3RK8ggSphereddRd.exit, label %bb5.i.i.i +bb3: ; preds = %entry + %2 = fdiv double 1.000000e+00, 0.000000e+00 + %3 = fmul double 0.000000e+00, %2 + %4 = call double @llvm.sqrt.f64(double 0.000000e+00) nounwind + %5 = fdiv double 1.000000e+00, %4 + %6 = fmul double %3, %5 + %7 = fmul double 0.000000e+00, %5 + %8 = fmul double %3, %7 + %9 = fsub double %8, 0.000000e+00 + %10 = fmul double 0.000000e+00, %6 + %11 = fsub double 0.000000e+00, %10 + %12 = fsub double -0.000000e+00, %11 + %13 = fmul double %0, %0 + %14 = fsub double %13, 0.000000e+00 + %15 = call double @llvm.sqrt.f64(double %14) + %16 = fmul double 0.000000e+00, %15 + %17 = fdiv double %16, %0 + %18 = fadd double 0.000000e+00, %17 + %19 = call double @acos(double %18) nounwind readonly + %20 = load double* null, align 4 + %21 = fmul double %20, 0x401921FB54442D18 + %22 = call double @sin(double %19) nounwind readonly + %23 = fmul double %22, 0.000000e+00 + %24 = fmul double %6, %23 + %25 = fmul double %7, %23 + %26 = call double @sin(double %21) nounwind readonly + %27 = fmul double %22, %26 + %28 = fmul double %9, %27 + %29 = fmul double %27, %12 + %30 = fadd double %24, %28 + %31 = fadd double 0.000000e+00, %29 + %32 = fadd double %25, 0.000000e+00 + %33 = fadd double %30, 0.000000e+00 + %34 = fadd double %31, 0.000000e+00 + %35 = fadd double %32, 0.000000e+00 + %36 = bitcast %struct.ggPoint3* %x to i8* + call void @llvm.memcpy.p0i8.p0i8.i32(i8* null, i8* %36, i32 24, i32 4, i1 false) + store double %33, double* null, align 8 + br i1 false, label %_Z20ggRaySphereIntersectRK6ggRay3RK8ggSphereddRd.exit, label %bb5.i.i.i -bb5.i.i.i: ; preds = %bb3 - unreachable +bb5.i.i.i: ; preds = %bb3 + unreachable -_Z20ggRaySphereIntersectRK6ggRay3RK8ggSphereddRd.exit: ; preds = %bb3 - %37 = fsub double %13, 0.000000e+00 ; <double> [#uses=0] - %38 = fsub double -0.000000e+00, %34 ; <double> [#uses=0] - %39 = fsub double -0.000000e+00, %35 ; <double> [#uses=0] - ret i32 1 +_Z20ggRaySphereIntersectRK6ggRay3RK8ggSphereddRd.exit: ; preds = %bb3 + %37 = fsub double %13, 0.000000e+00 + %38 = fsub double -0.000000e+00, %34 + %39 = fsub double -0.000000e+00, %35 + ret i32 1 -bb7: ; preds = %entry - ret i32 0 +bb7: ; preds = %entry + ret i32 0 } + +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind diff --git a/test/CodeGen/ARM/2009-06-12-RegScavengerAssert.ll b/test/CodeGen/ARM/2009-06-12-RegScavengerAssert.ll deleted file mode 100644 index 27888d7..0000000 --- a/test/CodeGen/ARM/2009-06-12-RegScavengerAssert.ll +++ /dev/null @@ -1,77 +0,0 @@ -; RUN: llc < %s -mtriple=armv6-apple-darwin - - type { i32, i32, %struct.D_Sym**, [3 x %struct.D_Sym*] } ; type %0 - type { i32, %struct.D_Reduction** } ; type %1 - type { i32, %struct.D_RightEpsilonHint* } ; type %2 - type { i32, %struct.D_ErrorRecoveryHint* } ; type %3 - type { i32, i32, %struct.D_Reduction**, [3 x %struct.D_Reduction*] } ; type %4 - %struct.D_ErrorRecoveryHint = type { i16, i16, i8* } - %struct.D_ParseNode = type { i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (%struct.D_Parser*, %struct.d_loc_t*, i8**)*, i8*, i8* } - %struct.D_Parser = type { i8*, void (%struct.D_Parser*, %struct.d_loc_t*, i8**)*, %struct.D_Scope*, void (%struct.D_Parser*)*, %struct.D_ParseNode* (%struct.D_Parser*, i32, %struct.D_ParseNode**)*, void (%struct.D_ParseNode*)*, %struct.d_loc_t, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } - %struct.D_ParserTables = type { i32, %struct.D_State*, i16*, i32, i32, %struct.D_Symbol*, void (%struct.D_Parser*, %struct.d_loc_t*, i8**)*, i32, %struct.D_Pass*, i32 } - %struct.D_Pass = type { i8*, i32, i32, i32 } - %struct.D_Reduction = type { i16, i16, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)*, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)*, i16, i16, i32, i32, i32, i32, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)** } - %struct.D_RightEpsilonHint = type { i16, i16, %struct.D_Reduction* } - %struct.D_Scope = type { i8, %struct.D_Sym*, %struct.D_SymHash*, %struct.D_Sym*, %struct.D_Scope*, %struct.D_Scope*, %struct.D_Scope*, %struct.D_Scope*, %struct.D_Scope* } - %struct.D_Shift = type { i16, i8, i8, i32, i32, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)* } - %struct.D_State = type { i8*, i32, %1, %2, %3, %struct.D_Shift**, i32 (i8**, i32*, i32*, i16*, i32*, i8*, i32*)*, i8*, i8, i8, i8, i8*, %struct.D_Shift***, i32 } - %struct.D_Sym = type { i8*, i32, i32, %struct.D_Sym*, %struct.D_Sym*, i32 } - %struct.D_SymHash = type { i32, i32, %0 } - %struct.D_Symbol = type { i32, i8*, i32 } - %struct.PNode = type { i32, i32, i32, i32, %struct.D_Reduction*, %struct.D_Shift*, i32, %struct.VecPNode, i32, i8, i8, %struct.PNode*, %struct.PNode*, %struct.PNode*, %struct.PNode*, i8*, i8*, %struct.D_Scope*, i8*, %struct.D_ParseNode } - %struct.PNodeHash = type { %struct.PNode**, i32, i32, i32, %struct.PNode* } - %struct.Parser = type { %struct.D_Parser, i8*, i8*, %struct.D_ParserTables*, i32, i32, i32, i32, i32, i32, i32, %struct.PNodeHash, %struct.SNodeHash, %struct.Reduction*, %struct.Shift*, %struct.D_Scope*, %struct.SNode*, i32, %struct.Reduction*, %struct.Shift*, i32, %struct.PNode*, %struct.SNode*, %struct.ZNode*, %4, %struct.ShiftResult*, %struct.D_Shift, %struct.Parser*, i8* } - %struct.Reduction = type { %struct.ZNode*, %struct.SNode*, %struct.D_Reduction*, %struct.SNode*, i32, %struct.Reduction* } - %struct.SNode = type { %struct.D_State*, %struct.D_Scope*, i8*, %struct.d_loc_t, i32, %struct.PNode*, %struct.VecZNode, i32, %struct.SNode*, %struct.SNode* } - %struct.SNodeHash = type { %struct.SNode**, i32, i32, i32, %struct.SNode*, %struct.SNode* } - %struct.Shift = type { %struct.SNode*, %struct.Shift* } - %struct.ShiftResult = type { %struct.D_Shift*, %struct.d_loc_t } - %struct.VecPNode = type { i32, i32, %struct.PNode**, [3 x %struct.PNode*] } - %struct.VecSNode = type { i32, i32, %struct.SNode**, [3 x %struct.SNode*] } - %struct.VecZNode = type { i32, i32, %struct.ZNode**, [3 x %struct.ZNode*] } - %struct.ZNode = type { %struct.PNode*, %struct.VecSNode } - %struct.d_loc_t = type { i8*, i8*, i32, i32, i32 } - -declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind - -define fastcc i32 @exhaustive_parse(%struct.Parser* %p, i32 %state) nounwind { -entry: - store i8* undef, i8** undef, align 4 - %0 = getelementptr %struct.Parser* %p, i32 0, i32 0, i32 6 ; <%struct.d_loc_t*> [#uses=1] - %1 = bitcast %struct.d_loc_t* %0 to i8* ; <i8*> [#uses=1] - call void @llvm.memcpy.i32(i8* undef, i8* %1, i32 20, i32 4) - br label %bb10 - -bb10: ; preds = %bb30, %bb29, %bb26, %entry - br i1 undef, label %bb18, label %bb20 - -bb18: ; preds = %bb10 - br i1 undef, label %bb20, label %bb19 - -bb19: ; preds = %bb18 - br label %bb20 - -bb20: ; preds = %bb19, %bb18, %bb10 - br i1 undef, label %bb21, label %bb22 - -bb21: ; preds = %bb20 - unreachable - -bb22: ; preds = %bb20 - br i1 undef, label %bb24, label %bb26 - -bb24: ; preds = %bb22 - unreachable - -bb26: ; preds = %bb22 - br i1 undef, label %bb10, label %bb29 - -bb29: ; preds = %bb26 - br i1 undef, label %bb10, label %bb30 - -bb30: ; preds = %bb29 - br i1 undef, label %bb31, label %bb10 - -bb31: ; preds = %bb30 - unreachable -} diff --git a/test/CodeGen/ARM/2009-08-21-PostRAKill3.ll b/test/CodeGen/ARM/2009-08-21-PostRAKill3.ll index 90a4a42..382038e 100644 --- a/test/CodeGen/ARM/2009-08-21-PostRAKill3.ll +++ b/test/CodeGen/ARM/2009-08-21-PostRAKill3.ll @@ -14,7 +14,8 @@ entry: br i1 %p, label %bb8, label %bb1 bb1: ; preds = %entry - %0 = malloc %struct.Village ; <%struct.Village*> [#uses=3] + %malloccall = tail call i8* @malloc(i32 ptrtoint (%struct.Village* getelementptr (%struct.Village* null, i32 1) to i32)) + %0 = bitcast i8* %malloccall to %struct.Village* %exp2 = call double @ldexp(double 1.000000e+00, i32 %level) nounwind ; <double> [#uses=1] %.c = fptosi double %exp2 to i32 ; <i32> [#uses=1] store i32 %.c, i32* null @@ -29,3 +30,4 @@ bb8: ; preds = %entry } declare double @ldexp(double, i32) +declare noalias i8* @malloc(i32) diff --git a/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll b/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll index 397eba4..8bde748 100644 --- a/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll +++ b/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll @@ -1,32 +1,35 @@ ; RUN: llc < %s -mtriple=arm-apple-darwin9 -march=arm | FileCheck %s +; CHECK: L_LSDA_0: + + %struct.A = type { i32* } define void @"\01-[MyFunction Name:]"() { entry: - %save_filt.1 = alloca i32 ; <i32*> [#uses=2] - %save_eptr.0 = alloca i8* ; <i8**> [#uses=2] - %a = alloca %struct.A ; <%struct.A*> [#uses=3] - %eh_exception = alloca i8* ; <i8**> [#uses=5] - %eh_selector = alloca i32 ; <i32*> [#uses=3] - %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] - call void @_ZN1AC1Ev(%struct.A* %a) - invoke void @_Z3barv() + %save_filt.1 = alloca i32 + %save_eptr.0 = alloca i8* + %a = alloca %struct.A + %eh_exception = alloca i8* + %eh_selector = alloca i32 + %"alloca point" = bitcast i32 0 to i32 + call void @_ZN1AC1Ev(%struct.A* %a) + invoke void @_Z3barv() to label %invcont unwind label %lpad invcont: ; preds = %entry - call void @_ZN1AD1Ev(%struct.A* %a) nounwind + call void @_ZN1AD1Ev(%struct.A* %a) nounwind br label %return bb: ; preds = %ppad - %eh_select = load i32* %eh_selector ; <i32> [#uses=1] + %eh_select = load i32* %eh_selector store i32 %eh_select, i32* %save_filt.1, align 4 - %eh_value = load i8** %eh_exception ; <i8*> [#uses=1] + %eh_value = load i8** %eh_exception store i8* %eh_value, i8** %save_eptr.0, align 4 - call void @_ZN1AD1Ev(%struct.A* %a) nounwind - %0 = load i8** %save_eptr.0, align 4 ; <i8*> [#uses=1] + call void @_ZN1AD1Ev(%struct.A* %a) nounwind + %0 = load i8** %save_eptr.0, align 4 store i8* %0, i8** %eh_exception, align 4 - %1 = load i32* %save_filt.1, align 4 ; <i32> [#uses=1] + %1 = load i32* %save_filt.1, align 4 store i32 %1, i32* %eh_selector, align 4 br label %Unwind @@ -34,10 +37,10 @@ return: ; preds = %invcont ret void lpad: ; preds = %entry - %eh_ptr = call i8* @llvm.eh.exception() ; <i8*> [#uses=1] + %eh_ptr = call i8* @llvm.eh.exception() store i8* %eh_ptr, i8** %eh_exception - %eh_ptr1 = load i8** %eh_exception ; <i8*> [#uses=1] - %eh_select2 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr1, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 0) ; <i32> [#uses=1] + %eh_ptr1 = load i8** %eh_exception + %eh_select2 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr1, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 0) store i32 %eh_select2, i32* %eh_selector br label %ppad @@ -45,20 +48,20 @@ ppad: ; preds = %lpad br label %bb Unwind: ; preds = %bb - %eh_ptr3 = load i8** %eh_exception ; <i8*> [#uses=1] - call void @_Unwind_SjLj_Resume(i8* %eh_ptr3) + %eh_ptr3 = load i8** %eh_exception + call void @_Unwind_SjLj_Resume(i8* %eh_ptr3) unreachable } define linkonce_odr void @_ZN1AC1Ev(%struct.A* %this) { entry: - %this_addr = alloca %struct.A* ; <%struct.A**> [#uses=2] - %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] + %this_addr = alloca %struct.A* + %"alloca point" = bitcast i32 0 to i32 store %struct.A* %this, %struct.A** %this_addr - %0 = call i8* @_Znwm(i32 4) ; <i8*> [#uses=1] - %1 = bitcast i8* %0 to i32* ; <i32*> [#uses=1] - %2 = load %struct.A** %this_addr, align 4 ; <%struct.A*> [#uses=1] - %3 = getelementptr inbounds %struct.A* %2, i32 0, i32 0 ; <i32**> [#uses=1] + %0 = call i8* @_Znwm(i32 4) + %1 = bitcast i8* %0 to i32* + %2 = load %struct.A** %this_addr, align 4 + %3 = getelementptr inbounds %struct.A* %2, i32 0, i32 0 store i32* %1, i32** %3, align 4 br label %return @@ -70,14 +73,14 @@ declare i8* @_Znwm(i32) define linkonce_odr void @_ZN1AD1Ev(%struct.A* %this) nounwind { entry: - %this_addr = alloca %struct.A* ; <%struct.A**> [#uses=2] - %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] + %this_addr = alloca %struct.A* + %"alloca point" = bitcast i32 0 to i32 store %struct.A* %this, %struct.A** %this_addr - %0 = load %struct.A** %this_addr, align 4 ; <%struct.A*> [#uses=1] - %1 = getelementptr inbounds %struct.A* %0, i32 0, i32 0 ; <i32**> [#uses=1] - %2 = load i32** %1, align 4 ; <i32*> [#uses=1] - %3 = bitcast i32* %2 to i8* ; <i8*> [#uses=1] - call void @_ZdlPv(i8* %3) nounwind + %0 = load %struct.A** %this_addr, align 4 + %1 = getelementptr inbounds %struct.A* %0, i32 0, i32 0 + %2 = load i32** %1, align 4 + %3 = bitcast i32* %2 to i8* + call void @_ZdlPv(i8* %3) nounwind br label %bb bb: ; preds = %entry @@ -86,17 +89,16 @@ bb: ; preds = %entry return: ; preds = %bb ret void } -;CHECK: L_LSDA_0: declare void @_ZdlPv(i8*) nounwind declare void @_Z3barv() -declare i8* @llvm.eh.exception() nounwind +declare i8* @llvm.eh.exception() nounwind readonly -declare i32 @llvm.eh.selector.i32(i8*, i8*, ...) nounwind +declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind -declare i32 @llvm.eh.typeid.for.i32(i8*) nounwind +declare i32 @llvm.eh.typeid.for(i8*) nounwind declare i32 @__gxx_personality_sj0(...) diff --git a/test/CodeGen/ARM/2009-10-30.ll b/test/CodeGen/ARM/2009-10-30.ll index 87d1a8b..e46ab1e 100644 --- a/test/CodeGen/ARM/2009-10-30.ll +++ b/test/CodeGen/ARM/2009-10-30.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=arm-linux-gnueabi | FileCheck %s +; RUN: llc < %s -mtriple=armv6-linux-gnueabi | FileCheck %s ; This test checks that the address of the varg arguments is correctly ; computed when there are 5 or more regular arguments. diff --git a/test/CodeGen/ARM/2009-11-01-NeonMoves.ll b/test/CodeGen/ARM/2009-11-01-NeonMoves.ll index 34f7519..a18a830 100644 --- a/test/CodeGen/ARM/2009-11-01-NeonMoves.ll +++ b/test/CodeGen/ARM/2009-11-01-NeonMoves.ll @@ -19,7 +19,7 @@ entry: %5 = call <2 x float> @llvm.arm.neon.vpadd.v2f32(<2 x float> %3, <2 x float> %4) nounwind ; <<2 x float>> [#uses=2] %6 = call <2 x float> @llvm.arm.neon.vpadd.v2f32(<2 x float> %5, <2 x float> %5) nounwind ; <<2 x float>> [#uses=2] %7 = shufflevector <2 x float> %6, <2 x float> %6, <4 x i32> <i32 0, i32 1, i32 2, i32 3> ; <<4 x float>> [#uses=2] -;CHECK: vmov +;CHECK: vorr %8 = call <4 x float> @llvm.arm.neon.vrsqrte.v4f32(<4 x float> %7) nounwind ; <<4 x float>> [#uses=3] %9 = fmul <4 x float> %8, %8 ; <<4 x float>> [#uses=1] %10 = call <4 x float> @llvm.arm.neon.vrsqrts.v4f32(<4 x float> %9, <4 x float> %7) nounwind ; <<4 x float>> [#uses=1] diff --git a/test/CodeGen/ARM/2010-08-04-StackVariable.ll b/test/CodeGen/ARM/2010-08-04-StackVariable.ll index 25d38ed..6aeaa26 100644 --- a/test/CodeGen/ARM/2010-08-04-StackVariable.ll +++ b/test/CodeGen/ARM/2010-08-04-StackVariable.ll @@ -31,7 +31,7 @@ return: ; preds = %bb2 ret i32 %.0, !dbg !29 } -define linkonce_odr void @_ZN4SValC1Ev(%struct.SVal* %this) nounwind ssp align 2 { +define linkonce_odr void @_ZN4SValC1Ev(%struct.SVal* %this) nounwind ssp align 2 { entry: %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] call void @llvm.dbg.value(metadata !{%struct.SVal* %this}, i64 0, metadata !31), !dbg !34 diff --git a/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll b/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll index ee443fe..99db637 100644 --- a/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll +++ b/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll @@ -1,7 +1,7 @@ ; RUN: llc %s -mtriple=arm-linux-gnueabi -filetype=obj -o - | \ ; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=BASIC %s ; RUN: llc %s -mtriple=armv7-linux-gnueabi -march=arm -mcpu=cortex-a8 \ -; RUN: -mattr=-neon -mattr=+vfp2 \ +; RUN: -mattr=-neon,-vfp3,+vfp2 \ ; RUN: -arm-reserve-r9 -filetype=obj -o - | \ ; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=CORTEXA8 %s diff --git a/test/CodeGen/ARM/2011-06-16-TailCallByVal.ll b/test/CodeGen/ARM/2011-06-16-TailCallByVal.ll new file mode 100644 index 0000000..7baacfe --- /dev/null +++ b/test/CodeGen/ARM/2011-06-16-TailCallByVal.ll @@ -0,0 +1,20 @@ +; RUN: llc < %s -arm-tail-calls=1 | FileCheck %s +target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32" +target triple = "thumbv7-apple-darwin10" + +%struct.A = type <{ i16, i16, i32, i16, i16, i32, i16, [8 x %struct.B], [418 x i8], %struct.C }> +%struct.B = type <{ i32, i16, i16 }> +%struct.C = type { i16, i32, i16, i16 } + +; CHECK: f +; CHECK: push {r1, r2, r3} +; CHECK: add sp, #12 +; CHECK: b.w _puts + +define void @f(i8* %s, %struct.A* nocapture byval %a) nounwind optsize { +entry: + %puts = tail call i32 @puts(i8* %s) + ret void +} + +declare i32 @puts(i8* nocapture) nounwind diff --git a/test/CodeGen/ARM/2011-06-29-MergeGlobalsAlign.ll b/test/CodeGen/ARM/2011-06-29-MergeGlobalsAlign.ll new file mode 100644 index 0000000..1b5b8a9 --- /dev/null +++ b/test/CodeGen/ARM/2011-06-29-MergeGlobalsAlign.ll @@ -0,0 +1,12 @@ +; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 | FileCheck %s +; CHECK: .zerofill __DATA,__bss,__MergedGlobals,16,2 + +%struct.config = type { i16, i16, i16, i16 } + +@prev = external global [0 x i16] +@max_lazy_match = internal unnamed_addr global i32 0, align 4 +@read_buf = external global i32 (i8*, i32)* +@window = external global [0 x i8] +@lookahead = internal unnamed_addr global i32 0, align 4 +@eofile.b = internal unnamed_addr global i1 false +@ins_h = internal unnamed_addr global i32 0, align 4 diff --git a/test/CodeGen/ARM/2011-07-10-GlobalMergeBug.ll b/test/CodeGen/ARM/2011-07-10-GlobalMergeBug.ll new file mode 100644 index 0000000..2970cd2 --- /dev/null +++ b/test/CodeGen/ARM/2011-07-10-GlobalMergeBug.ll @@ -0,0 +1,8 @@ +; RUN: llc < %s | FileCheck %s +target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32" +target triple = "thumbv7-apple-darwin10" + +; CHECK-NOT: MergedGlobals + +@a = internal unnamed_addr global i1 false +@b = internal global [64 x i8] zeroinitializer, align 64 diff --git a/test/CodeGen/ARM/arm-modifier.ll b/test/CodeGen/ARM/arm-modifier.ll index 0a7bb6c..396de37 100644 --- a/test/CodeGen/ARM/arm-modifier.ll +++ b/test/CodeGen/ARM/arm-modifier.ll @@ -46,9 +46,9 @@ ret void define void @f3() nounwind { entry: ; CHECK: f3 -; CHECK: stm r{{[0-9]+}}, {[[REG1:(r[0-9]+)]], r{{[0-9]+}}} -; CHECK: adds lr, [[REG1]] -; CHECK: ldm r{{[0-9]+}}, {r{{[0-9]+}}, r{{[0-9]+}}} +; CHECK: stm {{lr|r[0-9]+}}, {[[REG1:(r[0-9]+)]], r{{[0-9]+}}} +; CHECK: adds {{lr|r[0-9]+}}, [[REG1]] +; CHECK: ldm {{lr|r[0-9]+}}, {r{{[0-9]+}}, r{{[0-9]+}}} %tmp = load i64* @f3_var, align 4 %tmp1 = load i64* @f3_var2, align 4 %0 = call i64 asm sideeffect "stm ${0:m}, ${1:M}\0A\09adds $3, $1\0A\09", "=*m,=r,1,r"(i64** @f3_ptr, i64 %tmp, i64 %tmp1) nounwind diff --git a/test/CodeGen/ARM/armv4.ll b/test/CodeGen/ARM/armv4.ll index ef722de..6b213d5 100644 --- a/test/CodeGen/ARM/armv4.ll +++ b/test/CodeGen/ARM/armv4.ll @@ -1,7 +1,7 @@ -; RUN: llc < %s -mtriple=arm-unknown-eabi | FileCheck %s -check-prefix=THUMB -; RUN: llc < %s -mtriple=arm-unknown-eabi -mcpu=strongarm | FileCheck %s -check-prefix=ARM -; RUN: llc < %s -mtriple=arm-unknown-eabi -mcpu=cortex-a8 | FileCheck %s -check-prefix=THUMB -; RUN: llc < %s -mtriple=arm-unknown-eabi -mattr=+v6 | FileCheck %s -check-prefix=THUMB +; RUN: llc < %s -mtriple=armv4t-unknown-eabi | FileCheck %s -check-prefix=THUMB +; RUN: llc < %s -mtriple=armv4-unknown-eabi -mcpu=strongarm | FileCheck %s -check-prefix=ARM +; RUN: llc < %s -mtriple=armv7-unknown-eabi -mcpu=cortex-a8 | FileCheck %s -check-prefix=THUMB +; RUN: llc < %s -mtriple=armv6-unknown-eabi | FileCheck %s -check-prefix=THUMB ; RUN: llc < %s -mtriple=armv4-unknown-eabi | FileCheck %s -check-prefix=ARM ; RUN: llc < %s -mtriple=armv4t-unknown-eabi | FileCheck %s -check-prefix=THUMB diff --git a/test/CodeGen/ARM/bfi.ll b/test/CodeGen/ARM/bfi.ll index c94b096..84f3813 100644 --- a/test/CodeGen/ARM/bfi.ll +++ b/test/CodeGen/ARM/bfi.ll @@ -61,3 +61,16 @@ entry: %3 = or i32 %2, %0 ret i32 %3 } + +; rdar://9609030 +define i32 @f6(i32 %a, i32 %b) nounwind readnone { +entry: +; CHECK: f6: +; CHECK-NOT: bic +; CHECK: bfi r0, r1, #8, #9 + %and = and i32 %a, -130817 + %and2 = shl i32 %b, 8 + %shl = and i32 %and2, 130816 + %or = or i32 %shl, %and + ret i32 %or +} diff --git a/test/CodeGen/ARM/bfx.ll b/test/CodeGen/ARM/bfx.ll index fcca191..519c135 100644 --- a/test/CodeGen/ARM/bfx.ll +++ b/test/CodeGen/ARM/bfx.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=arm -mattr=+v7a | FileCheck %s +; RUN: llc < %s -march=arm -mattr=+v7 | FileCheck %s define i32 @sbfx1(i32 %a) { ; CHECK: sbfx1 diff --git a/test/CodeGen/ARM/call-tc.ll b/test/CodeGen/ARM/call-tc.ll index c460f7a..e01750b 100644 --- a/test/CodeGen/ARM/call-tc.ll +++ b/test/CodeGen/ARM/call-tc.ll @@ -15,11 +15,11 @@ define void @t1() { define void @t2() { ; CHECKV6: t2: -; CHECKV6: bx r0 @ TAILCALL +; CHECKV6: bx r0 ; CHECKT2D: t2: ; CHECKT2D: ldr ; CHECKT2D-NEXT: ldr -; CHECKT2D-NEXT: bx r0 @ TAILCALL +; CHECKT2D-NEXT: bx r0 %tmp = load i32 ()** @t ; <i32 ()*> [#uses=1] %tmp.upgrd.2 = tail call i32 %tmp( ) ; <i32> [#uses=0] ret void @@ -27,11 +27,11 @@ define void @t2() { define void @t3() { ; CHECKV6: t3: -; CHECKV6: b _t2 @ TAILCALL +; CHECKV6: b _t2 ; CHECKELF: t3: -; CHECKELF: b t2(PLT) @ TAILCALL +; CHECKELF: b t2(PLT) ; CHECKT2D: t3: -; CHECKT2D: b.w _t2 @ TAILCALL +; CHECKT2D: b.w _t2 tail call void @t2( ) ; <i32> [#uses=0] ret void @@ -41,9 +41,9 @@ define void @t3() { define double @t4(double %a) nounwind readonly ssp { entry: ; CHECKV6: t4: -; CHECKV6: b _sin @ TAILCALL +; CHECKV6: b _sin ; CHECKELF: t4: -; CHECKELF: b sin(PLT) @ TAILCALL +; CHECKELF: b sin(PLT) %0 = tail call double @sin(double %a) nounwind readonly ; <double> [#uses=1] ret double %0 } @@ -51,9 +51,9 @@ entry: define float @t5(float %a) nounwind readonly ssp { entry: ; CHECKV6: t5: -; CHECKV6: b _sinf @ TAILCALL +; CHECKV6: b _sinf ; CHECKELF: t5: -; CHECKELF: b sinf(PLT) @ TAILCALL +; CHECKELF: b sinf(PLT) %0 = tail call float @sinf(float %a) nounwind readonly ; <float> [#uses=1] ret float %0 } @@ -65,9 +65,9 @@ declare double @sin(double) nounwind readonly define i32 @t6(i32 %a, i32 %b) nounwind readnone { entry: ; CHECKV6: t6: -; CHECKV6: b ___divsi3 @ TAILCALL +; CHECKV6: b ___divsi3 ; CHECKELF: t6: -; CHECKELF: b __aeabi_idiv(PLT) @ TAILCALL +; CHECKELF: b __aeabi_idiv(PLT) %0 = sdiv i32 %a, %b ret i32 %0 } diff --git a/test/CodeGen/ARM/call.ll b/test/CodeGen/ARM/call.ll index c020b6f..0f9543f 100644 --- a/test/CodeGen/ARM/call.ll +++ b/test/CodeGen/ARM/call.ll @@ -1,6 +1,6 @@ -; RUN: llc < %s -march=arm | FileCheck %s -check-prefix=CHECKV4 +; RUN: llc < %s -march=arm -mattr=+v4t | FileCheck %s -check-prefix=CHECKV4 ; RUN: llc < %s -march=arm -mattr=+v5t | FileCheck %s -check-prefix=CHECKV5 -; RUN: llc < %s -march=arm -mtriple=arm-linux-gnueabi\ +; RUN: llc < %s -mtriple=armv6-linux-gnueabi\ ; RUN: -relocation-model=pic | FileCheck %s -check-prefix=CHECKELF @t = weak global i32 ()* null ; <i32 ()**> [#uses=1] diff --git a/test/CodeGen/ARM/carry.ll b/test/CodeGen/ARM/carry.ll index 9b90408..06b459e 100644 --- a/test/CodeGen/ARM/carry.ll +++ b/test/CodeGen/ARM/carry.ll @@ -24,7 +24,6 @@ entry: define i64 @f3(i32 %al, i32 %bl) { ; CHECK: f3: ; CHECK: adds r -; CHECK: adcs r ; CHECK: adc r entry: ; unsigned wide add diff --git a/test/CodeGen/ARM/constants.ll b/test/CodeGen/ARM/constants.ll index 7893df7..f4c1b5a 100644 --- a/test/CodeGen/ARM/constants.ll +++ b/test/CodeGen/ARM/constants.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=arm -disable-cgp-branch-opts | FileCheck %s +; RUN: llc < %s -mtriple=armv4t-unknown-linux-gnueabi -disable-cgp-branch-opts | FileCheck %s define i32 @f1() { ; CHECK: f1 @@ -14,33 +14,46 @@ define i32 @f2() { define i32 @f3() { ; CHECK: f3 -; CHECK: mov r0, #1, #24 +; CHECK: mov r0, #256 ret i32 256 } define i32 @f4() { ; CHECK: f4 -; CHECK: orr{{.*}}#1, #24 +; CHECK: orr{{.*}}#256 ret i32 257 } define i32 @f5() { ; CHECK: f5 -; CHECK: mov r0, #255, #2 +; CHECK: mov r0, #-1073741761 ret i32 -1073741761 } define i32 @f6() { ; CHECK: f6 -; CHECK: mov r0, #63, #28 +; CHECK: mov r0, #1008 ret i32 1008 } define void @f7(i32 %a) { ; CHECK: f7 -; CHECK: cmp r0, #1, #16 +; CHECK: cmp r0, #65536 %b = icmp ugt i32 %a, 65536 br i1 %b, label %r, label %r r: ret void } + +%t1 = type { <3 x float>, <3 x float> } + +@const1 = global %t1 { <3 x float> zeroinitializer, + <3 x float> <float 1.000000e+00, + float 2.000000e+00, + float 3.000000e+00> }, align 16 +; CHECK: const1 +; CHECK: .zero 16 +; CHECK: float 1.0 +; CHECK: float 2.0 +; CHECK: float 3.0 +; CHECK: .zero 4 diff --git a/test/CodeGen/ARM/debug-info-blocks.ll b/test/CodeGen/ARM/debug-info-blocks.ll new file mode 100644 index 0000000..519c40e --- /dev/null +++ b/test/CodeGen/ARM/debug-info-blocks.ll @@ -0,0 +1,245 @@ +; RUN: llc -O0 < %s | FileCheck %s +; CHECK: @DEBUG_VALUE: mydata <- [sp+#8]+#0 +; Radar 9331779 +target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32" +target triple = "thumbv7-apple-macosx10.7.0" + +%0 = type opaque +%1 = type { [4 x i32] } +%2 = type <{ i8*, i32, i32, i8*, %struct.Re*, i8*, %3*, %struct.my_struct* }> +%3 = type opaque +%struct.CP = type { float, float } +%struct.CR = type { %struct.CP, %struct.CP } +%struct.Re = type { i32, i32 } +%struct.__block_byref_mydata = type { i8*, %struct.__block_byref_mydata*, i32, i32, i8*, i8*, %0* } +%struct.my_struct = type opaque + +@"\01L_OBJC_SELECTOR_REFERENCES_13" = external hidden global i8*, section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip" +@"OBJC_IVAR_$_MyWork._bounds" = external hidden global i32, section "__DATA, __objc_const", align 4 +@"OBJC_IVAR_$_MyWork._data" = external hidden global i32, section "__DATA, __objc_const", align 4 +@"\01L_OBJC_SELECTOR_REFERENCES_222" = external hidden global i8*, section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip" + +declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone + +declare i8* @objc_msgSend(i8*, i8*, ...) + +declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone + +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind + +define hidden void @foobar_func_block_invoke_0(i8* %.block_descriptor, %0* %loadedMydata, [4 x i32] %bounds.coerce0, [4 x i32] %data.coerce0) ssp { + %1 = alloca %0*, align 4 + %bounds = alloca %struct.CR, align 4 + %data = alloca %struct.CR, align 4 + call void @llvm.dbg.value(metadata !{i8* %.block_descriptor}, i64 0, metadata !27), !dbg !129 + store %0* %loadedMydata, %0** %1, align 4 + call void @llvm.dbg.declare(metadata !{%0** %1}, metadata !130), !dbg !131 + %2 = bitcast %struct.CR* %bounds to %1* + %3 = getelementptr %1* %2, i32 0, i32 0 + store [4 x i32] %bounds.coerce0, [4 x i32]* %3 + call void @llvm.dbg.declare(metadata !{%struct.CR* %bounds}, metadata !132), !dbg !133 + %4 = bitcast %struct.CR* %data to %1* + %5 = getelementptr %1* %4, i32 0, i32 0 + store [4 x i32] %data.coerce0, [4 x i32]* %5 + call void @llvm.dbg.declare(metadata !{%struct.CR* %data}, metadata !134), !dbg !135 + %6 = bitcast i8* %.block_descriptor to %2* + %7 = getelementptr inbounds %2* %6, i32 0, i32 6 + call void @llvm.dbg.declare(metadata !{%2* %6}, metadata !136), !dbg !137 + call void @llvm.dbg.declare(metadata !{%2* %6}, metadata !138), !dbg !137 + call void @llvm.dbg.declare(metadata !{%2* %6}, metadata !139), !dbg !140 + %8 = load %0** %1, align 4, !dbg !141 + %9 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_13", !dbg !141 + %10 = bitcast %0* %8 to i8*, !dbg !141 + %11 = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %10, i8* %9), !dbg !141 + %12 = bitcast i8* %11 to %0*, !dbg !141 + %13 = getelementptr inbounds %2* %6, i32 0, i32 5, !dbg !141 + %14 = load i8** %13, !dbg !141 + %15 = bitcast i8* %14 to %struct.__block_byref_mydata*, !dbg !141 + %16 = getelementptr inbounds %struct.__block_byref_mydata* %15, i32 0, i32 1, !dbg !141 + %17 = load %struct.__block_byref_mydata** %16, !dbg !141 + %18 = getelementptr inbounds %struct.__block_byref_mydata* %17, i32 0, i32 6, !dbg !141 + store %0* %12, %0** %18, align 4, !dbg !141 + %19 = getelementptr inbounds %2* %6, i32 0, i32 6, !dbg !143 + %20 = load %3** %19, align 4, !dbg !143 + %21 = load i32* @"OBJC_IVAR_$_MyWork._data", !dbg !143 + %22 = bitcast %3* %20 to i8*, !dbg !143 + %23 = getelementptr inbounds i8* %22, i32 %21, !dbg !143 + %24 = bitcast i8* %23 to %struct.CR*, !dbg !143 + %25 = bitcast %struct.CR* %24 to i8*, !dbg !143 + %26 = bitcast %struct.CR* %data to i8*, !dbg !143 + call void @llvm.memcpy.p0i8.p0i8.i32(i8* %25, i8* %26, i32 16, i32 4, i1 false), !dbg !143 + %27 = getelementptr inbounds %2* %6, i32 0, i32 6, !dbg !144 + %28 = load %3** %27, align 4, !dbg !144 + %29 = load i32* @"OBJC_IVAR_$_MyWork._bounds", !dbg !144 + %30 = bitcast %3* %28 to i8*, !dbg !144 + %31 = getelementptr inbounds i8* %30, i32 %29, !dbg !144 + %32 = bitcast i8* %31 to %struct.CR*, !dbg !144 + %33 = bitcast %struct.CR* %32 to i8*, !dbg !144 + %34 = bitcast %struct.CR* %bounds to i8*, !dbg !144 + call void @llvm.memcpy.p0i8.p0i8.i32(i8* %33, i8* %34, i32 16, i32 4, i1 false), !dbg !144 + %35 = getelementptr inbounds %2* %6, i32 0, i32 6, !dbg !145 + %36 = load %3** %35, align 4, !dbg !145 + %37 = getelementptr inbounds %2* %6, i32 0, i32 5, !dbg !145 + %38 = load i8** %37, !dbg !145 + %39 = bitcast i8* %38 to %struct.__block_byref_mydata*, !dbg !145 + %40 = getelementptr inbounds %struct.__block_byref_mydata* %39, i32 0, i32 1, !dbg !145 + %41 = load %struct.__block_byref_mydata** %40, !dbg !145 + %42 = getelementptr inbounds %struct.__block_byref_mydata* %41, i32 0, i32 6, !dbg !145 + %43 = load %0** %42, align 4, !dbg !145 + %44 = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_222", !dbg !145 + %45 = bitcast %3* %36 to i8*, !dbg !145 + call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %0*)*)(i8* %45, i8* %44, %0* %43), !dbg !145 + ret void, !dbg !146 +} + +!llvm.dbg.cu = !{!0} +!llvm.dbg.enum = !{!1, !1, !5, !5, !9, !14, !19, !19, !14, !14, !14, !19, !19, !19} +!llvm.dbg.sp = !{!23} + +!0 = metadata !{i32 589841, i32 0, i32 16, metadata !"MyLibrary.i", metadata !"/Volumes/Sandbox/llvm", metadata !"Apple clang version 2.1", i1 true, i1 false, metadata !"", i32 2} ; [ DW_TAG_compile_unit ] +!1 = metadata !{i32 589828, metadata !0, metadata !"", metadata !2, i32 248, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !3, i32 0, i32 0} ; [ DW_TAG_enumeration_type ] +!2 = metadata !{i32 589865, metadata !"header.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ] +!3 = metadata !{metadata !4} +!4 = metadata !{i32 589864, metadata !"Ver1", i64 0} ; [ DW_TAG_enumerator ] +!5 = metadata !{i32 589828, metadata !0, metadata !"Mode", metadata !6, i32 79, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !7, i32 0, i32 0} ; [ DW_TAG_enumeration_type ] +!6 = metadata !{i32 589865, metadata !"header2.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ] +!7 = metadata !{metadata !8} +!8 = metadata !{i32 589864, metadata !"One", i64 0} ; [ DW_TAG_enumerator ] +!9 = metadata !{i32 589828, metadata !0, metadata !"", metadata !10, i32 15, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !11, i32 0, i32 0} ; [ DW_TAG_enumeration_type ] +!10 = metadata !{i32 589865, metadata !"header3.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ] +!11 = metadata !{metadata !12, metadata !13} +!12 = metadata !{i32 589864, metadata !"Unknown", i64 0} ; [ DW_TAG_enumerator ] +!13 = metadata !{i32 589864, metadata !"Known", i64 1} ; [ DW_TAG_enumerator ] +!14 = metadata !{i32 589828, metadata !0, metadata !"", metadata !15, i32 20, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !16, i32 0, i32 0} ; [ DW_TAG_enumeration_type ] +!15 = metadata !{i32 589865, metadata !"Private.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ] +!16 = metadata !{metadata !17, metadata !18} +!17 = metadata !{i32 589864, metadata !"Single", i64 0} ; [ DW_TAG_enumerator ] +!18 = metadata !{i32 589864, metadata !"Double", i64 1} ; [ DW_TAG_enumerator ] +!19 = metadata !{i32 589828, metadata !0, metadata !"", metadata !20, i32 14, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !21, i32 0, i32 0} ; [ DW_TAG_enumeration_type ] +!20 = metadata !{i32 589865, metadata !"header4.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ] +!21 = metadata !{metadata !22} +!22 = metadata !{i32 589864, metadata !"Eleven", i64 0} ; [ DW_TAG_enumerator ] +!23 = metadata !{i32 589870, i32 0, metadata !24, metadata !"foobar_func_block_invoke_0", metadata !"foobar_func_block_invoke_0", metadata !"", metadata !24, i32 609, metadata !25, i1 true, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (i8*, %0*, [4 x i32], [4 x i32])* @foobar_func_block_invoke_0, null, null} ; [ DW_TAG_subprogram ] +!24 = metadata !{i32 589865, metadata !"MyLibrary.m", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ] +!25 = metadata !{i32 589845, metadata !24, metadata !"", metadata !24, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !26, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] +!26 = metadata !{null} +!27 = metadata !{i32 590081, metadata !23, metadata !".block_descriptor", metadata !24, i32 16777825, metadata !28, i32 64} ; [ DW_TAG_arg_variable ] +!28 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 0, i64 0, i32 0, metadata !29} ; [ DW_TAG_pointer_type ] +!29 = metadata !{i32 589843, metadata !24, metadata !"__block_literal_14", metadata !24, i32 609, i64 256, i64 32, i32 0, i32 0, i32 0, metadata !30, i32 0, i32 0} ; [ DW_TAG_structure_type ] +!30 = metadata !{metadata !31, metadata !33, metadata !35, metadata !36, metadata !37, metadata !48, metadata !89, metadata !124} +!31 = metadata !{i32 589837, metadata !24, metadata !"__isa", metadata !24, i32 609, i64 32, i64 32, i64 0, i32 0, metadata !32} ; [ DW_TAG_member ] +!32 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, null} ; [ DW_TAG_pointer_type ] +!33 = metadata !{i32 589837, metadata !24, metadata !"__flags", metadata !24, i32 609, i64 32, i64 32, i64 32, i32 0, metadata !34} ; [ DW_TAG_member ] +!34 = metadata !{i32 589860, metadata !0, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] +!35 = metadata !{i32 589837, metadata !24, metadata !"__reserved", metadata !24, i32 609, i64 32, i64 32, i64 64, i32 0, metadata !34} ; [ DW_TAG_member ] +!36 = metadata !{i32 589837, metadata !24, metadata !"__FuncPtr", metadata !24, i32 609, i64 32, i64 32, i64 96, i32 0, metadata !32} ; [ DW_TAG_member ] +!37 = metadata !{i32 589837, metadata !24, metadata !"__descriptor", metadata !24, i32 609, i64 32, i64 32, i64 128, i32 0, metadata !38} ; [ DW_TAG_member ] +!38 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !39} ; [ DW_TAG_pointer_type ] +!39 = metadata !{i32 589843, metadata !0, metadata !"__block_descriptor_withcopydispose", metadata !40, i32 307, i64 128, i64 32, i32 0, i32 0, i32 0, metadata !41, i32 0, i32 0} ; [ DW_TAG_structure_type ] +!40 = metadata !{i32 589865, metadata !"MyLibrary.i", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ] +!41 = metadata !{metadata !42, metadata !44, metadata !45, metadata !47} +!42 = metadata !{i32 589837, metadata !40, metadata !"reserved", metadata !40, i32 307, i64 32, i64 32, i64 0, i32 0, metadata !43} ; [ DW_TAG_member ] +!43 = metadata !{i32 589860, metadata !0, metadata !"long unsigned int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ] +!44 = metadata !{i32 589837, metadata !40, metadata !"Size", metadata !40, i32 307, i64 32, i64 32, i64 32, i32 0, metadata !43} ; [ DW_TAG_member ] +!45 = metadata !{i32 589837, metadata !40, metadata !"CopyFuncPtr", metadata !40, i32 307, i64 32, i64 32, i64 64, i32 0, metadata !46} ; [ DW_TAG_member ] +!46 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !32} ; [ DW_TAG_pointer_type ] +!47 = metadata !{i32 589837, metadata !40, metadata !"DestroyFuncPtr", metadata !40, i32 307, i64 32, i64 32, i64 96, i32 0, metadata !46} ; [ DW_TAG_member ] +!48 = metadata !{i32 589837, metadata !24, metadata !"mydata", metadata !24, i32 609, i64 32, i64 32, i64 160, i32 0, metadata !49} ; [ DW_TAG_member ] +!49 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 0, i64 0, i32 0, metadata !50} ; [ DW_TAG_pointer_type ] +!50 = metadata !{i32 589843, metadata !24, metadata !"", metadata !24, i32 0, i64 224, i64 0, i32 0, i32 16, i32 0, metadata !51, i32 0, i32 0} ; [ DW_TAG_structure_type ] +!51 = metadata !{metadata !52, metadata !53, metadata !54, metadata !55, metadata !56, metadata !57, metadata !58} +!52 = metadata !{i32 589837, metadata !24, metadata !"__isa", metadata !24, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !32} ; [ DW_TAG_member ] +!53 = metadata !{i32 589837, metadata !24, metadata !"__forwarding", metadata !24, i32 0, i64 32, i64 32, i64 32, i32 0, metadata !32} ; [ DW_TAG_member ] +!54 = metadata !{i32 589837, metadata !24, metadata !"__flags", metadata !24, i32 0, i64 32, i64 32, i64 64, i32 0, metadata !34} ; [ DW_TAG_member ] +!55 = metadata !{i32 589837, metadata !24, metadata !"__size", metadata !24, i32 0, i64 32, i64 32, i64 96, i32 0, metadata !34} ; [ DW_TAG_member ] +!56 = metadata !{i32 589837, metadata !24, metadata !"__copy_helper", metadata !24, i32 0, i64 32, i64 32, i64 128, i32 0, metadata !32} ; [ DW_TAG_member ] +!57 = metadata !{i32 589837, metadata !24, metadata !"__destroy_helper", metadata !24, i32 0, i64 32, i64 32, i64 160, i32 0, metadata !32} ; [ DW_TAG_member ] +!58 = metadata !{i32 589837, metadata !24, metadata !"mydata", metadata !24, i32 0, i64 32, i64 32, i64 192, i32 0, metadata !59} ; [ DW_TAG_member ] +!59 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !60} ; [ DW_TAG_pointer_type ] +!60 = metadata !{i32 589843, metadata !24, metadata !"UIMydata", metadata !61, i32 26, i64 128, i64 32, i32 0, i32 0, i32 0, metadata !62, i32 16, i32 0} ; [ DW_TAG_structure_type ] +!61 = metadata !{i32 589865, metadata !"header11.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ] +!62 = metadata !{metadata !63, metadata !71, metadata !75, metadata !79} +!63 = metadata !{i32 589852, metadata !60, null, metadata !61, i32 0, i64 0, i64 0, i64 0, i32 0, metadata !64} ; [ DW_TAG_inheritance ] +!64 = metadata !{i32 589843, metadata !40, metadata !"NSO", metadata !65, i32 66, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !66, i32 16, i32 0} ; [ DW_TAG_structure_type ] +!65 = metadata !{i32 589865, metadata !"NSO.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ] +!66 = metadata !{metadata !67} +!67 = metadata !{i32 589837, metadata !65, metadata !"isa", metadata !65, i32 67, i64 32, i64 32, i64 0, i32 2, metadata !68, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ] +!68 = metadata !{i32 589846, metadata !0, metadata !"Class", metadata !40, i32 197, i64 0, i64 0, i64 0, i32 0, metadata !69} ; [ DW_TAG_typedef ] +!69 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !70} ; [ DW_TAG_pointer_type ] +!70 = metadata !{i32 589843, metadata !0, metadata !"objc_class", metadata !40, i32 0, i64 0, i64 0, i32 0, i32 4, i32 0, null, i32 0, i32 0} ; [ DW_TAG_structure_type ] +!71 = metadata !{i32 589837, metadata !61, metadata !"_mydataRef", metadata !61, i32 28, i64 32, i64 32, i64 32, i32 0, metadata !72, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ] +!72 = metadata !{i32 589846, metadata !0, metadata !"CFTypeRef", metadata !24, i32 313, i64 0, i64 0, i64 0, i32 0, metadata !73} ; [ DW_TAG_typedef ] +!73 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !74} ; [ DW_TAG_pointer_type ] +!74 = metadata !{i32 589862, metadata !0, metadata !"", null, i32 0, i64 0, i64 0, i64 0, i32 0, null} ; [ DW_TAG_const_type ] +!75 = metadata !{i32 589837, metadata !61, metadata !"_scale", metadata !61, i32 29, i64 32, i64 32, i64 64, i32 0, metadata !76, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ] +!76 = metadata !{i32 589846, metadata !0, metadata !"Float", metadata !77, i32 89, i64 0, i64 0, i64 0, i32 0, metadata !78} ; [ DW_TAG_typedef ] +!77 = metadata !{i32 589865, metadata !"header12.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ] +!78 = metadata !{i32 589860, metadata !0, metadata !"float", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 4} ; [ DW_TAG_base_type ] +!79 = metadata !{i32 589837, metadata !61, metadata !"_mydataFlags", metadata !61, i32 37, i64 8, i64 8, i64 96, i32 0, metadata !80, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ] +!80 = metadata !{i32 589843, metadata !0, metadata !"", metadata !61, i32 30, i64 8, i64 8, i32 0, i32 0, i32 0, metadata !81, i32 0, i32 0} ; [ DW_TAG_structure_type ] +!81 = metadata !{metadata !82, metadata !84, metadata !85, metadata !86, metadata !87, metadata !88} +!82 = metadata !{i32 589837, metadata !61, metadata !"named", metadata !61, i32 31, i64 1, i64 32, i64 0, i32 0, metadata !83} ; [ DW_TAG_member ] +!83 = metadata !{i32 589860, metadata !0, metadata !"unsigned int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ] +!84 = metadata !{i32 589837, metadata !61, metadata !"mydataO", metadata !61, i32 32, i64 3, i64 32, i64 1, i32 0, metadata !83} ; [ DW_TAG_member ] +!85 = metadata !{i32 589837, metadata !61, metadata !"cached", metadata !61, i32 33, i64 1, i64 32, i64 4, i32 0, metadata !83} ; [ DW_TAG_member ] +!86 = metadata !{i32 589837, metadata !61, metadata !"hasBeenCached", metadata !61, i32 34, i64 1, i64 32, i64 5, i32 0, metadata !83} ; [ DW_TAG_member ] +!87 = metadata !{i32 589837, metadata !61, metadata !"hasPattern", metadata !61, i32 35, i64 1, i64 32, i64 6, i32 0, metadata !83} ; [ DW_TAG_member ] +!88 = metadata !{i32 589837, metadata !61, metadata !"isCIMydata", metadata !61, i32 36, i64 1, i64 32, i64 7, i32 0, metadata !83} ; [ DW_TAG_member ] +!89 = metadata !{i32 589837, metadata !24, metadata !"self", metadata !24, i32 609, i64 32, i64 32, i64 192, i32 0, metadata !90} ; [ DW_TAG_member ] +!90 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !91} ; [ DW_TAG_pointer_type ] +!91 = metadata !{i32 589843, metadata !40, metadata !"MyWork", metadata !24, i32 36, i64 384, i64 32, i32 0, i32 0, i32 0, metadata !92, i32 16, i32 0} ; [ DW_TAG_structure_type ] +!92 = metadata !{metadata !93, metadata !98, metadata !101, metadata !107, metadata !123} +!93 = metadata !{i32 589852, metadata !91, null, metadata !24, i32 0, i64 0, i64 0, i64 0, i32 0, metadata !94} ; [ DW_TAG_inheritance ] +!94 = metadata !{i32 589843, metadata !40, metadata !"twork", metadata !95, i32 43, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !96, i32 16, i32 0} ; [ DW_TAG_structure_type ] +!95 = metadata !{i32 589865, metadata !"header13.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ] +!96 = metadata !{metadata !97} +!97 = metadata !{i32 589852, metadata !94, null, metadata !95, i32 0, i64 0, i64 0, i64 0, i32 0, metadata !64} ; [ DW_TAG_inheritance ] +!98 = metadata !{i32 589837, metadata !24, metadata !"_itemID", metadata !24, i32 38, i64 64, i64 32, i64 32, i32 1, metadata !99, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ] +!99 = metadata !{i32 589846, metadata !0, metadata !"uint64_t", metadata !40, i32 55, i64 0, i64 0, i64 0, i32 0, metadata !100} ; [ DW_TAG_typedef ] +!100 = metadata !{i32 589860, metadata !0, metadata !"long long unsigned int", null, i32 0, i64 64, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ] +!101 = metadata !{i32 589837, metadata !24, metadata !"_library", metadata !24, i32 39, i64 32, i64 32, i64 96, i32 1, metadata !102, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ] +!102 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !103} ; [ DW_TAG_pointer_type ] +!103 = metadata !{i32 589843, metadata !40, metadata !"MyLibrary2", metadata !104, i32 22, i64 32, i64 32, i32 0, i32 0, i32 0, metadata !105, i32 16, i32 0} ; [ DW_TAG_structure_type ] +!104 = metadata !{i32 589865, metadata !"header14.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ] +!105 = metadata !{metadata !106} +!106 = metadata !{i32 589852, metadata !103, null, metadata !104, i32 0, i64 0, i64 0, i64 0, i32 0, metadata !64} ; [ DW_TAG_inheritance ] +!107 = metadata !{i32 589837, metadata !24, metadata !"_bounds", metadata !24, i32 40, i64 128, i64 32, i64 128, i32 1, metadata !108, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ] +!108 = metadata !{i32 589846, metadata !0, metadata !"CR", metadata !40, i32 33, i64 0, i64 0, i64 0, i32 0, metadata !109} ; [ DW_TAG_typedef ] +!109 = metadata !{i32 589843, metadata !0, metadata !"CR", metadata !77, i32 29, i64 128, i64 32, i32 0, i32 0, i32 0, metadata !110, i32 0, i32 0} ; [ DW_TAG_structure_type ] +!110 = metadata !{metadata !111, metadata !117} +!111 = metadata !{i32 589837, metadata !77, metadata !"origin", metadata !77, i32 30, i64 64, i64 32, i64 0, i32 0, metadata !112} ; [ DW_TAG_member ] +!112 = metadata !{i32 589846, metadata !0, metadata !"CP", metadata !77, i32 17, i64 0, i64 0, i64 0, i32 0, metadata !113} ; [ DW_TAG_typedef ] +!113 = metadata !{i32 589843, metadata !0, metadata !"CP", metadata !77, i32 13, i64 64, i64 32, i32 0, i32 0, i32 0, metadata !114, i32 0, i32 0} ; [ DW_TAG_structure_type ] +!114 = metadata !{metadata !115, metadata !116} +!115 = metadata !{i32 589837, metadata !77, metadata !"x", metadata !77, i32 14, i64 32, i64 32, i64 0, i32 0, metadata !76} ; [ DW_TAG_member ] +!116 = metadata !{i32 589837, metadata !77, metadata !"y", metadata !77, i32 15, i64 32, i64 32, i64 32, i32 0, metadata !76} ; [ DW_TAG_member ] +!117 = metadata !{i32 589837, metadata !77, metadata !"size", metadata !77, i32 31, i64 64, i64 32, i64 64, i32 0, metadata !118} ; [ DW_TAG_member ] +!118 = metadata !{i32 589846, metadata !0, metadata !"Size", metadata !77, i32 25, i64 0, i64 0, i64 0, i32 0, metadata !119} ; [ DW_TAG_typedef ] +!119 = metadata !{i32 589843, metadata !0, metadata !"Size", metadata !77, i32 21, i64 64, i64 32, i32 0, i32 0, i32 0, metadata !120, i32 0, i32 0} ; [ DW_TAG_structure_type ] +!120 = metadata !{metadata !121, metadata !122} +!121 = metadata !{i32 589837, metadata !77, metadata !"width", metadata !77, i32 22, i64 32, i64 32, i64 0, i32 0, metadata !76} ; [ DW_TAG_member ] +!122 = metadata !{i32 589837, metadata !77, metadata !"height", metadata !77, i32 23, i64 32, i64 32, i64 32, i32 0, metadata !76} ; [ DW_TAG_member ] +!123 = metadata !{i32 589837, metadata !24, metadata !"_data", metadata !24, i32 40, i64 128, i64 32, i64 256, i32 1, metadata !108, metadata !"", metadata !"", metadata !"", i32 0} ; [ DW_TAG_member ] +!124 = metadata !{i32 589837, metadata !24, metadata !"semi", metadata !24, i32 609, i64 32, i64 32, i64 224, i32 0, metadata !125} ; [ DW_TAG_member ] +!125 = metadata !{i32 589846, metadata !0, metadata !"d_t", metadata !24, i32 35, i64 0, i64 0, i64 0, i32 0, metadata !126} ; [ DW_TAG_typedef ] +!126 = metadata !{i32 589839, metadata !0, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !127} ; [ DW_TAG_pointer_type ] +!127 = metadata !{i32 589843, metadata !0, metadata !"my_struct", metadata !128, i32 49, i64 0, i64 0, i32 0, i32 4, i32 0, null, i32 0, i32 0} ; [ DW_TAG_structure_type ] +!128 = metadata !{i32 589865, metadata !"header15.h", metadata !"/Volumes/Sandbox/llvm", metadata !0} ; [ DW_TAG_file_type ] +!129 = metadata !{i32 609, i32 144, metadata !23, null} +!130 = metadata !{i32 590081, metadata !23, metadata !"loadedMydata", metadata !24, i32 33555041, metadata !59, i32 0} ; [ DW_TAG_arg_variable ] +!131 = metadata !{i32 609, i32 155, metadata !23, null} +!132 = metadata !{i32 590081, metadata !23, metadata !"bounds", metadata !24, i32 50332257, metadata !108, i32 0} ; [ DW_TAG_arg_variable ] +!133 = metadata !{i32 609, i32 175, metadata !23, null} +!134 = metadata !{i32 590081, metadata !23, metadata !"data", metadata !24, i32 67109473, metadata !108, i32 0} ; [ DW_TAG_arg_variable ] +!135 = metadata !{i32 609, i32 190, metadata !23, null} +!136 = metadata !{i32 590080, metadata !23, metadata !"mydata", metadata !24, i32 604, metadata !50, i32 0, i64 1, i64 20, i64 2, i64 1, i64 4, i64 2, i64 1, i64 24} ; [ DW_TAG_auto_variable ] +!137 = metadata !{i32 604, i32 49, metadata !23, null} +!138 = metadata !{i32 590080, metadata !23, metadata !"self", metadata !40, i32 604, metadata !90, i32 0, i64 1, i64 24} ; [ DW_TAG_auto_variable ] +!139 = metadata !{i32 590080, metadata !23, metadata !"semi", metadata !24, i32 607, metadata !125, i32 0, i64 1, i64 28} ; [ DW_TAG_auto_variable ] +!140 = metadata !{i32 607, i32 30, metadata !23, null} +!141 = metadata !{i32 610, i32 17, metadata !142, null} +!142 = metadata !{i32 589835, metadata !23, i32 609, i32 200, metadata !24, i32 94} ; [ DW_TAG_lexical_block ] +!143 = metadata !{i32 611, i32 17, metadata !142, null} +!144 = metadata !{i32 612, i32 17, metadata !142, null} +!145 = metadata !{i32 613, i32 17, metadata !142, null} +!146 = metadata !{i32 615, i32 13, metadata !142, null} diff --git a/test/CodeGen/ARM/dyn-stackalloc.ll b/test/CodeGen/ARM/dyn-stackalloc.ll index 92e2d13..de2820e 100644 --- a/test/CodeGen/ARM/dyn-stackalloc.ll +++ b/test/CodeGen/ARM/dyn-stackalloc.ll @@ -1,48 +1,48 @@ ; RUN: llc < %s -march=arm - %struct.state = type { i32, %struct.info*, float**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i8* } - %struct.info = type { i32, i32, i32, i32, i32, i32, i32, i8* } +%struct.comment = type { i8**, i32*, i32, i8* } +%struct.info = type { i32, i32, i32, i32, i32, i32, i32, i8* } +%struct.state = type { i32, %struct.info*, float**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i8* } + +@str215 = external global [2 x i8] define void @t1(%struct.state* %v) { - %tmp6 = load i32* null - %tmp8 = alloca float, i32 %tmp6 - store i32 1, i32* null - br i1 false, label %bb123.preheader, label %return - -bb123.preheader: - br i1 false, label %bb43, label %return - -bb43: - call fastcc void @f1( float* %tmp8, float* null, i32 0 ) - %tmp70 = load i32* null - %tmp85 = getelementptr float* %tmp8, i32 0 - call fastcc void @f2( float* null, float* null, float* %tmp85, i32 %tmp70 ) - ret void - -return: - ret void + %tmp6 = load i32* null + %tmp8 = alloca float, i32 %tmp6 + store i32 1, i32* null + br i1 false, label %bb123.preheader, label %return + +bb123.preheader: ; preds = %0 + br i1 false, label %bb43, label %return + +bb43: ; preds = %bb123.preheader + call fastcc void @f1(float* %tmp8, float* null, i32 0) + %tmp70 = load i32* null + %tmp85 = getelementptr float* %tmp8, i32 0 + call fastcc void @f2(float* null, float* null, float* %tmp85, i32 %tmp70) + ret void + +return: ; preds = %bb123.preheader, %0 + ret void } declare fastcc void @f1(float*, float*, i32) declare fastcc void @f2(float*, float*, float*, i32) - %struct.comment = type { i8**, i32*, i32, i8* } -@str215 = external global [2 x i8] - define void @t2(%struct.comment* %vc, i8* %tag, i8* %contents) { - %tmp1 = call i32 @strlen( i8* %tag ) - %tmp3 = call i32 @strlen( i8* %contents ) - %tmp4 = add i32 %tmp1, 2 - %tmp5 = add i32 %tmp4, %tmp3 - %tmp6 = alloca i8, i32 %tmp5 - %tmp9 = call i8* @strcpy( i8* %tmp6, i8* %tag ) - %tmp6.len = call i32 @strlen( i8* %tmp6 ) - %tmp6.indexed = getelementptr i8* %tmp6, i32 %tmp6.len - call void @llvm.memcpy.i32( i8* %tmp6.indexed, i8* getelementptr ([2 x i8]* @str215, i32 0, i32 0), i32 2, i32 1 ) - %tmp15 = call i8* @strcat( i8* %tmp6, i8* %contents ) - call fastcc void @comment_add( %struct.comment* %vc, i8* %tmp6 ) - ret void + %tmp1 = call i32 @strlen(i8* %tag) + %tmp3 = call i32 @strlen(i8* %contents) + %tmp4 = add i32 %tmp1, 2 + %tmp5 = add i32 %tmp4, %tmp3 + %tmp6 = alloca i8, i32 %tmp5 + %tmp9 = call i8* @strcpy(i8* %tmp6, i8* %tag) + %tmp6.len = call i32 @strlen(i8* %tmp6) + %tmp6.indexed = getelementptr i8* %tmp6, i32 %tmp6.len + call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp6.indexed, i8* getelementptr inbounds ([2 x i8]* @str215, i32 0, i32 0), i32 2, i32 1, i1 false) + %tmp15 = call i8* @strcat(i8* %tmp6, i8* %contents) + call fastcc void @comment_add(%struct.comment* %vc, i8* %tmp6) + ret void } declare i32 @strlen(i8*) @@ -51,6 +51,6 @@ declare i8* @strcat(i8*, i8*) declare fastcc void @comment_add(%struct.comment*, i8*) -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) - declare i8* @strcpy(i8*, i8*) + +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind diff --git a/test/CodeGen/ARM/fast-isel-static.ll b/test/CodeGen/ARM/fast-isel-static.ll index 2d79674..a86e325 100644 --- a/test/CodeGen/ARM/fast-isel-static.ll +++ b/test/CodeGen/ARM/fast-isel-static.ll @@ -23,7 +23,7 @@ entry: %z = alloca float, align 4 store float 0.000000e+00, float* %ztot, align 4 store float 1.000000e+00, float* %z, align 4 -; CHECK-LONG: blx r2 +; CHECK-LONG: blx r ; CHECK-NORM: bl _myadd call void @myadd(float* %ztot, float* %z) ret i32 0 diff --git a/test/CodeGen/ARM/fast-isel.ll b/test/CodeGen/ARM/fast-isel.ll index 499c97f..eb0c5c8 100644 --- a/test/CodeGen/ARM/fast-isel.ll +++ b/test/CodeGen/ARM/fast-isel.ll @@ -43,7 +43,7 @@ b1: br label %b2 ; THUMB: add.w {{.*}} #4096 -; ARM: add {{.*}} #1, #20 +; ARM: add {{.*}} #4096 b2: %b = add i32 %tmp, 4095 diff --git a/test/CodeGen/ARM/fold-const.ll b/test/CodeGen/ARM/fold-const.ll new file mode 100644 index 0000000..227e4e8 --- /dev/null +++ b/test/CodeGen/ARM/fold-const.ll @@ -0,0 +1,14 @@ +; RUN: llc < %s -march=arm -mattr=+v7 | FileCheck %s + +define i32 @f(i32 %a) nounwind readnone optsize ssp { +entry: + %conv = zext i32 %a to i64 + %tmp1 = tail call i64 @llvm.ctlz.i64(i64 %conv) +; CHECK: clz +; CHECK-NOT: adds + %cast = trunc i64 %tmp1 to i32 + %sub = sub nsw i32 63, %cast + ret i32 %sub +} + +declare i64 @llvm.ctlz.i64(i64) nounwind readnone diff --git a/test/CodeGen/ARM/fp.ll b/test/CodeGen/ARM/fp.ll index 8ef45f2..ac023d1 100644 --- a/test/CodeGen/ARM/fp.ll +++ b/test/CodeGen/ARM/fp.ll @@ -42,7 +42,7 @@ entry: define double @h(double* %v) { ;CHECK: h: -;CHECK: vldr.64 +;CHECK: vldr.64 ;CHECK-NEXT: vmov entry: %tmp = load double* %v ; <double> [#uses=1] @@ -51,7 +51,7 @@ entry: define float @h2() { ;CHECK: h2: -;CHECK: mov r0, #254, #10 +;CHECK: mov r0, #1065353216 entry: ret float 1.000000e+00 } diff --git a/test/CodeGen/ARM/globals.ll b/test/CodeGen/ARM/globals.ll index ccb1428..5e7e3f2 100644 --- a/test/CodeGen/ARM/globals.ll +++ b/test/CodeGen/ARM/globals.ll @@ -1,7 +1,7 @@ -; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=static | FileCheck %s -check-prefix=DarwinStatic -; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=dynamic-no-pic | FileCheck %s -check-prefix=DarwinDynamic -; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=pic | FileCheck %s -check-prefix=DarwinPIC -; RUN: llc < %s -mtriple=arm-linux-gnueabi -relocation-model=pic | FileCheck %s -check-prefix=LinuxPIC +; RUN: llc < %s -mtriple=armv6-apple-darwin -relocation-model=static | FileCheck %s -check-prefix=DarwinStatic +; RUN: llc < %s -mtriple=armv6-apple-darwin -relocation-model=dynamic-no-pic | FileCheck %s -check-prefix=DarwinDynamic +; RUN: llc < %s -mtriple=armv6-apple-darwin -relocation-model=pic | FileCheck %s -check-prefix=DarwinPIC +; RUN: llc < %s -mtriple=armv6-linux-gnueabi -relocation-model=pic | FileCheck %s -check-prefix=LinuxPIC @G = external global i32 diff --git a/test/CodeGen/ARM/hello.ll b/test/CodeGen/ARM/hello.ll index bfed7a6..9f46ae0 100644 --- a/test/CodeGen/ARM/hello.ll +++ b/test/CodeGen/ARM/hello.ll @@ -1,8 +1,8 @@ ; RUN: llc < %s -march=arm -; RUN: llc < %s -mtriple=arm-linux-gnueabi | grep mov | count 1 -; RUN: llc < %s -mtriple=arm-linux-gnu --disable-fp-elim | \ +; RUN: llc < %s -mtriple=armv6-linux-gnueabi | grep mov | count 1 +; RUN: llc < %s -mtriple=armv6-linux-gnu --disable-fp-elim | \ ; RUN: grep mov | count 2 -; RUN: llc < %s -mtriple=arm-apple-darwin | grep mov | count 2 +; RUN: llc < %s -mtriple=armv6-apple-darwin | grep mov | count 2 @str = internal constant [12 x i8] c"Hello World\00" diff --git a/test/CodeGen/ARM/iabs.ll b/test/CodeGen/ARM/iabs.ll index 63808b2..c01c041 100644 --- a/test/CodeGen/ARM/iabs.ll +++ b/test/CodeGen/ARM/iabs.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=arm | FileCheck %s +; RUN: llc < %s -march=arm -mattr=+v4t | FileCheck %s ;; Integer absolute value, should produce something as good as: ARM: ;; add r3, r0, r0, asr #31 diff --git a/test/CodeGen/ARM/ifcvt1.ll b/test/CodeGen/ARM/ifcvt1.ll index e6aa044..b073a05 100644 --- a/test/CodeGen/ARM/ifcvt1.ll +++ b/test/CodeGen/ARM/ifcvt1.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s -march=arm -; RUN: llc < %s -march=arm | grep bx | count 1 +; RUN: llc < %s -march=arm -mattr=+v4t +; RUN: llc < %s -march=arm -mattr=+v4t | grep bx | count 1 define i32 @t1(i32 %a, i32 %b) { %tmp2 = icmp eq i32 %a, 0 diff --git a/test/CodeGen/ARM/ifcvt2.ll b/test/CodeGen/ARM/ifcvt2.ll index 7b9d0cf..1bca10a 100644 --- a/test/CodeGen/ARM/ifcvt2.ll +++ b/test/CodeGen/ARM/ifcvt2.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=arm | FileCheck %s +; RUN: llc < %s -march=arm -mattr=+v4t | FileCheck %s define i32 @t1(i32 %a, i32 %b, i32 %c, i32 %d) { ; CHECK: t1: diff --git a/test/CodeGen/ARM/ifcvt3.ll b/test/CodeGen/ARM/ifcvt3.ll index f7ebac6..3e2c578 100644 --- a/test/CodeGen/ARM/ifcvt3.ll +++ b/test/CodeGen/ARM/ifcvt3.ll @@ -1,6 +1,6 @@ -; RUN: llc < %s -march=arm -; RUN: llc < %s -march=arm | grep cmpne | count 1 -; RUN: llc < %s -march=arm | grep bx | count 2 +; RUN: llc < %s -march=arm -mattr=+v4t +; RUN: llc < %s -march=arm -mattr=+v4t | grep cmpne | count 1 +; RUN: llc < %s -march=arm -mattr=+v4t | grep bx | count 2 define i32 @t1(i32 %a, i32 %b, i32 %c, i32 %d) { switch i32 %c, label %cond_next [ diff --git a/test/CodeGen/ARM/indirectbr.ll b/test/CodeGen/ARM/indirectbr.ll index f0ab9dd..25a0f93 100644 --- a/test/CodeGen/ARM/indirectbr.ll +++ b/test/CodeGen/ARM/indirectbr.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s -relocation-model=pic -mtriple=arm-apple-darwin | FileCheck %s -check-prefix=ARM -; RUN: llc < %s -relocation-model=pic -mtriple=thumb-apple-darwin | FileCheck %s -check-prefix=THUMB +; RUN: llc < %s -relocation-model=pic -mtriple=armv6-apple-darwin | FileCheck %s -check-prefix=ARM +; RUN: llc < %s -relocation-model=pic -mtriple=thumbv6-apple-darwin | FileCheck %s -check-prefix=THUMB ; RUN: llc < %s -relocation-model=static -mtriple=thumbv7-apple-darwin | FileCheck %s -check-prefix=THUMB2 @nextaddr = global i8* null ; <i8**> [#uses=2] diff --git a/test/CodeGen/ARM/inlineasm3.ll b/test/CodeGen/ARM/inlineasm3.ll index 58687b9..853585d 100644 --- a/test/CodeGen/ARM/inlineasm3.ll +++ b/test/CodeGen/ARM/inlineasm3.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s +; RUN: llc < %s -march=arm -mattr=+neon,+v6t2 | FileCheck %s ; Radar 7449043 %struct.int32x4_t = type { <4 x i32> } @@ -58,3 +58,43 @@ entry: call void asm sideeffect "flds s15, $0 \0A", "*^Uvm,~{s15}"(float* @k.2126) nounwind ret i32 0 } + +; Radar 9307836 & 9119939 + +define float @t6(float %y) nounwind { +entry: +; CHECK: t6 +; CHECK: flds s15, s0 + %0 = tail call float asm "flds s15, $0", "=x"() nounwind + ret float %0 +} + +; Radar 9307836 & 9119939 + +define double @t7(double %y) nounwind { +entry: +; CHECK: t7 +; CHECK: flds s15, d0 + %0 = tail call double asm "flds s15, $0", "=x"() nounwind + ret double %0 +} + +; Radar 9307836 & 9119939 + +define float @t8(float %y) nounwind { +entry: +; CHECK: t8 +; CHECK: flds s15, s0 + %0 = tail call float asm "flds s15, $0", "=t"() nounwind + ret float %0 +} + +; Radar 9307836 & 9119939 + +define i32 @t9(i32 %r0) nounwind { +entry: +; CHECK: t9 +; CHECK: movw r0, #27182 + %0 = tail call i32 asm "movw $0, $1", "=r,j"(i32 27182) nounwind + ret i32 %0 +} diff --git a/test/CodeGen/ARM/jumptable-label.ll b/test/CodeGen/ARM/jumptable-label.ll new file mode 100644 index 0000000..49d6986 --- /dev/null +++ b/test/CodeGen/ARM/jumptable-label.ll @@ -0,0 +1,33 @@ +; RUN: llc < %s -mtriple thumbv6-apple-macosx10.6.0 | FileCheck %s + +; test that we print the label of a bb that is only used in a jump table. + +; CHECK: .long LBB0_2 +; CHECK: LBB0_2: + +define i32 @calculate() { +entry: + switch i32 undef, label %return [ + i32 1, label %sw.bb + i32 2, label %sw.bb6 + i32 3, label %sw.bb13 + i32 4, label %sw.bb20 + ] + +sw.bb: ; preds = %entry + br label %return + +sw.bb6: ; preds = %entry + br label %return + +sw.bb13: ; preds = %entry + br label %return + +sw.bb20: ; preds = %entry + %div = sdiv i32 undef, undef + br label %return + +return: ; preds = %sw.bb20, %sw.bb13, %sw.bb6, %sw.bb, %entry + %retval.0 = phi i32 [ %div, %sw.bb20 ], [ undef, %sw.bb13 ], [ undef, %sw.bb6 ], [ undef, %sw.bb ], [ 0, %entry ] + ret i32 %retval.0 +} diff --git a/test/CodeGen/ARM/ldr_frame.ll b/test/CodeGen/ARM/ldr_frame.ll index a3abdb6..f071b89 100644 --- a/test/CodeGen/ARM/ldr_frame.ll +++ b/test/CodeGen/ARM/ldr_frame.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=arm | not grep mov +; RUN: llc < %s -march=arm -mattr=+v4t | not grep mov define i32 @f1() { %buf = alloca [32 x i32], align 4 diff --git a/test/CodeGen/ARM/long.ll b/test/CodeGen/ARM/long.ll index e401dca..0f1c7be 100644 --- a/test/CodeGen/ARM/long.ll +++ b/test/CodeGen/ARM/long.ll @@ -14,14 +14,14 @@ entry: define i64 @f3() { ; CHECK: f3: -; CHECK: mvn r0, #2, #2 +; CHECK: mvn r0, #-2147483648 entry: ret i64 2147483647 } define i64 @f4() { ; CHECK: f4: -; CHECK: mov r0, #2, #2 +; CHECK: mov r0, #-2147483648 entry: ret i64 2147483648 } @@ -29,7 +29,7 @@ entry: define i64 @f5() { ; CHECK: f5: ; CHECK: mvn r0, #0 -; CHECK: mvn r1, #2, #2 +; CHECK: mvn r1, #-2147483648 entry: ret i64 9223372036854775807 } diff --git a/test/CodeGen/ARM/lsr-unfolded-offset.ll b/test/CodeGen/ARM/lsr-unfolded-offset.ll index e3e6eae..61b25bb 100644 --- a/test/CodeGen/ARM/lsr-unfolded-offset.ll +++ b/test/CodeGen/ARM/lsr-unfolded-offset.ll @@ -4,12 +4,13 @@ ; register pressure and therefore spilling. There is more room for improvement ; here. -; CHECK: sub sp, #{{32|24}} +; CHECK: sub sp, #{{32|28|24}} -; CHECK: ldr r{{.*}}, [sp, #4] -; CHECK-NEXT: ldr r{{.*}}, [sp, #16] -; CHECK-NEXT: ldr r{{.*}}, [sp, #12] -; CHECK-NEXT: adds +; CHECK: %for.inc +; CHECK: ldr{{(.w)?}} r{{.*}}, [sp, # +; CHECK: ldr{{(.w)?}} r{{.*}}, [sp, # +; CHECK: ldr{{(.w)?}} r{{.*}}, [sp, # +; CHECK: add target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32" target triple = "thumbv7-apple-macosx10.7.0" diff --git a/test/CodeGen/ARM/memcpy-inline.ll b/test/CodeGen/ARM/memcpy-inline.ll index 5bae037..30b9f59 100644 --- a/test/CodeGen/ARM/memcpy-inline.ll +++ b/test/CodeGen/ARM/memcpy-inline.ll @@ -6,13 +6,14 @@ ; CHECK: ldrb %struct.x = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } + @src = external global %struct.x @dst = external global %struct.x define i32 @t() { entry: - call void @llvm.memcpy.i32( i8* getelementptr (%struct.x* @dst, i32 0, i32 0), i8* getelementptr (%struct.x* @src, i32 0, i32 0), i32 11, i32 8 ) - ret i32 0 + call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds (%struct.x* @dst, i32 0, i32 0), i8* getelementptr inbounds (%struct.x* @src, i32 0, i32 0), i32 11, i32 8, i1 false) + ret i32 0 } -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind diff --git a/test/CodeGen/ARM/memfunc.ll b/test/CodeGen/ARM/memfunc.ll index 032129d..aeda022 100644 --- a/test/CodeGen/ARM/memfunc.ll +++ b/test/CodeGen/ARM/memfunc.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=arm -o - | FileCheck %s +; RUN: llc < %s -mtriple=armv7-apple-ios -o - | FileCheck %s ; RUN: llc < %s -mtriple=arm-none-eabi -o - | FileCheck --check-prefix=EABI %s @from = common global [500 x i32] zeroinitializer, align 4 @@ -9,24 +9,21 @@ entry: ; CHECK: memmove ; EABI: __aeabi_memmove - call void @llvm.memmove.i32( i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0 ) + call void @llvm.memmove.p0i8.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0, i1 false) ; CHECK: memcpy ; EABI: __aeabi_memcpy - call void @llvm.memcpy.i32( i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0 ) + call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0, i1 false) ; EABI memset swaps arguments ; CHECK: mov r1, #0 ; CHECK: memset ; EABI: mov r2, #0 ; EABI: __aeabi_memset - call void @llvm.memset.i32( i8* bitcast ([500 x i32]* @from to i8*), i8 0, i32 500, i32 0 ) + call void @llvm.memset.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8 0, i32 500, i32 0, i1 false) unreachable } -declare void @llvm.memmove.i32(i8*, i8*, i32, i32) - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) - -declare void @llvm.memset.i32(i8*, i8, i32, i32) - +declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind +declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind diff --git a/test/CodeGen/ARM/phi.ll b/test/CodeGen/ARM/phi.ll index 29e17c0..dc1a95b 100644 --- a/test/CodeGen/ARM/phi.ll +++ b/test/CodeGen/ARM/phi.ll @@ -1,4 +1,4 @@ -; RUN: llc -march=arm < %s | FileCheck %s +; RUN: llc -march=arm -mattr=+v4t < %s | FileCheck %s ; <rdar://problem/8686347> define i32 @test1(i1 %a, i32* %b) { @@ -20,4 +20,4 @@ end: %r = load i32* %gep ; CHECK-NEXT: bx lr ret i32 %r -}
\ No newline at end of file +} diff --git a/test/CodeGen/ARM/prefetch.ll b/test/CodeGen/ARM/prefetch.ll index 95f082a..9c8ff2b 100644 --- a/test/CodeGen/ARM/prefetch.ll +++ b/test/CodeGen/ARM/prefetch.ll @@ -1,6 +1,6 @@ ; RUN: llc < %s -march=thumb -mattr=-thumb2 | not grep pld -; RUN: llc < %s -march=thumb -mattr=+v7a | FileCheck %s -check-prefix=THUMB2 -; RUN: llc < %s -march=arm -mattr=+v7a | FileCheck %s -check-prefix=ARM +; RUN: llc < %s -march=thumb -mattr=+v7 | FileCheck %s -check-prefix=THUMB2 +; RUN: llc < %s -march=arm -mattr=+v7 | FileCheck %s -check-prefix=ARM ; RUN: llc < %s -march=arm -mcpu=cortex-a9-mp | FileCheck %s -check-prefix=ARM-MP ; rdar://8601536 @@ -17,8 +17,8 @@ entry: ; THUMB2: t1: ; THUMB2-NOT: pldw [r0] ; THUMB2: pld [r0] - tail call void @llvm.prefetch( i8* %ptr, i32 1, i32 3 ) - tail call void @llvm.prefetch( i8* %ptr, i32 0, i32 3 ) + tail call void @llvm.prefetch( i8* %ptr, i32 1, i32 3, i32 1 ) + tail call void @llvm.prefetch( i8* %ptr, i32 0, i32 3, i32 1 ) ret void } @@ -30,7 +30,7 @@ entry: ; THUMB2: t2: ; THUMB2: pld [r0, #1023] %tmp = getelementptr i8* %ptr, i32 1023 - tail call void @llvm.prefetch( i8* %tmp, i32 0, i32 3 ) + tail call void @llvm.prefetch( i8* %tmp, i32 0, i32 3, i32 1 ) ret void } @@ -45,7 +45,7 @@ entry: %tmp1 = lshr i32 %offset, 2 %tmp2 = add i32 %base, %tmp1 %tmp3 = inttoptr i32 %tmp2 to i8* - tail call void @llvm.prefetch( i8* %tmp3, i32 0, i32 3 ) + tail call void @llvm.prefetch( i8* %tmp3, i32 0, i32 3, i32 1 ) ret void } @@ -59,8 +59,19 @@ entry: %tmp1 = shl i32 %offset, 2 %tmp2 = add i32 %base, %tmp1 %tmp3 = inttoptr i32 %tmp2 to i8* - tail call void @llvm.prefetch( i8* %tmp3, i32 0, i32 3 ) + tail call void @llvm.prefetch( i8* %tmp3, i32 0, i32 3, i32 1 ) ret void } -declare void @llvm.prefetch(i8*, i32, i32) nounwind +declare void @llvm.prefetch(i8*, i32, i32, i32) nounwind + +define void @t5(i8* %ptr) nounwind { +entry: +; ARM: t5: +; ARM: pli [r0] + +; THUMB2: t5: +; THUMB2: pli [r0] + tail call void @llvm.prefetch( i8* %ptr, i32 0, i32 3, i32 0 ) + ret void +} diff --git a/test/CodeGen/ARM/private.ll b/test/CodeGen/ARM/private.ll index fba56b4..f93ffe7 100644 --- a/test/CodeGen/ARM/private.ll +++ b/test/CodeGen/ARM/private.ll @@ -6,8 +6,6 @@ ; RUN: grep .Lbaz: %t ; RUN: grep long.*\.Lbaz %t -declare void @foo() - define private void @foo() { ret void } diff --git a/test/CodeGen/ARM/reg_sequence.ll b/test/CodeGen/ARM/reg_sequence.ll index d350937..3a19211 100644 --- a/test/CodeGen/ARM/reg_sequence.ll +++ b/test/CodeGen/ARM/reg_sequence.ll @@ -124,7 +124,7 @@ return1: return2: ; CHECK: %return2 ; CHECK: vadd.i32 -; CHECK: vmov {{q[0-9]+}}, {{q[0-9]+}} +; CHECK: vorr {{q[0-9]+}}, {{q[0-9]+}} ; CHECK-NOT: vmov ; CHECK: vst2.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}} %tmp100 = extractvalue %struct.__neon_int32x4x2_t %tmp2, 0 ; <<4 x i32>> [#uses=1] @@ -139,7 +139,7 @@ define <8 x i16> @t5(i16* %A, <8 x i16>* %B) nounwind { ; CHECK: t5: ; CHECK: vldmia ; How can FileCheck match Q and D registers? We need a lisp interpreter. -; CHECK: vmov {{q[0-9]+}}, {{q[0-9]+}} +; CHECK: vorr {{q[0-9]+}}, {{q[0-9]+}}, {{q[0-9]+}} ; CHECK-NOT: vmov ; CHECK: vld2.16 {d{{[0-9]+}}[1], d{{[0-9]+}}[1]}, [r0] ; CHECK-NOT: vmov @@ -156,7 +156,7 @@ define <8 x i16> @t5(i16* %A, <8 x i16>* %B) nounwind { define <8 x i8> @t6(i8* %A, <8 x i8>* %B) nounwind { ; CHECK: t6: ; CHECK: vldr.64 -; CHECK: vmov d[[D0:[0-9]+]], d[[D1:[0-9]+]] +; CHECK: vorr d[[D0:[0-9]+]], d[[D1:[0-9]+]] ; CHECK-NEXT: vld2.8 {d[[D1]][1], d[[D0]][1]} %tmp1 = load <8 x i8>* %B ; <<8 x i8>> [#uses=2] %tmp2 = call %struct.__neon_int8x8x2_t @llvm.arm.neon.vld2lane.v8i8(i8* %A, <8 x i8> %tmp1, <8 x i8> %tmp1, i32 1, i32 1) ; <%struct.__neon_int8x8x2_t> [#uses=2] @@ -172,7 +172,7 @@ entry: ; CHECK: vld2.32 ; CHECK: vst2.32 ; CHECK: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, -; CHECK: vmov q[[Q0:[0-9]+]], q[[Q1:[0-9]+]] +; CHECK: vorr q[[Q0:[0-9]+]], q[[Q1:[0-9]+]], q[[Q1:[0-9]+]] ; CHECK-NOT: vmov ; CHECK: vuzp.32 q[[Q1]], q[[Q0]] ; CHECK: vst1.32 @@ -272,8 +272,8 @@ define arm_aapcs_vfpcc float @t9(%0* nocapture, %3* nocapture) nounwind { define arm_aapcs_vfpcc i32 @t10() nounwind { entry: ; CHECK: t10: -; CHECK: vmul.f32 q8, q8, d0[0] ; CHECK: vmov.i32 q[[Q0:[0-9]+]], #0x3F000000 +; CHECK: vmul.f32 q8, q8, d0[0] ; CHECK: vadd.f32 q8, q8, q8 %0 = shufflevector <4 x float> zeroinitializer, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>> [#uses=1] %1 = insertelement <4 x float> %0, float undef, i32 1 ; <<4 x float>> [#uses=1] diff --git a/test/CodeGen/ARM/rev.ll b/test/CodeGen/ARM/rev.ll index 4170ff3..ea44c28 100644 --- a/test/CodeGen/ARM/rev.ll +++ b/test/CodeGen/ARM/rev.ll @@ -54,3 +54,73 @@ entry: %conv8 = ashr exact i32 %sext, 16 ret i32 %conv8 } + +; rdar://9609059 +define i32 @test5(i32 %i) nounwind readnone { +entry: +; CHECK: test5 +; CHECK: revsh r0, r0 + %shl = shl i32 %i, 24 + %shr = ashr exact i32 %shl, 16 + %shr23 = lshr i32 %i, 8 + %and = and i32 %shr23, 255 + %or = or i32 %shr, %and + ret i32 %or +} + +; rdar://9609108 +define i32 @test6(i32 %x) nounwind readnone { +entry: +; CHECK: test6 +; CHECK: rev16 r0, r0 + %and = shl i32 %x, 8 + %shl = and i32 %and, 65280 + %and2 = lshr i32 %x, 8 + %shr11 = and i32 %and2, 255 + %shr5 = and i32 %and2, 16711680 + %shl9 = and i32 %and, -16777216 + %or = or i32 %shr5, %shl9 + %or6 = or i32 %or, %shr11 + %or10 = or i32 %or6, %shl + ret i32 %or10 +} + +; rdar://9164521 +define i32 @test7(i32 %a) nounwind readnone { +entry: +; CHECK: test7 +; CHECK: rev r0, r0 +; CHECK: lsr r0, r0, #16 + %and = lshr i32 %a, 8 + %shr3 = and i32 %and, 255 + %and2 = shl i32 %a, 8 + %shl = and i32 %and2, 65280 + %or = or i32 %shr3, %shl + ret i32 %or +} + +define i32 @test8(i32 %a) nounwind readnone { +entry: +; CHECK: test8 +; CHECK: revsh r0, r0 + %and = lshr i32 %a, 8 + %shr4 = and i32 %and, 255 + %and2 = shl i32 %a, 8 + %or = or i32 %shr4, %and2 + %sext = shl i32 %or, 16 + %conv3 = ashr exact i32 %sext, 16 + ret i32 %conv3 +} + +define zeroext i16 @test9(i16 zeroext %v) nounwind readnone { +entry: +; CHECK: test9 +; CHECK: rev r0, r0 +; CHECK: lsr r0, r0, #16 + %conv = zext i16 %v to i32 + %shr4 = lshr i32 %conv, 8 + %shl = shl nuw nsw i32 %conv, 8 + %or = or i32 %shr4, %shl + %conv3 = trunc i32 %or to i16 + ret i16 %conv3 +} diff --git a/test/CodeGen/ARM/section.ll b/test/CodeGen/ARM/section.ll index 7a566d4..2762056 100644 --- a/test/CodeGen/ARM/section.ll +++ b/test/CodeGen/ARM/section.ll @@ -1,7 +1,6 @@ -; RUN: llc < %s -mtriple=arm-linux | \ -; RUN: grep {__DTOR_END__:} -; RUN: llc < %s -mtriple=arm-linux | \ -; RUN: grep {\\.section.\\.dtors,"aw",.progbits} +; RUN: llc < %s -mtriple=arm-linux | FileCheck %s +; CHECK: .section .dtors,"aw",%progbits +; CHECK: __DTOR_END__: @__DTOR_END__ = internal global [1 x i32] zeroinitializer, section ".dtors" ; <[1 x i32]*> [#uses=0] diff --git a/test/CodeGen/ARM/select-imm.ll b/test/CodeGen/ARM/select-imm.ll index 43f8a66..f43dde5 100644 --- a/test/CodeGen/ARM/select-imm.ll +++ b/test/CodeGen/ARM/select-imm.ll @@ -6,7 +6,7 @@ define i32 @t1(i32 %c) nounwind readnone { entry: ; ARM: t1: ; ARM: mov [[R1:r[0-9]+]], #101 -; ARM: orr [[R1b:r[0-9]+]], [[R1]], #1, #24 +; ARM: orr [[R1b:r[0-9]+]], [[R1]], #256 ; ARM: movgt r0, #123 ; ARMT2: t1: @@ -27,7 +27,7 @@ entry: ; ARM: t2: ; ARM: mov r0, #123 ; ARM: movgt r0, #101 -; ARM: orrgt r0, r0, #1, #24 +; ARM: orrgt r0, r0, #256 ; ARMT2: t2: ; ARMT2: mov r0, #123 @@ -76,3 +76,39 @@ entry: %1 = select i1 %0, i32 4283826005, i32 %x ret i32 %1 } + +; rdar://9758317 +define i32 @t5(i32 %a) nounwind { +entry: +; ARM: t5: +; ARM-NOT: mov +; ARM: cmp r0, #1 +; ARM-NOT: mov +; ARM: movne r0, #0 + +; THUMB2: t5: +; THUMB2-NOT: mov +; THUMB2: cmp r0, #1 +; THUMB2: it ne +; THUMB2: movne r0, #0 + %cmp = icmp eq i32 %a, 1 + %conv = zext i1 %cmp to i32 + ret i32 %conv +} + +define i32 @t6(i32 %a) nounwind { +entry: +; ARM: t6: +; ARM-NOT: mov +; ARM: cmp r0, #0 +; ARM: movne r0, #1 + +; THUMB2: t6: +; THUMB2-NOT: mov +; THUMB2: cmp r0, #0 +; THUMB2: it ne +; THUMB2: movne r0, #1 + %tobool = icmp ne i32 %a, 0 + %lnot.ext = zext i1 %tobool to i32 + ret i32 %lnot.ext +} diff --git a/test/CodeGen/ARM/select_xform.ll b/test/CodeGen/ARM/select_xform.ll index 4211797..8a3133a 100644 --- a/test/CodeGen/ARM/select_xform.ll +++ b/test/CodeGen/ARM/select_xform.ll @@ -4,7 +4,7 @@ define i32 @t1(i32 %a, i32 %b, i32 %c) nounwind { ; ARM: t1: -; ARM: sub r0, r1, #6, #2 +; ARM: sub r0, r1, #-2147483647 ; ARM: movgt r0, r1 ; T2: t1: diff --git a/test/CodeGen/ARM/sub.ll b/test/CodeGen/ARM/sub.ll index 555b18e..06ea703 100644 --- a/test/CodeGen/ARM/sub.ll +++ b/test/CodeGen/ARM/sub.ll @@ -12,7 +12,7 @@ define i64 @f1(i64 %a) { ; 66846720 = 0x03fc0000 define i64 @f2(i64 %a) { ; CHECK: f2 -; CHECK: subs r0, r0, #255, #14 +; CHECK: subs r0, r0, #66846720 ; CHECK: sbc r1, r1, #0 %tmp = sub i64 %a, 66846720 ret i64 %tmp diff --git a/test/CodeGen/ARM/sxt_rot.ll b/test/CodeGen/ARM/sxt_rot.ll index 4752f17..355fee3 100644 --- a/test/CodeGen/ARM/sxt_rot.ll +++ b/test/CodeGen/ARM/sxt_rot.ll @@ -10,7 +10,7 @@ define i32 @test0(i8 %A) { ret i32 %B } -define i8 @test1(i32 %A) signext { +define signext i8 @test1(i32 %A) { %B = lshr i32 %A, 8 %C = shl i32 %A, 24 %D = or i32 %B, %C @@ -18,7 +18,7 @@ define i8 @test1(i32 %A) signext { ret i8 %E } -define i32 @test2(i32 %A, i32 %X) signext { +define signext i32 @test2(i32 %A, i32 %X) { %B = lshr i32 %A, 8 %C = shl i32 %A, 24 %D = or i32 %B, %C diff --git a/test/CodeGen/ARM/truncstore-dag-combine.ll b/test/CodeGen/ARM/truncstore-dag-combine.ll index 2da08b6..5665440 100644 --- a/test/CodeGen/ARM/truncstore-dag-combine.ll +++ b/test/CodeGen/ARM/truncstore-dag-combine.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s -march=arm | not grep orr -; RUN: llc < %s -march=arm | not grep mov +; RUN: llc < %s -march=arm -mattr=+v4t | not grep orr +; RUN: llc < %s -march=arm -mattr=+v4t | not grep mov define void @bar(i8* %P, i16* %Q) { entry: diff --git a/test/CodeGen/ARM/uxt_rot.ll b/test/CodeGen/ARM/uxt_rot.ll index 6307795..628c079 100644 --- a/test/CodeGen/ARM/uxt_rot.ll +++ b/test/CodeGen/ARM/uxt_rot.ll @@ -2,19 +2,19 @@ ; RUN: llc < %s -march=arm -mattr=+v6 | grep uxtab | count 1 ; RUN: llc < %s -march=arm -mattr=+v6 | grep uxth | count 1 -define i8 @test1(i32 %A.u) zeroext { +define zeroext i8 @test1(i32 %A.u) { %B.u = trunc i32 %A.u to i8 ret i8 %B.u } -define i32 @test2(i32 %A.u, i32 %B.u) zeroext { +define zeroext i32 @test2(i32 %A.u, i32 %B.u) { %C.u = trunc i32 %B.u to i8 %D.u = zext i8 %C.u to i32 %E.u = add i32 %A.u, %D.u ret i32 %E.u } -define i32 @test3(i32 %A.u) zeroext { +define zeroext i32 @test3(i32 %A.u) { %B.u = lshr i32 %A.u, 8 %C.u = shl i32 %A.u, 24 %D.u = or i32 %B.u, %C.u diff --git a/test/CodeGen/ARM/vargs_align.ll b/test/CodeGen/ARM/vargs_align.ll index e4ef9e3..e390cf0 100644 --- a/test/CodeGen/ARM/vargs_align.ll +++ b/test/CodeGen/ARM/vargs_align.ll @@ -6,7 +6,6 @@ entry: %a_addr = alloca i32 ; <i32*> [#uses=1] %retval = alloca i32, align 4 ; <i32*> [#uses=2] %tmp = alloca i32, align 4 ; <i32*> [#uses=2] - "alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] store i32 %a, i32* %a_addr store i32 0, i32* %tmp %tmp1 = load i32* %tmp ; <i32> [#uses=1] diff --git a/test/CodeGen/ARM/vcvt_combine.ll b/test/CodeGen/ARM/vcvt_combine.ll new file mode 100644 index 0000000..3009e50 --- /dev/null +++ b/test/CodeGen/ARM/vcvt_combine.ll @@ -0,0 +1,99 @@ +; RUN: llc < %s -mtriple=armv7-apple-ios | FileCheck %s + +@in = global float 0x400921FA00000000, align 4 + +; Test signed conversion. +; CHECK: t0 +; CHECK-NOT: vmul +define void @t0() nounwind { +entry: + %tmp = load float* @in, align 4, !tbaa !0 + %vecinit.i = insertelement <2 x float> undef, float %tmp, i32 0 + %vecinit2.i = insertelement <2 x float> %vecinit.i, float %tmp, i32 1 + %mul.i = fmul <2 x float> %vecinit2.i, <float 8.000000e+00, float 8.000000e+00> + %vcvt.i = fptosi <2 x float> %mul.i to <2 x i32> + tail call void @foo_int32x2_t(<2 x i32> %vcvt.i) nounwind + ret void +} + +declare void @foo_int32x2_t(<2 x i32>) + +; Test unsigned conversion. +; CHECK: t1 +; CHECK-NOT: vmul +define void @t1() nounwind { +entry: + %tmp = load float* @in, align 4, !tbaa !0 + %vecinit.i = insertelement <2 x float> undef, float %tmp, i32 0 + %vecinit2.i = insertelement <2 x float> %vecinit.i, float %tmp, i32 1 + %mul.i = fmul <2 x float> %vecinit2.i, <float 8.000000e+00, float 8.000000e+00> + %vcvt.i = fptoui <2 x float> %mul.i to <2 x i32> + tail call void @foo_uint32x2_t(<2 x i32> %vcvt.i) nounwind + ret void +} + +declare void @foo_uint32x2_t(<2 x i32>) + +; Test which should not fold due to non-power of 2. +; CHECK: t2 +; CHECK: vmul +define void @t2() nounwind { +entry: + %tmp = load float* @in, align 4, !tbaa !0 + %vecinit.i = insertelement <2 x float> undef, float %tmp, i32 0 + %vecinit2.i = insertelement <2 x float> %vecinit.i, float %tmp, i32 1 + %mul.i = fmul <2 x float> %vecinit2.i, <float 0x401B333340000000, float 0x401B333340000000> + %vcvt.i = fptosi <2 x float> %mul.i to <2 x i32> + tail call void @foo_int32x2_t(<2 x i32> %vcvt.i) nounwind + ret void +} + +; Test which should not fold due to power of 2 out of range. +; CHECK: t3 +; CHECK: vmul +define void @t3() nounwind { +entry: + %tmp = load float* @in, align 4, !tbaa !0 + %vecinit.i = insertelement <2 x float> undef, float %tmp, i32 0 + %vecinit2.i = insertelement <2 x float> %vecinit.i, float %tmp, i32 1 + %mul.i = fmul <2 x float> %vecinit2.i, <float 0x4200000000000000, float 0x4200000000000000> + %vcvt.i = fptosi <2 x float> %mul.i to <2 x i32> + tail call void @foo_int32x2_t(<2 x i32> %vcvt.i) nounwind + ret void +} + +; Test which case where const is max power of 2 (i.e., 2^32). +; CHECK: t4 +; CHECK-NOT: vmul +define void @t4() nounwind { +entry: + %tmp = load float* @in, align 4, !tbaa !0 + %vecinit.i = insertelement <2 x float> undef, float %tmp, i32 0 + %vecinit2.i = insertelement <2 x float> %vecinit.i, float %tmp, i32 1 + %mul.i = fmul <2 x float> %vecinit2.i, <float 0x41F0000000000000, float 0x41F0000000000000> + %vcvt.i = fptosi <2 x float> %mul.i to <2 x i32> + tail call void @foo_int32x2_t(<2 x i32> %vcvt.i) nounwind + ret void +} + +; Test quadword. +; CHECK: t5 +; CHECK-NOT: vmul +define void @t5() nounwind { +entry: + %tmp = load float* @in, align 4, !tbaa !0 + %vecinit.i = insertelement <4 x float> undef, float %tmp, i32 0 + %vecinit2.i = insertelement <4 x float> %vecinit.i, float %tmp, i32 1 + %vecinit4.i = insertelement <4 x float> %vecinit2.i, float %tmp, i32 2 + %vecinit6.i = insertelement <4 x float> %vecinit4.i, float %tmp, i32 3 + %mul.i = fmul <4 x float> %vecinit6.i, <float 8.000000e+00, float 8.000000e+00, float 8.000000e+00, float 8.000000e+00> + %vcvt.i = fptosi <4 x float> %mul.i to <4 x i32> + tail call void @foo_int32x4_t(<4 x i32> %vcvt.i) nounwind + ret void +} + +declare void @foo_int32x4_t(<4 x i32>) + +!0 = metadata !{metadata !"float", metadata !1} +!1 = metadata !{metadata !"omnipotent char", metadata !2} +!2 = metadata !{metadata !"Simple C/C++ TBAA", null} diff --git a/test/CodeGen/ARM/vdiv_combine.ll b/test/CodeGen/ARM/vdiv_combine.ll new file mode 100644 index 0000000..1387393 --- /dev/null +++ b/test/CodeGen/ARM/vdiv_combine.ll @@ -0,0 +1,102 @@ +; RUN: llc < %s -mtriple=armv7-apple-ios | FileCheck %s + +@in = global float 0x400921FA00000000, align 4 +@iin = global i32 -1023, align 4 +@uin = global i32 1023, align 4 + +declare void @foo_int32x4_t(<4 x i32>) + +; Test signed conversion. +; CHECK: t1 +; CHECK-NOT: vdiv +define void @t1() nounwind { +entry: + %tmp = load i32* @iin, align 4, !tbaa !3 + %vecinit.i = insertelement <2 x i32> undef, i32 %tmp, i32 0 + %vecinit2.i = insertelement <2 x i32> %vecinit.i, i32 %tmp, i32 1 + %vcvt.i = sitofp <2 x i32> %vecinit2.i to <2 x float> + %div.i = fdiv <2 x float> %vcvt.i, <float 8.000000e+00, float 8.000000e+00> + tail call void @foo_float32x2_t(<2 x float> %div.i) nounwind + ret void +} + +declare void @foo_float32x2_t(<2 x float>) + +; Test unsigned conversion. +; CHECK: t2 +; CHECK-NOT: vdiv +define void @t2() nounwind { +entry: + %tmp = load i32* @uin, align 4, !tbaa !3 + %vecinit.i = insertelement <2 x i32> undef, i32 %tmp, i32 0 + %vecinit2.i = insertelement <2 x i32> %vecinit.i, i32 %tmp, i32 1 + %vcvt.i = uitofp <2 x i32> %vecinit2.i to <2 x float> + %div.i = fdiv <2 x float> %vcvt.i, <float 8.000000e+00, float 8.000000e+00> + tail call void @foo_float32x2_t(<2 x float> %div.i) nounwind + ret void +} + +; Test which should not fold due to non-power of 2. +; CHECK: t3 +; CHECK: vdiv +define void @t3() nounwind { +entry: + %tmp = load i32* @iin, align 4, !tbaa !3 + %vecinit.i = insertelement <2 x i32> undef, i32 %tmp, i32 0 + %vecinit2.i = insertelement <2 x i32> %vecinit.i, i32 %tmp, i32 1 + %vcvt.i = sitofp <2 x i32> %vecinit2.i to <2 x float> + %div.i = fdiv <2 x float> %vcvt.i, <float 0x401B333340000000, float 0x401B333340000000> + tail call void @foo_float32x2_t(<2 x float> %div.i) nounwind + ret void +} + +; Test which should not fold due to power of 2 out of range. +; CHECK: t4 +; CHECK: vdiv +define void @t4() nounwind { +entry: + %tmp = load i32* @iin, align 4, !tbaa !3 + %vecinit.i = insertelement <2 x i32> undef, i32 %tmp, i32 0 + %vecinit2.i = insertelement <2 x i32> %vecinit.i, i32 %tmp, i32 1 + %vcvt.i = sitofp <2 x i32> %vecinit2.i to <2 x float> + %div.i = fdiv <2 x float> %vcvt.i, <float 0x4200000000000000, float 0x4200000000000000> + tail call void @foo_float32x2_t(<2 x float> %div.i) nounwind + ret void +} + +; Test case where const is max power of 2 (i.e., 2^32). +; CHECK: t5 +; CHECK-NOT: vdiv +define void @t5() nounwind { +entry: + %tmp = load i32* @iin, align 4, !tbaa !3 + %vecinit.i = insertelement <2 x i32> undef, i32 %tmp, i32 0 + %vecinit2.i = insertelement <2 x i32> %vecinit.i, i32 %tmp, i32 1 + %vcvt.i = sitofp <2 x i32> %vecinit2.i to <2 x float> + %div.i = fdiv <2 x float> %vcvt.i, <float 0x41F0000000000000, float 0x41F0000000000000> + tail call void @foo_float32x2_t(<2 x float> %div.i) nounwind + ret void +} + +; Test quadword. +; CHECK: t6 +; CHECK-NOT: vdiv +define void @t6() nounwind { +entry: + %tmp = load i32* @iin, align 4, !tbaa !3 + %vecinit.i = insertelement <4 x i32> undef, i32 %tmp, i32 0 + %vecinit2.i = insertelement <4 x i32> %vecinit.i, i32 %tmp, i32 1 + %vecinit4.i = insertelement <4 x i32> %vecinit2.i, i32 %tmp, i32 2 + %vecinit6.i = insertelement <4 x i32> %vecinit4.i, i32 %tmp, i32 3 + %vcvt.i = sitofp <4 x i32> %vecinit6.i to <4 x float> + %div.i = fdiv <4 x float> %vcvt.i, <float 8.000000e+00, float 8.000000e+00, float 8.000000e+00, float 8.000000e+00> + tail call void @foo_float32x4_t(<4 x float> %div.i) nounwind + ret void +} + +declare void @foo_float32x4_t(<4 x float>) + +!0 = metadata !{metadata !"float", metadata !1} +!1 = metadata !{metadata !"omnipotent char", metadata !2} +!2 = metadata !{metadata !"Simple C/C++ TBAA", null} +!3 = metadata !{metadata !"int", metadata !1} diff --git a/test/CodeGen/ARM/vmul.ll b/test/CodeGen/ARM/vmul.ll index 1fd6581..1780d6e 100644 --- a/test/CodeGen/ARM/vmul.ll +++ b/test/CodeGen/ARM/vmul.ll @@ -439,9 +439,9 @@ define <2 x i64> @vmull_extvec_u32(<2 x i32> %arg) nounwind { } ; rdar://9197392 -define void @distribue(i16* %dst, i8* %src, i32 %mul) nounwind { +define void @distribute(i16* %dst, i8* %src, i32 %mul) nounwind { entry: -; CHECK: distribue: +; CHECK: distribute: ; CHECK: vmull.u8 [[REG1:(q[0-9]+)]], d{{.*}}, [[REG2:(d[0-9]+)]] ; CHECK: vmlal.u8 [[REG1]], d{{.*}}, [[REG2]] %0 = trunc i32 %mul to i8 @@ -471,9 +471,9 @@ declare void @llvm.arm.neon.vst1.v8i16(i8*, <8 x i16>, i32) nounwind %struct.uint8x8_t = type { <8 x i8> } -define void @distribue2(%struct.uint8x8_t* nocapture %dst, i8* %src, i32 %mul) nounwind { +define void @distribute2(%struct.uint8x8_t* nocapture %dst, i8* %src, i32 %mul) nounwind { entry: -; CHECK: distribue2 +; CHECK: distribute2 ; CHECK-NOT: vadd.i8 ; CHECK: vmul.i8 ; CHECK: vmla.i8 @@ -492,3 +492,25 @@ entry: store <8 x i8> %10, <8 x i8>* %11, align 8 ret void } + +define void @distribute2_commutative(%struct.uint8x8_t* nocapture %dst, i8* %src, i32 %mul) nounwind { +entry: +; CHECK: distribute2_commutative +; CHECK-NOT: vadd.i8 +; CHECK: vmul.i8 +; CHECK: vmla.i8 + %0 = trunc i32 %mul to i8 + %1 = insertelement <8 x i8> undef, i8 %0, i32 0 + %2 = shufflevector <8 x i8> %1, <8 x i8> undef, <8 x i32> zeroinitializer + %3 = tail call <16 x i8> @llvm.arm.neon.vld1.v16i8(i8* %src, i32 1) + %4 = bitcast <16 x i8> %3 to <2 x double> + %5 = extractelement <2 x double> %4, i32 1 + %6 = bitcast double %5 to <8 x i8> + %7 = extractelement <2 x double> %4, i32 0 + %8 = bitcast double %7 to <8 x i8> + %9 = add <8 x i8> %6, %8 + %10 = mul <8 x i8> %2, %9 + %11 = getelementptr inbounds %struct.uint8x8_t* %dst, i32 0, i32 0 + store <8 x i8> %10, <8 x i8>* %11, align 8 + ret void +} diff --git a/test/CodeGen/ARM/vpadd.ll b/test/CodeGen/ARM/vpadd.ll index 2125573..1ba68f5 100644 --- a/test/CodeGen/ARM/vpadd.ll +++ b/test/CodeGen/ARM/vpadd.ll @@ -138,6 +138,20 @@ define <2 x i64> @vpaddlQu32(<4 x i32>* %A) nounwind { ret <2 x i64> %tmp2 } +; Test AddCombine optimization that generates a vpaddl.s +define void @addCombineToVPADDL() nounwind ssp { +; CHECK: vpaddl.s8 + %cbcr = alloca <16 x i8>, align 16 + %X = alloca <8 x i8>, align 8 + %tmp = load <16 x i8>* %cbcr + %tmp1 = shufflevector <16 x i8> %tmp, <16 x i8> undef, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14> + %tmp2 = load <16 x i8>* %cbcr + %tmp3 = shufflevector <16 x i8> %tmp2, <16 x i8> undef, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15> + %add = add <8 x i8> %tmp3, %tmp1 + store <8 x i8> %add, <8 x i8>* %X, align 8 + ret void +} + declare <4 x i16> @llvm.arm.neon.vpaddls.v4i16.v8i8(<8 x i8>) nounwind readnone declare <2 x i32> @llvm.arm.neon.vpaddls.v2i32.v4i16(<4 x i16>) nounwind readnone declare <1 x i64> @llvm.arm.neon.vpaddls.v1i64.v2i32(<2 x i32>) nounwind readnone diff --git a/test/CodeGen/ARM/vqdmul.ll b/test/CodeGen/ARM/vqdmul.ll index 8dcc7f7..08e7d2b 100644 --- a/test/CodeGen/ARM/vqdmul.ll +++ b/test/CodeGen/ARM/vqdmul.ll @@ -152,7 +152,6 @@ entry: ret <2 x i32> %1 } -declare <2 x i32> @llvm.arm.neon.vqrdmulh.v2i32(<2 x i32>, <2 x i32>) nounwind readnone declare <4 x i16> @llvm.arm.neon.vqrdmulh.v4i16(<4 x i16>, <4 x i16>) nounwind readnone declare <2 x i32> @llvm.arm.neon.vqrdmulh.v2i32(<2 x i32>, <2 x i32>) nounwind readnone |