1 ; RUN: opt < %s -passes='loop(simple-loop-unswitch),instcombine' -verify-memoryssa -disable-output
2 %struct.ClassDef = type { %struct.QByteArray, %struct.QByteArray, %"struct.QList<ArgumentDef>", %"struct.QList<ArgumentDef>", i8, i8, %"struct.QList<ArgumentDef>", %"struct.QList<ArgumentDef>", %"struct.QList<ArgumentDef>", %"struct.QList<ArgumentDef>", %"struct.QList<ArgumentDef>", %"struct.QList<ArgumentDef>", %"struct.QMap<QByteArray,QByteArray>", %"struct.QList<ArgumentDef>", %"struct.QMap<QByteArray,QByteArray>", i32, i32 }
3 %struct.FILE = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i16, i8, [1 x i8], ptr, i64, ptr, ptr, ptr, ptr, i32, i32, [40 x i8] }
4 %struct.Generator = type { ptr, ptr, %"struct.QList<ArgumentDef>", %struct.QByteArray, %"struct.QList<ArgumentDef>" }
5 %struct.QBasicAtomic = type { i32 }
6 %struct.QByteArray = type { ptr }
7 %"struct.QByteArray::Data" = type { %struct.QBasicAtomic, i32, i32, ptr, [1 x i8] }
8 %"struct.QList<ArgumentDef>" = type { %"struct.QList<ArgumentDef>::._19" }
9 %"struct.QList<ArgumentDef>::._19" = type { %struct.QListData }
10 %struct.QListData = type { ptr }
11 %"struct.QListData::Data" = type { %struct.QBasicAtomic, i32, i32, i32, i8, [1 x ptr] }
12 %"struct.QMap<QByteArray,QByteArray>" = type { %"struct.QMap<QByteArray,QByteArray>::._56" }
13 %"struct.QMap<QByteArray,QByteArray>::._56" = type { ptr }
14 %struct.QMapData = type { ptr, [12 x ptr], %struct.QBasicAtomic, i32, i32, i32, i8 }
15 %struct._IO_marker = type { ptr, ptr, i32 }
16 @.str9 = external constant [1 x i8] ; <ptr> [#uses=1]
18 declare i32 @strcmp(ptr, ptr)
20 define i32 @_ZN9Generator6strregEPKc(ptr %this, ptr %s) {
22 %s_addr.0 = select i1 false, ptr @.str9, ptr %s ; <ptr> [#uses=2]
23 %tmp122 = icmp eq ptr %s_addr.0, null ; <i1> [#uses=1]
26 bb55: ; preds = %bb184
29 bb88: ; preds = %bb184
30 br i1 %tmp122, label %bb154, label %bb128
32 bb128: ; preds = %bb88
33 %tmp138 = call i32 @strcmp( ptr null, ptr %s_addr.0 ) ; <i32> [#uses=1]
34 %iftmp.37.0.in4 = icmp eq i32 %tmp138, 0 ; <i1> [#uses=1]
35 br i1 %iftmp.37.0.in4, label %bb250, label %bb166
37 bb154: ; preds = %bb88
38 br i1 false, label %bb250, label %bb166
40 bb166: ; preds = %bb154, %bb128
41 %tmp175 = add i32 %idx.0, 1 ; <i32> [#uses=1]
42 %tmp177 = add i32 %tmp175, 0 ; <i32> [#uses=1]
43 %tmp181 = add i32 %tmp177, 0 ; <i32> [#uses=1]
44 %tmp183 = add i32 %i33.0, 1 ; <i32> [#uses=1]
47 bb184: ; preds = %bb166, %entry
48 %i33.0 = phi i32 [ 0, %entry ], [ %tmp183, %bb166 ] ; <i32> [#uses=2]
49 %idx.0 = phi i32 [ 0, %entry ], [ %tmp181, %bb166 ] ; <i32> [#uses=2]
50 %tmp49 = icmp slt i32 %i33.0, 0 ; <i1> [#uses=1]
51 br i1 %tmp49, label %bb88, label %bb55
53 bb250: ; preds = %bb154, %bb128