1 ; RUN: llc < %s -mtriple=i386-pc-linux-gnu 2 ; PR2138 3 4 %struct.__locale_struct = type { [13 x %struct.locale_data*], i16*, i32*, i32*, [13 x i8*] } 5 %struct.anon = type { i8* } 6 %struct.locale_data = type { i8*, i8*, i32, i32, { void (%struct.locale_data*)*, %struct.anon }, i32, i32, i32, [0 x %struct.locale_data_value] } 7 %struct.locale_data_value = type { i32* } 8 9 @wcstoll_l = alias i64 (i32*, i32**, i32, %struct.__locale_struct*)* @__wcstoll_l ; <i64 (i32*, i32**, i32, %struct.__locale_struct*)*> [#uses=0] 10 11 define i64 @____wcstoll_l_internal(i32* %nptr, i32** %endptr, i32 %base, i32 %group, %struct.__locale_struct* %loc) nounwind { 12 entry: 13 %tmp27 = load i32* null, align 4 ; <i32> [#uses=1] 14 %tmp83 = getelementptr i32* %nptr, i32 1 ; <i32*> [#uses=1] 15 %tmp233 = add i32 0, -48 ; <i32> [#uses=1] 16 br label %bb271.us 17 bb271.us: ; preds = %entry 18 br label %bb374.outer 19 bb311.split: ; preds = %bb305.us 20 %tmp313 = add i32 %tmp378.us, -48 ; <i32> [#uses=1] 21 br i1 false, label %bb374.outer, label %bb383 22 bb327.split: ; preds = %bb314.us 23 ret i64 0 24 bb374.outer: ; preds = %bb311.split, %bb271.us 25 %tmp370371552.pn.in = phi i32 [ %tmp233, %bb271.us ], [ %tmp313, %bb311.split ] ; <i32> [#uses=1] 26 %tmp278279.pn = phi i64 [ 0, %bb271.us ], [ %tmp373.reg2mem.0.ph, %bb311.split ] ; <i64> [#uses=1] 27 %s.5.ph = phi i32* [ null, %bb271.us ], [ %tmp376.us, %bb311.split ] ; <i32*> [#uses=1] 28 %tmp366367550.pn = sext i32 %base to i64 ; <i64> [#uses=1] 29 %tmp370371552.pn = zext i32 %tmp370371552.pn.in to i64 ; <i64> [#uses=1] 30 %tmp369551.pn = mul i64 %tmp278279.pn, %tmp366367550.pn ; <i64> [#uses=1] 31 %tmp373.reg2mem.0.ph = add i64 %tmp370371552.pn, %tmp369551.pn ; <i64> [#uses=1] 32 br label %bb374.us 33 bb374.us: ; preds = %bb314.us, %bb374.outer 34 %tmp376.us = getelementptr i32* %s.5.ph, i32 0 ; <i32*> [#uses=3] 35 %tmp378.us = load i32* %tmp376.us, align 4 ; <i32> [#uses=2] 36 %tmp302.us = icmp eq i32* %tmp376.us, %tmp83 ; <i1> [#uses=1] 37 %bothcond484.us = or i1 false, %tmp302.us ; <i1> [#uses=1] 38 br i1 %bothcond484.us, label %bb383, label %bb305.us 39 bb305.us: ; preds = %bb374.us 40 br i1 false, label %bb311.split, label %bb314.us 41 bb314.us: ; preds = %bb305.us 42 %tmp320.us = icmp eq i32 %tmp378.us, %tmp27 ; <i1> [#uses=1] 43 br i1 %tmp320.us, label %bb374.us, label %bb327.split 44 bb383: ; preds = %bb374.us, %bb311.split 45 ret i64 0 46 } 47 48 declare i64 @__wcstoll_l(i32*, i32**, i32, %struct.__locale_struct*) nounwind 49