Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s | grep abort | count 1
      2 ; Calls to abort should all be merged
      3 
      4 ; ModuleID = '5898899.c'
      5 target datalayout = "e-p:64:64:64-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-s0:64:64-f80:128:128"
      6 target triple = "x86_64-apple-darwin8"
      7 	%struct.BoundaryAlignment = type { [3 x i8], i8, i16, i16, i8, [2 x i8] }
      8 
      9 define void @passing2(i64 %str.0, i64 %str.1, i16 signext  %s, i32 %j, i8 signext  %c, i16 signext  %t, i16 signext  %u, i8 signext  %d) nounwind optsize {
     10 entry:
     11 	%str_addr = alloca %struct.BoundaryAlignment		; <%struct.BoundaryAlignment*> [#uses=7]
     12 	%s_addr = alloca i16		; <i16*> [#uses=1]
     13 	%j_addr = alloca i32		; <i32*> [#uses=2]
     14 	%c_addr = alloca i8		; <i8*> [#uses=2]
     15 	%t_addr = alloca i16		; <i16*> [#uses=2]
     16 	%u_addr = alloca i16		; <i16*> [#uses=2]
     17 	%d_addr = alloca i8		; <i8*> [#uses=2]
     18 	%"alloca point" = bitcast i32 0 to i32		; <i32> [#uses=0]
     19 	%tmp = bitcast %struct.BoundaryAlignment* %str_addr to { i64, i64 }*		; <{ i64, i64 }*> [#uses=1]
     20 	%tmp1 = getelementptr { i64, i64 }, { i64, i64 }* %tmp, i32 0, i32 0		; <i64*> [#uses=1]
     21 	store i64 %str.0, i64* %tmp1
     22 	%tmp2 = bitcast %struct.BoundaryAlignment* %str_addr to { i64, i64 }*		; <{ i64, i64 }*> [#uses=1]
     23 	%tmp3 = getelementptr { i64, i64 }, { i64, i64 }* %tmp2, i32 0, i32 1		; <i64*> [#uses=1]
     24 	%bc = bitcast i64* %tmp3 to i8*		; <i8*> [#uses=2]
     25 	%byte = trunc i64 %str.1 to i8		; <i8> [#uses=1]
     26 	store i8 %byte, i8* %bc
     27 	%shft = lshr i64 %str.1, 8		; <i64> [#uses=2]
     28 	%Loc = getelementptr i8, i8* %bc, i32 1		; <i8*> [#uses=2]
     29 	%byte4 = trunc i64 %shft to i8		; <i8> [#uses=1]
     30 	store i8 %byte4, i8* %Loc
     31 	%shft5 = lshr i64 %shft, 8		; <i64> [#uses=2]
     32 	%Loc6 = getelementptr i8, i8* %Loc, i32 1		; <i8*> [#uses=2]
     33 	%byte7 = trunc i64 %shft5 to i8		; <i8> [#uses=1]
     34 	store i8 %byte7, i8* %Loc6
     35 	%shft8 = lshr i64 %shft5, 8		; <i64> [#uses=2]
     36 	%Loc9 = getelementptr i8, i8* %Loc6, i32 1		; <i8*> [#uses=2]
     37 	%byte10 = trunc i64 %shft8 to i8		; <i8> [#uses=1]
     38 	store i8 %byte10, i8* %Loc9
     39 	%shft11 = lshr i64 %shft8, 8		; <i64> [#uses=0]
     40 	%Loc12 = getelementptr i8, i8* %Loc9, i32 1		; <i8*> [#uses=0]
     41 	store i16 %s, i16* %s_addr
     42 	store i32 %j, i32* %j_addr
     43 	store i8 %c, i8* %c_addr
     44 	store i16 %t, i16* %t_addr
     45 	store i16 %u, i16* %u_addr
     46 	store i8 %d, i8* %d_addr
     47 	%tmp13 = getelementptr %struct.BoundaryAlignment, %struct.BoundaryAlignment* %str_addr, i32 0, i32 0		; <[3 x i8]*> [#uses=1]
     48 	%tmp1314 = bitcast [3 x i8]* %tmp13 to i32*		; <i32*> [#uses=1]
     49 	%tmp15 = load i32, i32* %tmp1314, align 4		; <i32> [#uses=1]
     50 	%tmp16 = shl i32 %tmp15, 14		; <i32> [#uses=1]
     51 	%tmp17 = ashr i32 %tmp16, 23		; <i32> [#uses=1]
     52 	%tmp1718 = trunc i32 %tmp17 to i16		; <i16> [#uses=1]
     53 	%sextl = shl i16 %tmp1718, 7		; <i16> [#uses=1]
     54 	%sextr = ashr i16 %sextl, 7		; <i16> [#uses=2]
     55 	%sextl19 = shl i16 %sextr, 7		; <i16> [#uses=1]
     56 	%sextr20 = ashr i16 %sextl19, 7		; <i16> [#uses=0]
     57 	%sextl21 = shl i16 %sextr, 7		; <i16> [#uses=1]
     58 	%sextr22 = ashr i16 %sextl21, 7		; <i16> [#uses=1]
     59 	%sextr2223 = sext i16 %sextr22 to i32		; <i32> [#uses=1]
     60 	%tmp24 = load i32, i32* %j_addr, align 4		; <i32> [#uses=1]
     61 	%tmp25 = icmp ne i32 %sextr2223, %tmp24		; <i1> [#uses=1]
     62 	%tmp2526 = zext i1 %tmp25 to i8		; <i8> [#uses=1]
     63 	%toBool = icmp ne i8 %tmp2526, 0		; <i1> [#uses=1]
     64 	br i1 %toBool, label %bb, label %bb27
     65 
     66 bb:		; preds = %entry
     67 	call void (...) @abort( ) noreturn nounwind 
     68 	unreachable
     69 
     70 bb27:		; preds = %entry
     71 	%tmp28 = getelementptr %struct.BoundaryAlignment, %struct.BoundaryAlignment* %str_addr, i32 0, i32 1		; <i8*> [#uses=1]
     72 	%tmp29 = load i8, i8* %tmp28, align 4		; <i8> [#uses=1]
     73 	%tmp30 = load i8, i8* %c_addr, align 1		; <i8> [#uses=1]
     74 	%tmp31 = icmp ne i8 %tmp29, %tmp30		; <i1> [#uses=1]
     75 	%tmp3132 = zext i1 %tmp31 to i8		; <i8> [#uses=1]
     76 	%toBool33 = icmp ne i8 %tmp3132, 0		; <i1> [#uses=1]
     77 	br i1 %toBool33, label %bb34, label %bb35
     78 
     79 bb34:		; preds = %bb27
     80 	call void (...) @abort( ) noreturn nounwind 
     81 	unreachable
     82 
     83 bb35:		; preds = %bb27
     84 	%tmp36 = getelementptr %struct.BoundaryAlignment, %struct.BoundaryAlignment* %str_addr, i32 0, i32 2		; <i16*> [#uses=1]
     85 	%tmp37 = load i16, i16* %tmp36, align 4		; <i16> [#uses=1]
     86 	%tmp38 = shl i16 %tmp37, 7		; <i16> [#uses=1]
     87 	%tmp39 = ashr i16 %tmp38, 7		; <i16> [#uses=1]
     88 	%sextl40 = shl i16 %tmp39, 7		; <i16> [#uses=1]
     89 	%sextr41 = ashr i16 %sextl40, 7		; <i16> [#uses=2]
     90 	%sextl42 = shl i16 %sextr41, 7		; <i16> [#uses=1]
     91 	%sextr43 = ashr i16 %sextl42, 7		; <i16> [#uses=0]
     92 	%sextl44 = shl i16 %sextr41, 7		; <i16> [#uses=1]
     93 	%sextr45 = ashr i16 %sextl44, 7		; <i16> [#uses=1]
     94 	%tmp46 = load i16, i16* %t_addr, align 2		; <i16> [#uses=1]
     95 	%tmp47 = icmp ne i16 %sextr45, %tmp46		; <i1> [#uses=1]
     96 	%tmp4748 = zext i1 %tmp47 to i8		; <i8> [#uses=1]
     97 	%toBool49 = icmp ne i8 %tmp4748, 0		; <i1> [#uses=1]
     98 	br i1 %toBool49, label %bb50, label %bb51
     99 
    100 bb50:		; preds = %bb35
    101 	call void (...) @abort( ) noreturn nounwind 
    102 	unreachable
    103 
    104 bb51:		; preds = %bb35
    105 	%tmp52 = getelementptr %struct.BoundaryAlignment, %struct.BoundaryAlignment* %str_addr, i32 0, i32 3		; <i16*> [#uses=1]
    106 	%tmp53 = load i16, i16* %tmp52, align 4		; <i16> [#uses=1]
    107 	%tmp54 = shl i16 %tmp53, 7		; <i16> [#uses=1]
    108 	%tmp55 = ashr i16 %tmp54, 7		; <i16> [#uses=1]
    109 	%sextl56 = shl i16 %tmp55, 7		; <i16> [#uses=1]
    110 	%sextr57 = ashr i16 %sextl56, 7		; <i16> [#uses=2]
    111 	%sextl58 = shl i16 %sextr57, 7		; <i16> [#uses=1]
    112 	%sextr59 = ashr i16 %sextl58, 7		; <i16> [#uses=0]
    113 	%sextl60 = shl i16 %sextr57, 7		; <i16> [#uses=1]
    114 	%sextr61 = ashr i16 %sextl60, 7		; <i16> [#uses=1]
    115 	%tmp62 = load i16, i16* %u_addr, align 2		; <i16> [#uses=1]
    116 	%tmp63 = icmp ne i16 %sextr61, %tmp62		; <i1> [#uses=1]
    117 	%tmp6364 = zext i1 %tmp63 to i8		; <i8> [#uses=1]
    118 	%toBool65 = icmp ne i8 %tmp6364, 0		; <i1> [#uses=1]
    119 	br i1 %toBool65, label %bb66, label %bb67
    120 
    121 bb66:		; preds = %bb51
    122 	call void (...) @abort( ) noreturn nounwind 
    123 	unreachable
    124 
    125 bb67:		; preds = %bb51
    126 	%tmp68 = getelementptr %struct.BoundaryAlignment, %struct.BoundaryAlignment* %str_addr, i32 0, i32 4		; <i8*> [#uses=1]
    127 	%tmp69 = load i8, i8* %tmp68, align 4		; <i8> [#uses=1]
    128 	%tmp70 = load i8, i8* %d_addr, align 1		; <i8> [#uses=1]
    129 	%tmp71 = icmp ne i8 %tmp69, %tmp70		; <i1> [#uses=1]
    130 	%tmp7172 = zext i1 %tmp71 to i8		; <i8> [#uses=1]
    131 	%toBool73 = icmp ne i8 %tmp7172, 0		; <i1> [#uses=1]
    132 	br i1 %toBool73, label %bb74, label %bb75
    133 
    134 bb74:		; preds = %bb67
    135 	call void (...) @abort( ) noreturn nounwind 
    136 	unreachable
    137 
    138 bb75:		; preds = %bb67
    139 	br label %return
    140 
    141 return:		; preds = %bb75
    142 	ret void
    143 }
    144 
    145 declare void @abort(...) noreturn nounwind 
    146