llvm.org GIT mirror llvm / 9445e9a
For PR1553: Change the keywords for the zext and sext parameter attributes to be zeroext and signext so they don't conflict with the keywords for the instructions of the same name. This gets around the ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40069 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 12 years ago
29 changed file(s) with 149 addition(s) and 137 deletion(s). Raw diff Collapse all Expand all
759759
760760
761761

                  
                
762 %someFunc = i16 (i8 sext %someParam) zext
763 %someFunc = i16 (i8 zext %someParam) zext
762 %someFunc = i16 (i8 signext %someParam) zeroext
763 %someFunc = i16 (i8 zeroext %someParam) zeroext
764764
765765
766766
767767

Note that the two function types above are unique because the parameter has

768 a different attribute (sext in the first one, zext in the second). Also note
769 that the attribute for the function result (zext) comes immediately after the
770 argument list.

768 a different attribute (signext in the first one, zeroext in
769 the second). Also note that the attribute for the function result
770 (zeroext) comes immediately after the argument list.

771771
772772

Currently, only the following parameter attributes are defined:

773773
774
zext
774
zeroext
775775
This indicates that the parameter should be zero extended just before
776776 a call to this function.
777
sext
777
signext
778778
This indicates that the parameter should be sign extended just before
779779 a call to this function.
780780
inreg
11301130 function taking an i32, returning an i32
11311131
11321132
1133 float (i16 sext, i32 *) *
1133 float (i16 signext, i32 *) *
11341134
11351135 Pointer to a function that takes
11361136 an i16 that should be sign extended and a
224224 x86_stdcallcc { return X86_STDCALLCC_TOK; }
225225 x86_fastcallcc { return X86_FASTCALLCC_TOK; }
226226
227 signext { return SIGNEXT; }
228 zeroext { return ZEROEXT; }
227229 inreg { return INREG; }
228230 sret { return SRET; }
229231 nounwind { return NOUNWIND; }
11001100 %token EXTRACTELEMENT INSERTELEMENT SHUFFLEVECTOR
11011101
11021102 // Function Attributes
1103 %token NORETURN INREG SRET NOUNWIND NOALIAS BYVAL
1103 %token SIGNEXT ZEROEXT NORETURN INREG SRET NOUNWIND NOALIAS BYVAL
11041104
11051105 // Visibility Styles
11061106 %token DEFAULT HIDDEN PROTECTED
12231223 CHECK_FOR_ERROR
12241224 };
12251225
1226 ParamAttr : ZEXT { $$ = ParamAttr::ZExt; }
1227 | SEXT { $$ = ParamAttr::SExt; }
1226 ParamAttr : ZEROEXT { $$ = ParamAttr::ZExt; }
1227 | SIGNEXT { $$ = ParamAttr::SExt; }
12281228 | INREG { $$ = ParamAttr::InReg; }
12291229 | SRET { $$ = ParamAttr::StructRet; }
12301230 | NOALIAS { $$ = ParamAttr::NoAlias; }
12391239
12401240 FuncAttr : NORETURN { $$ = ParamAttr::NoReturn; }
12411241 | NOUNWIND { $$ = ParamAttr::NoUnwind; }
1242 | ParamAttr
1242 | ZEROEXT { $$ = ParamAttr::ZExt; }
1243 | SIGNEXT { $$ = ParamAttr::SExt; }
12431244 ;
12441245
12451246 OptFuncAttrs : /* empty */ { $$ = ParamAttr::None; }
8989 ParamAttrsList::getParamAttrsText(uint16_t Attrs) {
9090 std::string Result;
9191 if (Attrs & ParamAttr::ZExt)
92 Result += "zext ";
92 Result += "zeroext ";
9393 if (Attrs & ParamAttr::SExt)
94 Result += "sext ";
94 Result += "signext ";
9595 if (Attrs & ParamAttr::NoReturn)
9696 Result += "noreturn ";
9797 if (Attrs & ParamAttr::NoUnwind)
0 ; PR1553
1 ; RUN: llvm-as < %s > /dev/null
2 define void @bar() {
3 %t = call i8 @foo( i8 10 )
4 zext i8 %t to i32
5 ret void
6 }
7
8 declare i8 @foo(i8)
None // RUN: %llvmgcc %s -o - -S -emit-llvm -O3 | grep {i8 sext}
0 // RUN: %llvmgcc %s -o - -S -emit-llvm -O3 | grep {i8 signext}
11 // PR1513
22
33 struct s{
88 %struct.__fooString = type opaque
99 %struct.__fooV = type opaque
1010 %struct.fooXBase = type { i32, [4 x i8] }
11 %struct.fooXClass = type { i32, i8*, void (i8*)*, i8* (%struct.__fooAllocator*, i8*)*, void (i8*)*, i8 (i8*, i8*) zext *, i32 (i8*)*, %struct.__fooString* (i8*, %struct.__fooZ*)*, %struct.__fooString* (i8*)* }
11 %struct.fooXClass = type { i32, i8*, void (i8*)*, i8* (%struct.__fooAllocator*, i8*)*, void (i8*)*, i8 (i8*, i8*) zeroext *, i32 (i8*)*, %struct.__fooString* (i8*, %struct.__fooZ*)*, %struct.__fooString* (i8*)* }
1212 %struct.aa_cache = type { i32, i32, [1 x %struct.aa_method*] }
1313 %struct.aa_class = type { %struct.aa_class*, %struct.aa_class*, i8*, i32, i32, i32, %struct.aa_ivar_list*, %struct.aa_method_list**, %struct.aa_cache*, %struct.aa_protocol_list* }
1414 %struct.aa_ivar = type { i8*, i8*, i32 }
2626 @str15 = external constant [24 x i8] ; <[24 x i8]*> [#uses=1]
2727
2828
29 define i8 @test(%struct.__fooY* %calendar, double* %atp, i8* %componentDesc, ...) zext {
29 define i8 @test(%struct.__fooY* %calendar, double* %atp, i8* %componentDesc, ...) zeroext {
3030 entry:
3131 %args = alloca i8*, align 4 ; [#uses=5]
3232 %args4 = bitcast i8** %args to i8* ; [#uses=2]
7474 %tmp63 = call %struct.aa_ss* @sel_registerName( i8* getelementptr ([24 x i8]* @str15, i32 0, i32 0) ) ; <%struct.aa_ss*> [#uses=2]
7575 store %struct.aa_ss* %tmp63, %struct.aa_ss** @s.10319
7676 %tmp66137 = volatile load i8** %args ; [#uses=1]
77 %tmp73138 = call i8 (i8*, %struct.aa_ss*, ...) zext * bitcast (%struct.aa_object* (%struct.aa_object*, %struct.aa_ss*, ...)* @aa_mm to i8 (i8*, %struct.aa_ss*, ...) zext *)( i8* %tmp6869, %struct.aa_ss* %tmp63, double* %atp, i8* %componentDesc, i8* %tmp66137 ) zext ; [#uses=1]
77 %tmp73138 = call i8 (i8*, %struct.aa_ss*, ...) zeroext * bitcast (%struct.aa_object* (%struct.aa_object*, %struct.aa_ss*, ...)* @aa_mm to i8 (i8*, %struct.aa_ss*, ...) zeroext *)( i8* %tmp6869, %struct.aa_ss* %tmp63, double* %atp, i8* %componentDesc, i8* %tmp66137) zeroext ; [#uses=1]
7878 ret i8 %tmp73138
7979
8080 cond_next64: ; preds = %cond_true58
8181 %tmp66 = volatile load i8** %args ; [#uses=1]
82 %tmp73 = call i8 (i8*, %struct.aa_ss*, ...) zext * bitcast (%struct.aa_object* (%struct.aa_object*, %struct.aa_ss*, ...)* @aa_mm to i8 (i8*, %struct.aa_ss*, ...) zext *)( i8* %tmp6869, %struct.aa_ss* %tmp59, double* %atp, i8* %componentDesc, i8* %tmp66 ) zext ; [#uses=1]
82 %tmp73 = call i8 (i8*, %struct.aa_ss*, ...) zeroext * bitcast (%struct.aa_object* (%struct.aa_object*, %struct.aa_ss*, ...)* @aa_mm to i8 (i8*, %struct.aa_ss*, ...) zeroext *)( i8* %tmp6869, %struct.aa_ss* %tmp59, double* %atp, i8* %componentDesc, i8* %tmp66 ) zeroext ; [#uses=1]
8383 ret i8 %tmp73
8484
8585 cond_true111: ; preds = %cond_true111, %bb48
9797
9898 bb114: ; preds = %cond_true111, %bb48
9999 call void @llvm.va_end( i8* %args4 )
100 %tmp122 = call i8 @_fooYCCV( %struct.__fooY* %calendar, double* %atp, i8* %componentDesc, i32* %tmp92, i32 %tmp78 ) zext ; [#uses=1]
100 %tmp122 = call i8 @_fooYCCV( %struct.__fooY* %calendar, double* %atp, i8* %componentDesc, i32* %tmp92, i32 %tmp78 ) zeroext ; [#uses=1]
101101 ret i8 %tmp122
102102 }
103103
104104 declare i32 @_fooXRegisterClass(%struct.fooXClass*)
105105
106 declare i8 @_fooYCCV(%struct.__fooY*, double*, i8*, i32*, i32) zext
106 declare i8 @_fooYCCV(%struct.__fooY*, double*, i8*, i32*, i32) zeroext
107107
108108 declare %struct.aa_object* @aa_mm(%struct.aa_object*, %struct.aa_ss*, ...)
109109
4646 %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 }
4747 %struct.initial_value_struct = type opaque
4848 %struct.lang_decl = type opaque
49 %struct.lang_hooks = type { i8*, i32, i32 (i32)*, i32 (i32, i8**)*, void (%struct.diagnostic_context*)*, i32 (i32, i8*, i32)*, i8 (i8*, i32) zext *, i8 (i8**) zext *, i8 () zext *, 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*) zext *, %struct.tree_node* (%struct.tree_node*)*, void (%struct.tree_node*)*, void (%struct.tree_node*)*, i8 () zext *, 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*)* }
49 %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*)* }
5050 %struct.lang_hooks_for_callgraph = type { %struct.tree_node* (%struct.tree_node**, i32*, %struct.tree_node*)*, void (%struct.tree_node*)* }
51 %struct.lang_hooks_for_decls = type { i32 ()*, void (%struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*)*, %struct.tree_node* ()*, i8 (%struct.tree_node*) zext *, void ()*, void (%struct.tree_node*)*, i8 (%struct.tree_node*) zext *, i8* (%struct.tree_node*)* }
52 %struct.lang_hooks_for_functions = type { void (%struct.function*)*, void (%struct.function*)*, void (%struct.function*)*, void (%struct.function*)*, i8 (%struct.tree_node*) zext * }
53 %struct.lang_hooks_for_tree_dump = type { i8 (i8*, %struct.tree_node*) zext *, i32 (%struct.tree_node*)* }
54 %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*) zext *, i32 (%struct.tree_node*)*, void (%struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i32)* }
51 %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*)* }
52 %struct.lang_hooks_for_functions = type { void (%struct.function*)*, void (%struct.function*)*, void (%struct.function*)*, void (%struct.function*)*, i8 (%struct.tree_node*) zeroext * }
53 %struct.lang_hooks_for_tree_dump = type { i8 (i8*, %struct.tree_node*) zeroext *, i32 (%struct.tree_node*)* }
54 %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)* }
5555 %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 }
5656 %struct.lang_type = type opaque
5757 %struct.language_function = type opaque
6363 %struct.output_buffer = type { %struct.obstack, %struct.FILE*, i32, [128 x i8] }
6464 %struct.phi_arg_d = type { %struct.tree_node*, i8 }
6565 %struct.pointer_set_t = type opaque
66 %struct.pretty_printer = type { %struct.output_buffer*, i8*, i32, i32, i32, i32, i32, i8 (%struct.pretty_printer*, %struct.text_info*) zext *, i8, i8 }
66 %struct.pretty_printer = type { %struct.output_buffer*, i8*, i32, i32, i32, i32, i32, i8 (%struct.pretty_printer*, %struct.text_info*) zeroext *, i8, i8 }
6767 %struct.ptr_info_def = type { i8, %struct.bitmap_head_def*, %struct.tree_node* }
6868 %struct.real_value = type { i8, [3 x i8], [5 x i32] }
6969 %struct.reg_attrs = type { %struct.tree_node*, i64 }
353353
354354 declare i32 @alias_sets_conflict_p(i64, i64)
355355
356 declare fastcc i8 @cpt_same_type(%struct.tree_node*, %struct.tree_node*) zext
356 declare fastcc i8 @cpt_same_type(%struct.tree_node*, %struct.tree_node*) zeroext
357357
358358 declare %struct.tree_node* @check_pointer_types_r(%struct.tree_node**, i32*, i8*)
359359
379379
380380 declare %struct.tree_node* @expr_last(%struct.tree_node*)
381381
382 declare i8 @block_may_fallthru(%struct.tree_node*) zext
382 declare i8 @block_may_fallthru(%struct.tree_node*) zeroext
383383
384384 declare fastcc void @gimple_pop_condition(%struct.tree_node**)
385385
387387
388388 declare void @annotate_all_with_locus(%struct.tree_node**, i32, i32)
389389
390 declare fastcc %struct.tree_node* @internal_get_tmp_var(%struct.tree_node*, %struct.tree_node**, %struct.tree_node**, i8 zext )
391
392 define i32 @gimplify_expr(%struct.tree_node** %expr_p, %struct.tree_node** %pre_p, %struct.tree_node** %post_p, i8 (%struct.tree_node*) zext * %gimple_test_f, i32 %fallback) {
390 declare fastcc %struct.tree_node* @internal_get_tmp_var(%struct.tree_node*, %struct.tree_node**, %struct.tree_node**, i8 zeroext )
391
392 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) {
393393 entry:
394394 %internal_post = alloca %struct.tree_node*, align 4 ; <%struct.tree_node**> [#uses=2]
395395 %pre_p_addr.0 = select i1 false, %struct.tree_node** null, %struct.tree_node** %pre_p ; <%struct.tree_node**> [#uses=7]
597597 ret i32 0
598598
599599 bb3351: ; preds = %cond_next3074
600 %tmp3354 = call i8 @tree_ssa_useless_type_conversion( %struct.tree_node* %tmp2554 ) zext ; [#uses=1]
600 %tmp3354 = call i8 @tree_ssa_useless_type_conversion( %struct.tree_node* %tmp2554 ) zeroext ; [#uses=1]
601601 icmp eq i8 %tmp3354, 0 ; :7 [#uses=1]
602602 %tmp3424 = load i32* null ; [#uses=1]
603603 br i1 %7, label %cond_next3417, label %cond_true3356
639639 unreachable
640640
641641 cond_next4327: ; preds = %cond_next4300
642 %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*) zext * @is_gimple_val, i32 1 ) ; [#uses=0]
642 %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 ) ; [#uses=0]
643643 ret i32 0
644644
645645 bb4339: ; preds = %cond_next298
713713 cond_next6474: ; preds = %cond_next298
714714 icmp eq %struct.tree_node** %internal_post, %post_p_addr.0 ; :11 [#uses=1]
715715 %iftmp.381.0 = select i1 %11, %struct.tree_node** null, %struct.tree_node** %post_p_addr.0 ; <%struct.tree_node**> [#uses=1]
716 %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*) zext * %gimple_test_f, i32 %fallback ) ; [#uses=0]
717 %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*) zext * @is_gimple_val, i32 1 ) ; [#uses=0]
716 %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 ) ; [#uses=0]
717 %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 ) ; [#uses=0]
718718 ret i32 0
719719
720720 bb7444: ; preds = %cond_next298
727727 ret i32 0
728728 }
729729
730 declare i8 @is_gimple_formal_tmp_rhs(%struct.tree_node*) zext
730 declare i8 @is_gimple_formal_tmp_rhs(%struct.tree_node*) zeroext
731731
732732 declare void @gimplify_and_add(%struct.tree_node*, %struct.tree_node**)
733733
737737
738738 declare fastcc void @gimplify_init_ctor_preeval(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, %struct.gimplify_init_ctor_preeval_data*)
739739
740 declare i8 @type_contains_placeholder_p(%struct.tree_node*) zext
741
742 declare i8 @is_gimple_mem_rhs(%struct.tree_node*) zext
743
744 declare fastcc i32 @gimplify_modify_expr_rhs(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i8 zext )
740 declare i8 @type_contains_placeholder_p(%struct.tree_node*) zeroext
741
742 declare i8 @is_gimple_mem_rhs(%struct.tree_node*) zeroext
743
744 declare fastcc i32 @gimplify_modify_expr_rhs(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i8 zeroext )
745745
746746 declare %struct.tree_node* @fold_indirect_ref(%struct.tree_node*)
747747
748 declare fastcc i32 @gimplify_compound_expr(%struct.tree_node**, %struct.tree_node**, i8 zext )
749
750 declare i8 @is_gimple_lvalue(%struct.tree_node*) zext
748 declare fastcc i32 @gimplify_compound_expr(%struct.tree_node**, %struct.tree_node**, i8 zeroext )
749
750 declare i8 @is_gimple_lvalue(%struct.tree_node*) zeroext
751751
752752 declare void @categorize_ctor_elements(%struct.tree_node*, i64*, i64*, i64*, i8*)
753753
763763
764764 declare %struct.tree_node* @get_base_address(%struct.tree_node*)
765765
766 declare fastcc void @gimplify_init_ctor_eval(%struct.tree_node*, %struct.tree_node*, %struct.tree_node**, i8 zext )
766 declare fastcc void @gimplify_init_ctor_eval(%struct.tree_node*, %struct.tree_node*, %struct.tree_node**, i8 zeroext )
767767
768768 declare %struct.tree_node* @build_complex(%struct.tree_node*, %struct.tree_node*, %struct.tree_node*)
769769
770 declare i8 (%struct.tree_node*) zext * @rhs_predicate_for(%struct.tree_node*)
770 declare i8 (%struct.tree_node*) zeroext * @rhs_predicate_for(%struct.tree_node*)
771771
772772 declare %struct.tree_node* @build_vector(%struct.tree_node*, %struct.tree_node*)
773773
774 declare i8 @is_gimple_val(%struct.tree_node*) zext
775
776 declare i8 @is_gimple_reg_type(%struct.tree_node*) zext
774 declare i8 @is_gimple_val(%struct.tree_node*) zeroext
775
776 declare i8 @is_gimple_reg_type(%struct.tree_node*) zeroext
777777
778778 declare fastcc i32 @gimplify_cond_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, %struct.tree_node*, i32)
779779
780 declare fastcc i32 @gimplify_modify_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i8 zext )
780 declare fastcc i32 @gimplify_modify_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i8 zeroext )
781781
782782 declare %struct.tree_node* @tree_cons_stat(%struct.tree_node*, %struct.tree_node*, %struct.tree_node*)
783783
785785
786786 declare %struct.tree_node* @build_function_call_expr(%struct.tree_node*, %struct.tree_node*)
787787
788 declare i8 @is_gimple_addressable(%struct.tree_node*) zext
789
790 declare i8 @is_gimple_reg(%struct.tree_node*) zext
788 declare i8 @is_gimple_addressable(%struct.tree_node*) zeroext
789
790 declare i8 @is_gimple_reg(%struct.tree_node*) zeroext
791791
792792 declare %struct.tree_node* @make_ssa_name(%struct.tree_node*, %struct.tree_node*)
793793
794 declare i8 @tree_ssa_useless_type_conversion(%struct.tree_node*) zext
795
796 declare fastcc i32 @gimplify_self_mod_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i8 zext )
794 declare i8 @tree_ssa_useless_type_conversion(%struct.tree_node*) zeroext
795
796 declare fastcc i32 @gimplify_self_mod_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i8 zeroext )
797797
798798 declare fastcc i32 @gimplify_compound_lval(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i32)
799799
800800 declare %struct.tree_node* @get_callee_fndecl(%struct.tree_node*)
801801
802 declare %struct.tree_node* @fold_builtin(%struct.tree_node*, i8 zext )
802 declare %struct.tree_node* @fold_builtin(%struct.tree_node*, i8 zeroext )
803803
804804 declare void @error(i8*, ...)
805805
806806 declare %struct.tree_node* @build_empty_stmt()
807807
808 declare i8 @fold_builtin_next_arg(%struct.tree_node*) zext
808 declare i8 @fold_builtin_next_arg(%struct.tree_node*) zeroext
809809
810810 declare fastcc i32 @gimplify_arg(%struct.tree_node**, %struct.tree_node**)
811811
812 declare i8 @is_gimple_call_addr(%struct.tree_node*) zext
812 declare i8 @is_gimple_call_addr(%struct.tree_node*) zeroext
813813
814814 declare i32 @call_expr_flags(%struct.tree_node*)
815815
861861
862862 declare void @tsi_link_before(%struct.tree_stmt_iterator*, %struct.tree_node*, i32)
863863
864 declare i8 @is_gimple_stmt(%struct.tree_node*) zext
864 declare i8 @is_gimple_stmt(%struct.tree_node*) zeroext
865865
866866 declare void @print_generic_expr(%struct.FILE*, %struct.tree_node*, i32)
867867
869869
870870 declare void @internal_error(i8*, ...)
871871
872 declare %struct.tree_node* @force_gimple_operand(%struct.tree_node*, %struct.tree_node**, i8 zext , %struct.tree_node*)
873
874 declare i8 @is_gimple_reg_rhs(%struct.tree_node*) zext
872 declare %struct.tree_node* @force_gimple_operand(%struct.tree_node*, %struct.tree_node**, i8 zeroext , %struct.tree_node*)
873
874 declare i8 @is_gimple_reg_rhs(%struct.tree_node*) zeroext
875875
876876 declare void @add_referenced_tmp_var(%struct.tree_node*)
877877
878 declare i8 @contains_placeholder_p(%struct.tree_node*) zext
878 declare i8 @contains_placeholder_p(%struct.tree_node*) zeroext
879879
880880 declare %struct.varray_head_tag* @varray_init(i32, i32, i8*)
881881
885885
886886 declare %struct.tree_node* @array_ref_low_bound(%struct.tree_node*)
887887
888 declare i8 @is_gimple_min_invariant(%struct.tree_node*) zext
889
890 declare i8 @is_gimple_formal_tmp_reg(%struct.tree_node*) zext
888 declare i8 @is_gimple_min_invariant(%struct.tree_node*) zeroext
889
890 declare i8 @is_gimple_formal_tmp_reg(%struct.tree_node*) zeroext
891891
892892 declare %struct.tree_node* @array_ref_element_size(%struct.tree_node*)
893893
894894 declare %struct.tree_node* @component_ref_field_offset(%struct.tree_node*)
895895
896 declare i8 @is_gimple_min_lval(%struct.tree_node*) zext
896 declare i8 @is_gimple_min_lval(%struct.tree_node*) zeroext
897897
898898 declare void @varray_underflow(%struct.varray_head_tag*, i8*, i32, i8*)
899899
900900 declare i32 @list_length(%struct.tree_node*)
901901
902 declare i8 @parse_output_constraint(i8**, i32, i32, i32, i8*, i8*, i8*) zext
902 declare i8 @parse_output_constraint(i8**, i32, i32, i32, i8*, i8*, i8*) zeroext
903903
904904 declare i8* @xstrdup(i8*)
905905
911911
912912 declare %struct.tree_node* @chainon(%struct.tree_node*, %struct.tree_node*)
913913
914 declare i8 @parse_input_constraint(i8**, i32, i32, i32, i32, i8**, i8*, i8*) zext
915
916 declare i8 @is_gimple_asm_val(%struct.tree_node*) zext
917
918 declare void @gimplify_body(%struct.tree_node**, %struct.tree_node*, i8 zext )
914 declare i8 @parse_input_constraint(i8**, i32, i32, i32, i32, i8**, i8*, i8*) zeroext
915
916 declare i8 @is_gimple_asm_val(%struct.tree_node*) zeroext
917
918 declare void @gimplify_body(%struct.tree_node**, %struct.tree_node*, i8 zeroext )
919919
920920 declare void @timevar_push_1(i32)
921921
933933
934934 declare %struct.tree_node* @tsi_split_statement_list_after(%struct.tree_stmt_iterator*)
935935
936 declare i8 @is_gimple_condexpr(%struct.tree_node*) zext
936 declare i8 @is_gimple_condexpr(%struct.tree_node*) zeroext
937937
938938 declare %struct.tree_node* @invert_truthvalue(%struct.tree_node*)
939939
940 declare i8 @initializer_zerop(%struct.tree_node*) zext
940 declare i8 @initializer_zerop(%struct.tree_node*) zeroext
941941
942942 declare i32 @simple_cst_equal(%struct.tree_node*, %struct.tree_node*)
943943
11
22 %struct.Connection = type { i32, [10 x i8], i32 }
33 %struct.IntChunk = type { %struct.cppobjtype, i32, i32*, i32 }
4 %struct.Point = type { i8*, %struct.cppobjtype, i16 (%struct.Point*) sext *, i16 (%struct.Point*) sext *, double (%struct.Point*)*, double (%struct.Point*)* }
4 %struct.Point = type { i8*, %struct.cppobjtype, i16 (%struct.Point*) signext *, i16 (%struct.Point*) signext *, double (%struct.Point*)*, double (%struct.Point*)* }
55 %struct.RefPoint = type { %struct.Point*, %struct.cppobjtype }
66 %struct.ShortArray = type { %struct.cppobjtype, i32, i16* }
77 %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 }
77
88 declare void @abort()
99
10 define fastcc void @t(%struct.SString* %word, i8 sext %c) {
10 define fastcc void @t(%struct.SString* %word, i8 signext %c) {
1111 entry:
1212 %tmp1 = icmp eq %struct.SString* %word, null ; [#uses=1]
1313 br i1 %tmp1, label %cond_true, label %cond_false
22 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | \
33 ; RUN: grep sxtab | wc -l | grep 1
44
5 define i8 @test1(i32 %A) sext {
5 define i8 @test1(i32 %A) signext {
66 %B = lshr i32 %A, 8
77 %C = shl i32 %A, 24
88 %D = or i32 %B, %C
1010 ret i8 %E
1111 }
1212
13 define i32 @test2(i32 %A, i32 %X) sext {
13 define i32 @test2(i32 %A, i32 %X) signext {
1414 %B = lshr i32 %A, 8
1515 %C = shl i32 %A, 24
1616 %D = or i32 %B, %C
11 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | grep uxtab | wc -l | grep 1
22 ; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | grep uxth | wc -l | grep 1
33
4 define i8 @test1(i32 %A.u) zext {
4 define i8 @test1(i32 %A.u) zeroext {
55 %B.u = trunc i32 %A.u to i8
66 ret i8 %B.u
77 }
88
9 define i32 @test2(i32 %A.u, i32 %B.u) zext {
9 define i32 @test2(i32 %A.u, i32 %B.u) zeroext {
1010 %C.u = trunc i32 %B.u to i8
1111 %D.u = zext i8 %C.u to i32
1212 %E.u = add i32 %A.u, %D.u
1313 ret i32 %E.u
1414 }
1515
16 define i32 @test3(i32 %A.u) zext {
16 define i32 @test3(i32 %A.u) zeroext {
1717 %B.u = lshr i32 %A.u, 8
1818 %C.u = shl i32 %A.u, 24
1919 %D.u = or i32 %B.u, %C.u
1717 ; RUN: grep {s8subq} %t.s | wc -l | grep 2
1818
1919
20 define i32 @al(i32 sext %x.s, i32 sext %y.s) sext {
20 define i32 @al(i32 signext %x.s, i32 signext %y.s) signext {
2121 entry:
2222 %tmp.3.s = add i32 %y.s, %x.s ; [#uses=1]
2323 ret i32 %tmp.3.s
2424 }
2525
26 define i32 @ali(i32 sext %x.s) sext {
26 define i32 @ali(i32 signext %x.s) signext {
2727 entry:
2828 %tmp.3.s = add i32 100, %x.s ; [#uses=1]
2929 ret i32 %tmp.3.s
3030 }
3131
32 define i64 @aq(i64 sext %x.s, i64 sext %y.s) sext {
32 define i64 @aq(i64 signext %x.s, i64 signext %y.s) signext {
3333 entry:
3434 %tmp.3.s = add i64 %y.s, %x.s ; [#uses=1]
3535 ret i64 %tmp.3.s
4141 ret i64 %tmp.3.s
4242 }
4343
44 define i32 @sl(i32 sext %x.s, i32 sext %y.s) sext {
44 define i32 @sl(i32 signext %x.s, i32 signext %y.s) signext {
4545 entry:
4646 %tmp.3.s = sub i32 %y.s, %x.s ; [#uses=1]
4747 ret i32 %tmp.3.s
4848 }
4949
50 define i32 @sli(i32 sext %x.s) sext {
50 define i32 @sli(i32 signext %x.s) signext {
5151 entry:
5252 %tmp.3.s = sub i32 %x.s, 100 ; [#uses=1]
5353 ret i32 %tmp.3.s
6565 ret i64 %tmp.3.s
6666 }
6767
68 define i32 @a4l(i32 sext %x.s, i32 sext %y.s) sext {
68 define i32 @a4l(i32 signext %x.s, i32 signext %y.s) signext {
6969 entry:
7070 %tmp.1.s = shl i32 %y.s, 2 ; [#uses=1]
7171 %tmp.3.s = add i32 %tmp.1.s, %x.s ; [#uses=1]
7272 ret i32 %tmp.3.s
7373 }
7474
75 define i32 @a8l(i32 sext %x.s, i32 sext %y.s) sext {
75 define i32 @a8l(i32 signext %x.s, i32 signext %y.s) signext {
7676 entry:
7777 %tmp.1.s = shl i32 %y.s, 3 ; [#uses=1]
7878 %tmp.3.s = add i32 %tmp.1.s, %x.s ; [#uses=1]
9393 ret i64 %tmp.3.s
9494 }
9595
96 define i32 @a4li(i32 sext %y.s) sext {
96 define i32 @a4li(i32 signext %y.s) signext {
9797 entry:
9898 %tmp.1.s = shl i32 %y.s, 2 ; [#uses=1]
9999 %tmp.3.s = add i32 100, %tmp.1.s ; [#uses=1]
100100 ret i32 %tmp.3.s
101101 }
102102
103 define i32 @a8li(i32 sext %y.s) sext {
103 define i32 @a8li(i32 signext %y.s) signext {
104104 entry:
105105 %tmp.1.s = shl i32 %y.s, 3 ; [#uses=1]
106106 %tmp.3.s = add i32 100, %tmp.1.s ; [#uses=1]
121121 ret i64 %tmp.3.s
122122 }
123123
124 define i32 @s4l(i32 sext %x.s, i32 sext %y.s) sext {
124 define i32 @s4l(i32 signext %x.s, i32 signext %y.s) signext {
125125 entry:
126126 %tmp.1.s = shl i32 %y.s, 2 ; [#uses=1]
127127 %tmp.3.s = sub i32 %tmp.1.s, %x.s ; [#uses=1]
128128 ret i32 %tmp.3.s
129129 }
130130
131 define i32 @s8l(i32 sext %x.s, i32 sext %y.s) sext {
131 define i32 @s8l(i32 signext %x.s, i32 signext %y.s) signext {
132132 entry:
133133 %tmp.1.s = shl i32 %y.s, 3 ; [#uses=1]
134134 %tmp.3.s = sub i32 %tmp.1.s, %x.s ; [#uses=1]
149149 ret i64 %tmp.3.s
150150 }
151151
152 define i32 @s4li(i32 sext %y.s) sext {
152 define i32 @s4li(i32 signext %y.s) signext {
153153 entry:
154154 %tmp.1.s = shl i32 %y.s, 2 ; [#uses=1]
155155 %tmp.3.s = sub i32 %tmp.1.s, 100 ; [#uses=1]
156156 ret i32 %tmp.3.s
157157 }
158158
159 define i32 @s8li(i32 sext %y.s) sext {
159 define i32 @s8li(i32 signext %y.s) signext {
160160 entry:
161161 %tmp.1.s = shl i32 %y.s, 3 ; [#uses=1]
162162 %tmp.3.s = sub i32 %tmp.1.s, 100 ; [#uses=1]
11 ; RUN: llvm-as < %s | llc -march=alpha | grep -i {subl \$16,1,\$0}
22
33
4 define i32 @foo(i32 sext %x) sext {
4 define i32 @foo(i32 signext %x) signext {
55 entry:
66 %tmp.1 = add i32 %x, -1 ; [#uses=1]
77 ret i32 %tmp.1
11 ; RUN: llvm-as < %s | llc -march=alpha | grep zapnot
22
33
4 define i16 @foo(i64 %y) zext {
4 define i16 @foo(i64 %y) zeroext {
55 entry:
66 %tmp.1 = trunc i64 %y to i16 ; [#uses=1]
77 ret i16 %tmp.1
33 ; RUN: llvm-as < %s | llc -march=ppc32 | grep {rlwinm r3, r3, 23, 30, 30}
44 ; PR1473
55
6 define i8 @foo(i16 zext %a) zext {
6 define i8 @foo(i16 zeroext %a) zeroext {
77 %tmp2 = lshr i16 %a, 10 ; [#uses=1]
88 %tmp23 = trunc i16 %tmp2 to i8 ; [#uses=1]
99 %tmp4 = shl i8 %tmp23, 1 ; [#uses=1]
88 ret void
99 }
1010
11 define i16 @test2(i16 zext %crc) zext {
11 define i16 @test2(i16 zeroext %crc) zeroext {
1212 ; No and's should be needed for the i16s here.
1313 %tmp.1 = lshr i16 %crc, 1
1414 %tmp.7 = xor i16 %tmp.1, 40961
88 ret i32 %tmp.81
99 }
1010
11 define i16 @test2(i16 sext %X, i16 sext %x) sext {
11 define i16 @test2(i16 signext %X, i16 signext %x) signext {
1212 %tmp = sext i16 %X to i32
1313 %tmp1 = sext i16 %x to i32
1414 %tmp2 = add i32 %tmp, %tmp1
1919 ret i16 %retval
2020 }
2121
22 define i16 @test3(i32 zext %X) sext {
22 define i16 @test3(i32 zeroext %X) signext {
2323 %tmp1 = lshr i32 %X, 16
2424 %tmp2 = trunc i32 %tmp1 to i16
2525 ret i16 %tmp2
0 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep {extsh\\|rlwinm}
11
2 declare i16 @foo() sext
2 declare i16 @foo() signext
33
4 define i32 @test1(i16 sext %X) {
4 define i32 @test1(i16 signext %X) {
55 %Y = sext i16 %X to i32 ;; dead
66 ret i32 %Y
77 }
88
9 define i32 @test2(i16 zext %X) {
9 define i32 @test2(i16 zeroext %X) {
1010 %Y = sext i16 %X to i32
1111 %Z = and i32 %Y, 65535 ;; dead
1212 ret i32 %Z
1313 }
1414
1515 define void @test3() {
16 %tmp.0 = call i16 @foo() sext ;; no extsh!
16 %tmp.0 = call i16 @foo() signext ;; no extsh!
1717 %tmp.1 = icmp slt i16 %tmp.0, 1234
1818 br i1 %tmp.1, label %then, label %UnifiedReturnBlock
1919
2020 then:
21 call i32 @test1(i16 0 sext)
21 call i32 @test1(i16 0 signext)
2222 ret void
2323 UnifiedReturnBlock:
2424 ret void
4545 ret i32 %tmp.2
4646 }
4747
48 define i16 @test7(float %a) zext {
48 define i16 @test7(float %a) zeroext {
4949 %tmp.1 = fptoui float %a to i16
5050 ret i16 %tmp.1
5151 }
22 %struct.XDesc = type <{ i32, %struct.OpaqueXDataStorageType** }>
33 %struct.OpaqueXDataStorageType = type opaque
44
5 declare i16 @GetParamDesc(%struct.XDesc*, i32, i32, %struct.XDesc*) sext
5 declare i16 @GetParamDesc(%struct.XDesc*, i32, i32, %struct.XDesc*) signext
66
77 declare void @r_raise(i64, i8*, ...)
88
1717 br i1 false, label %cond_next164, label %cond_true239
1818
1919 cond_next164: ; preds = %cond_true109
20 %tmp176 = call i16 @GetParamDesc( %struct.XDesc* null, i32 1701999219, i32 1413830740, %struct.XDesc* null ) sext ; [#uses=0]
20 %tmp176 = call i16 @GetParamDesc( %struct.XDesc* null, i32 1701999219, i32 1413830740, %struct.XDesc* null ) signext ; [#uses=0]
2121 call void (i64, i8*, ...)* @r_raise( i64 0, i8* null )
2222 unreachable
2323
430430
431431 declare i8 @report__equal(i32 %x, i32 %y)
432432
433 declare i8 @report__ident_char(i8 zext %x)
434
435 declare i16 @report__ident_wide_char(i16 zext %x)
433 declare i8 @report__ident_char(i8 zeroext %x)
434
435 declare i16 @report__ident_wide_char(i16 zeroext %x)
436436
437437 declare i8 @report__ident_bool(i8 %x)
438438
450450
451451 declare void @__gnat_rcheck_06(i8*, i32)
452452
453 declare void @system__string_ops__str_concat_cs(%struct.string___XUP* sret , i8 zext , i64)
453 declare void @system__string_ops__str_concat_cs(%struct.string___XUP* sret , i8 zeroext , i64)
33 ; RUN: llvm-as < %s | llc -march=x86 | grep {\\(and\\)\\|\\(test.*\\\$1\\)} | \
44 ; RUN: wc -l | grep 6
55
6 define i1 @test1(i32 %X) zext {
6 define i1 @test1(i32 %X) zeroext {
77 %Y = trunc i32 %X to i1
88 ret i1 %Y
99 }
66 target triple = "x86_64-apple-darwin8"
77
88
9 define i32 @test(i16 sext %X) {
9 define i32 @test(i16 signext %X) {
1010 entry:
1111 %tmp12 = sext i16 %X to i32 ; [#uses=1]
1212 ret i32 %tmp12
33 target triple = "x86_64-apple-darwin8"
44
55
6 define void @bar(i16 zext %A) {
7 tail call void @foo( i16 %A sext )
6 define void @bar(i16 zeroext %A) {
7 tail call void @foo( i16 %A signext )
88 ret void
99 }
10 declare void @foo(i16 sext )
10 declare void @foo(i16 signext )
1111
11 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
22 ; RUN: diff %t1.ll %t2.ll
33
4 %ZFunTy = type i32(i8 zext)
5 %SFunTy = type i32(i8 sext)
4 %ZFunTy = type i32(i8 zeroext)
5 %SFunTy = type i32(i8 signext)
66
7 declare i16 @"test"(i16 sext %arg) sext
8 declare i8 @"test2" (i16 zext %a2) zext
7 declare i16 @"test"(i16 signext %arg) signext
8 declare i8 @"test2" (i16 zeroext %a2) zeroext
99
1010 declare i32 @"test3"(i32* noalias %p)
1111
1212 declare void @exit(i32) noreturn nounwind
1313
14 define i32 @main(i32 %argc, i8 **%argv) nounwind inreg {
14 define i32 @main(i32 inreg %argc, i8 ** inreg %argv) nounwind {
1515 %val = trunc i32 %argc to i16
16 %res1 = call i16 (i16 sext) sext *@test(i16 %val)
16 %res1 = call i16 (i16 signext) signext *@test(i16 %val)
1717 %two = add i16 %res1, %res1
18 %res2 = call i8 @test2(i16 %two zext) zext
18 %res2 = call i8 @test2(i16 %two zeroext) zeroext
1919 %retVal = sext i16 %two to i32
2020 ret i32 %retVal
2121 }
11 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
22 ; RUN: diff %t1.ll %t2.ll
33
4 %ZFunTy = type i33(i8 zext)
5 %SFunTy = type i33(i8 sext)
4 %ZFunTy = type i33(i8 zeroext)
5 %SFunTy = type i33(i8 signext)
66
7 declare i16 @"test"(i16 sext %arg) sext
8 declare i8 @"test2" (i16 zext %a2) zext
7 declare i16 @"test"(i16 signext %arg) signext
8 declare i8 @"test2" (i16 zeroext %a2) zeroext
99
1010
1111 define i33 @main(i33 %argc, i8 **%argv) {
1212 %val = trunc i33 %argc to i16
13 %res = call i16 (i16 sext) sext *@test(i16 %val)
13 %res = call i16 (i16 signext) signext *@test(i16 %val)
1414 %two = add i16 %res, %res
15 %res2 = call i8 @test2(i16 %two zext) zext
15 %res2 = call i8 @test2(i16 %two zeroext) zeroext
1616 %retVal = sext i16 %two to i33
1717 ret i33 %retVal
1818 }
1010 ret i32 0
1111
1212 cond_next: ; preds = %entry
13 %tmp10 = invoke i16 @_ZN12token_stream4openEPKc( i8* null, i8* null ) sext
13 %tmp10 = invoke i16 @_ZN12token_stream4openEPKc( i8* null, i8* null ) signext
1414 to label %invcont unwind label %cleanup690 ; [#uses=0]
1515
1616 invcont: ; preds = %cond_next
6262 ret i32 0
6363 }
6464
65 declare i16 @_ZN12token_stream4openEPKc(i8*, i8*) sext
65 declare i16 @_ZN12token_stream4openEPKc(i8*, i8*) signext
6666
6767 declare i32 @printf(i8*, ...)
6868
55 @"L_OBJC_IMAGE_INFO" = internal global [2 x i32] zeroinitializer ; <[2 x i32]*> [#uses=1]
66 @llvm.used = appending global [1 x i8*] [ i8* bitcast ([2 x i32]* @"L_OBJC_IMAGE_INFO" to i8*) ] ; <[1 x i8*]*> [#uses=0]
77
8 define i16 @__NSCharToUnicharCFWrapper(i8 zext %ch) zext {
8 define i16 @__NSCharToUnicharCFWrapper(i8 zeroext %ch) zeroext {
99 entry:
1010 %iftmp.0.0.in.in = select i1 false, i16* @replacementUnichar, i16* null ; [#uses=1]
1111 %iftmp.0.0.in = load i16* %iftmp.0.0.in.in ; [#uses=1]
33 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
44 target triple = "i686-pc-linux-gnu"
55
6 define i32 @testcase(i5 zext %k) {
6 define i32 @testcase(i5 zeroext %k) {
77 entry:
88 br label %bb2
99