1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt < %s -print-mustexecute -disable-output 2>&1 | FileCheck %s --check-prefix=ME 3; RUN: opt < %s -print-must-be-executed-contexts -disable-output 2>&1 | FileCheck %s --check-prefix=MBEC 4; RUN: opt < %s -passes=print-must-be-executed-contexts -disable-output 2>&1 | FileCheck %s --check-prefix=MBEC 5; 6; void simple_conditional(int c) { 7; A(); 8; B(); 9; if (c) { 10; C(); 11; D(); 12; } 13; E(); 14; F(); 15; G(); 16; } 17; 18; Best result: 19; Start Instruction | Visit Set 20; A | A, B, E, F 21; B | A, B, E, F 22; C | A, B, C, D, E, F 23; D | A, B, C, D, E, F 24; E | A, B, E, F 25; F | A, B, E, F 26; G | A, B, E, F, G 27; 28; 29; There are no loops so print-mustexec will not do anything. 30; ME-NOT: mustexec 31; 32define void @simple_conditional(i32 %arg) { 33bb: 34 call void @A() 35; MBEC: -- Explore context of: call void @A() 36; MBEC-NEXT: [F: simple_conditional] call void @A() 37; MBEC-NEXT: [F: simple_conditional] call void @B() 38; MBEC-NEXT: [F: simple_conditional] %tmp = icmp eq i32 %arg, 0 39; MBEC-NEXT: [F: simple_conditional] br i1 %tmp, label %bb2, label %bb1 40; MBEC-NEXT: [F: simple_conditional] call void @E() 41; MBEC-NEXT: [F: simple_conditional] call void @F() 42; MBEC-NOT: call 43 44 call void @B() 45; MBEC: -- Explore context of: call void @B() 46; MBEC-NEXT: [F: simple_conditional] call void @B() 47; MBEC-NEXT: [F: simple_conditional] %tmp = icmp eq i32 %arg, 0 48; MBEC-NEXT: [F: simple_conditional] br i1 %tmp, label %bb2, label %bb1 49; MBEC-NEXT: [F: simple_conditional] call void @E() 50; MBEC-NEXT: [F: simple_conditional] call void @F() 51; MBEC-NEXT: [F: simple_conditional] call void @A() 52; MBEC-NOT: call 53; MBEC: -- Explore context of: %tmp 54 55 %tmp = icmp eq i32 %arg, 0 56 br i1 %tmp, label %bb2, label %bb1 57 58bb1: ; preds = %bb 59 call void @C() 60; MBEC: -- Explore context of: call void @C() 61; MBEC-NEXT: [F: simple_conditional] call void @C() 62; MBEC-NEXT: [F: simple_conditional] call void @D() 63; MBEC-NEXT: [F: simple_conditional] br label %bb2 64; MBEC-NEXT: [F: simple_conditional] call void @E() 65; MBEC-NEXT: [F: simple_conditional] call void @F() 66; MBEC-NEXT: [F: simple_conditional] br i1 %tmp, label %bb2, label %bb1 67; MBEC-NEXT: [F: simple_conditional] %tmp = icmp eq i32 %arg, 0 68; MBEC-NEXT: [F: simple_conditional] call void @B() 69; MBEC-NEXT: [F: simple_conditional] call void @A() 70; MBEC-NOT: call 71 72 call void @D() 73; MBEC: -- Explore context of: call void @D() 74; MBEC-NEXT: [F: simple_conditional] call void @D() 75; MBEC-NEXT: [F: simple_conditional] br label %bb2 76; MBEC-NEXT: [F: simple_conditional] call void @E() 77; MBEC-NEXT: [F: simple_conditional] call void @F() 78; MBEC-NEXT: [F: simple_conditional] call void @C() 79; MBEC-NEXT: [F: simple_conditional] br i1 %tmp, label %bb2, label %bb1 80; MBEC-NEXT: [F: simple_conditional] %tmp = icmp eq i32 %arg, 0 81; MBEC-NEXT: [F: simple_conditional] call void @B() 82; MBEC-NEXT: [F: simple_conditional] call void @A() 83; MBEC-NOT: call 84; MBEC: -- Explore context of: br 85 86 br label %bb2 87 88bb2: ; preds = %bb, %bb1 89 call void @E() 90; MBEC: -- Explore context of: call void @E() 91; MBEC-NEXT: [F: simple_conditional] call void @E() 92; MBEC-NEXT: [F: simple_conditional] call void @F() 93; MBEC-NEXT: [F: simple_conditional] br i1 %tmp, label %bb2, label %bb1 94; MBEC-NEXT: [F: simple_conditional] %tmp = icmp eq i32 %arg, 0 95; MBEC-NEXT: [F: simple_conditional] call void @B() 96; MBEC-NEXT: [F: simple_conditional] call void @A() 97; MBEC-NOT: call 98 99 call void @F() ; might not return! 100; MBEC: -- Explore context of: call void @F() 101; MBEC-NEXT: [F: simple_conditional] call void @F() 102; MBEC-NEXT: [F: simple_conditional] call void @E() 103; MBEC-NEXT: [F: simple_conditional] br i1 %tmp, label %bb2, label %bb1 104; MBEC-NEXT: [F: simple_conditional] %tmp = icmp eq i32 %arg, 0 105; MBEC-NEXT: [F: simple_conditional] call void @B() 106; MBEC-NEXT: [F: simple_conditional] call void @A() 107; MBEC-NOT: call 108 109 call void @G() 110; MBEC: -- Explore context of: call void @G() 111; MBEC-NEXT: [F: simple_conditional] call void @G() 112; MBEC-NEXT: [F: simple_conditional] ret void 113; MBEC-NEXT: [F: simple_conditional] call void @F() 114; MBEC-NEXT: [F: simple_conditional] call void @E() 115; MBEC-NEXT: [F: simple_conditional] br i1 %tmp, label %bb2, label %bb1 116; MBEC-NEXT: [F: simple_conditional] %tmp = icmp eq i32 %arg, 0 117; MBEC-NEXT: [F: simple_conditional] call void @B() 118; MBEC-NEXT: [F: simple_conditional] call void @A() 119; MBEC-NOT: call 120; MBEC: -- Explore context of: ret 121 122 ret void 123} 124 125 126; void complex_loops_and_control(int c, int d) { 127; A(); 128; while (1) { 129; B(); 130; if (++c == d) 131; C(); 132; if (++c == d) 133; continue; 134; D(); 135; if (++c == d) 136; break; 137; do { 138; if (++c == d) 139; continue; 140; E(); 141; } while (++c == d); 142; F(); 143; } 144; G(); 145; } 146; 147; Best result: 148; Start Instruction | Visit Set 149; A | A, B 150; B | A, B 151; C | A, B, C 152; D | A, B, D 153; E | A, B, D, E, F 154; F | A, B, D, F 155; G | A, B, D, G 156; 157; 158; ME: define void @complex_loops_and_control 159define void @complex_loops_and_control(i32 %arg, i32 %arg1) { 160bb: 161 call void @A() 162; ME: call void @A() 163; ME-NOT: mustexec 164; ME-NEXT: br 165; MBEC: -- Explore context of: call void @A() 166; MBEC-NEXT: [F: complex_loops_and_control] call void @A() 167; MBEC-NEXT: [F: complex_loops_and_control] br label %bb2 168; MBEC-NEXT: [F: complex_loops_and_control] %.0 = phi i32 [ %arg, %bb ], [ %.0.be, %.backedge ] 169; MBEC-NEXT: [F: complex_loops_and_control] call void @B() 170; MBEC-NEXT: [F: complex_loops_and_control] %tmp = add nsw i32 %.0, 1 171; MBEC-NEXT: [F: complex_loops_and_control] %tmp3 = icmp eq i32 %tmp, %arg1 172; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp3, label %bb4, label %bb5 173; MBEC-NOT: call 174; MBEC: -- Explore context of: br 175 br label %bb2 176 177bb2: ; preds = %.backedge, %bb 178 %.0 = phi i32 [ %arg, %bb ], [ %.0.be, %.backedge ] 179 call void @B() 180; ME: call void @B() ; (mustexec in: bb2) 181; MBEC: -- Explore context of: call void @B() 182; MBEC-NEXT: [F: complex_loops_and_control] call void @B() 183; MBEC-NEXT: [F: complex_loops_and_control] %tmp = add nsw i32 %.0, 1 184; MBEC-NEXT: [F: complex_loops_and_control] %tmp3 = icmp eq i32 %tmp, %arg1 185; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp3, label %bb4, label %bb5 186; MBEC-NEXT: [F: complex_loops_and_control] %tmp6 = add nsw i32 %.0, 2 187; MBEC-NEXT: [F: complex_loops_and_control] %tmp7 = icmp eq i32 %tmp6, %arg1 188; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp7, label %bb8, label %bb9 189; MBEC-NEXT: [F: complex_loops_and_control] %.0 = phi i32 [ %arg, %bb ], [ %.0.be, %.backedge ] 190; MBEC-NEXT: [F: complex_loops_and_control] br label %bb2 191; MBEC-NEXT: [F: complex_loops_and_control] call void @A() 192; MBEC-NOT: call 193; MBEC: -- Explore context of: %tmp 194 %tmp = add nsw i32 %.0, 1 195 %tmp3 = icmp eq i32 %tmp, %arg1 196 br i1 %tmp3, label %bb4, label %bb5 197 198bb4: ; preds = %bb2 199 call void @C() 200; ME: call void @C() 201; ME-NOT: mustexec 202; ME-NEXT: br 203; MBEC: -- Explore context of: call void @C() 204; MBEC-NEXT: [F: complex_loops_and_control] call void @C() 205; MBEC-NEXT: [F: complex_loops_and_control] br label %bb5 206; MBEC-NEXT: [F: complex_loops_and_control] %tmp6 = add nsw i32 %.0, 2 207; MBEC-NEXT: [F: complex_loops_and_control] %tmp7 = icmp eq i32 %tmp6, %arg1 208; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp7, label %bb8, label %bb9 209; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp3, label %bb4, label %bb5 210; MBEC-NEXT: [F: complex_loops_and_control] %tmp3 = icmp eq i32 %tmp, %arg1 211; MBEC-NEXT: [F: complex_loops_and_control] %tmp = add nsw i32 %.0, 1 212; MBEC-NEXT: [F: complex_loops_and_control] call void @B() 213; MBEC-NEXT: [F: complex_loops_and_control] %.0 = phi i32 [ %arg, %bb ], [ %.0.be, %.backedge ] 214; MBEC-NEXT: [F: complex_loops_and_control] br label %bb2 215; MBEC-NEXT: [F: complex_loops_and_control] call void @A() 216; MBEC-NOT: call 217; MBEC: -- Explore context of: br 218 br label %bb5 219 220bb5: ; preds = %bb4, %bb2 221 %tmp6 = add nsw i32 %.0, 2 222 %tmp7 = icmp eq i32 %tmp6, %arg1 223 br i1 %tmp7, label %bb8, label %bb9 224 225bb8: ; preds = %bb5 226 br label %.backedge 227 228.backedge: ; preds = %bb8, %bb22 229 %.0.be = phi i32 [ %tmp6, %bb8 ], [ %.lcssa, %bb22 ] 230 br label %bb2 231 232bb9: ; preds = %bb5 233 call void @D() 234; ME: call void @D() 235; ME-NOT: mustexec 236; ME-NEXT: %tmp10 237; MBEC: -- Explore context of: call void @D() 238; MBEC-NEXT: [F: complex_loops_and_control] call void @D() 239; MBEC-NEXT: [F: complex_loops_and_control] %tmp10 = add nsw i32 %.0, 3 240; MBEC-NEXT: [F: complex_loops_and_control] %tmp11 = icmp eq i32 %tmp10, %arg1 241; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp11, label %bb12, label %bb13 242; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp7, label %bb8, label %bb9 243; MBEC-NEXT: [F: complex_loops_and_control] %tmp7 = icmp eq i32 %tmp6, %arg1 244; MBEC-NEXT: [F: complex_loops_and_control] %tmp6 = add nsw i32 %.0, 2 245; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp3, label %bb4, label %bb5 246; MBEC-NEXT: [F: complex_loops_and_control] %tmp3 = icmp eq i32 %tmp, %arg1 247; MBEC-NEXT: [F: complex_loops_and_control] %tmp = add nsw i32 %.0, 1 248; MBEC-NEXT: [F: complex_loops_and_control] call void @B() 249; MBEC-NEXT: [F: complex_loops_and_control] %.0 = phi i32 [ %arg, %bb ], [ %.0.be, %.backedge ] 250; MBEC-NEXT: [F: complex_loops_and_control] br label %bb2 251; MBEC-NEXT: [F: complex_loops_and_control] call void @A() 252; MBEC-NOT: call 253; MBEC: -- Explore context of: %tmp10 254 %tmp10 = add nsw i32 %.0, 3 255 %tmp11 = icmp eq i32 %tmp10, %arg1 256 br i1 %tmp11, label %bb12, label %bb13 257 258bb12: ; preds = %bb9 259 br label %bb23 260 261bb13: ; preds = %bb9 262 br label %bb14 263 264bb14: ; preds = %bb19, %bb13 265 %.1 = phi i32 [ %tmp10, %bb13 ], [ %tmp20, %bb19 ] 266 %tmp15 = add nsw i32 %.1, 1 267 %tmp16 = icmp eq i32 %tmp15, %arg1 268 br i1 %tmp16, label %bb17, label %bb18 269 270bb17: ; preds = %bb14 271 br label %bb19 272 273bb18: ; preds = %bb14 274 call void @E() 275; ME: call void @E() 276; ME-NOT: mustexec 277; ME-NEXT: br 278; FIXME: Missing F 279; MBEC: -- Explore context of: call void @E() 280; MBEC-NEXT: [F: complex_loops_and_control] call void @E() 281; MBEC-NEXT: [F: complex_loops_and_control] br label %bb19 282; MBEC-NEXT: [F: complex_loops_and_control] %tmp20 = add nsw i32 %.1, 2 283; MBEC-NEXT: [F: complex_loops_and_control] %tmp21 = icmp eq i32 %tmp20, %arg1 284; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp21, label %bb14, label %bb22 285; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp16, label %bb17, label %bb18 286; MBEC-NEXT: [F: complex_loops_and_control] %tmp16 = icmp eq i32 %tmp15, %arg1 287; MBEC-NEXT: [F: complex_loops_and_control] %tmp15 = add nsw i32 %.1, 1 288; MBEC-NEXT: [F: complex_loops_and_control] %.1 = phi i32 [ %tmp10, %bb13 ], [ %tmp20, %bb19 ] 289; MBEC-NEXT: [F: complex_loops_and_control] br label %bb14 290; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp11, label %bb12, label %bb13 291; MBEC-NEXT: [F: complex_loops_and_control] %tmp11 = icmp eq i32 %tmp10, %arg1 292; MBEC-NEXT: [F: complex_loops_and_control] %tmp10 = add nsw i32 %.0, 3 293; MBEC-NEXT: [F: complex_loops_and_control] call void @D() 294; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp7, label %bb8, label %bb9 295; MBEC-NEXT: [F: complex_loops_and_control] %tmp7 = icmp eq i32 %tmp6, %arg1 296; MBEC-NEXT: [F: complex_loops_and_control] %tmp6 = add nsw i32 %.0, 2 297; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp3, label %bb4, label %bb5 298; MBEC-NEXT: [F: complex_loops_and_control] %tmp3 = icmp eq i32 %tmp, %arg1 299; MBEC-NEXT: [F: complex_loops_and_control] %tmp = add nsw i32 %.0, 1 300; MBEC-NEXT: [F: complex_loops_and_control] call void @B() 301; MBEC-NEXT: [F: complex_loops_and_control] %.0 = phi i32 [ %arg, %bb ], [ %.0.be, %.backedge ] 302; MBEC-NEXT: [F: complex_loops_and_control] br label %bb2 303; MBEC-NEXT: [F: complex_loops_and_control] call void @A() 304; MBEC-NOT: call 305; MBEC: -- Explore context of: br 306 br label %bb19 307 308bb19: ; preds = %bb18, %bb17 309 %tmp20 = add nsw i32 %.1, 2 310 %tmp21 = icmp eq i32 %tmp20, %arg1 311 br i1 %tmp21, label %bb14, label %bb22 312 313bb22: ; preds = %bb19 314 %.lcssa = phi i32 [ %tmp20, %bb19 ] 315 call void @F() 316; ME: call void @F() 317; ME-NOT: mustexec 318; ME-NEXT: br 319; MBEC: -- Explore context of: call void @F() 320; MBEC-NEXT: [F: complex_loops_and_control] call void @F() 321; MBEC-NEXT: [F: complex_loops_and_control] %.lcssa = phi i32 [ %tmp20, %bb19 ] 322; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp21, label %bb14, label %bb22 323; MBEC-NEXT: [F: complex_loops_and_control] %tmp21 = icmp eq i32 %tmp20, %arg1 324; MBEC-NEXT: [F: complex_loops_and_control] %tmp20 = add nsw i32 %.1, 2 325; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp16, label %bb17, label %bb18 326; MBEC-NEXT: [F: complex_loops_and_control] %tmp16 = icmp eq i32 %tmp15, %arg1 327; MBEC-NEXT: [F: complex_loops_and_control] %tmp15 = add nsw i32 %.1, 1 328; MBEC-NEXT: [F: complex_loops_and_control] %.1 = phi i32 [ %tmp10, %bb13 ], [ %tmp20, %bb19 ] 329; MBEC-NEXT: [F: complex_loops_and_control] br label %bb14 330; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp11, label %bb12, label %bb13 331; MBEC-NEXT: [F: complex_loops_and_control] %tmp11 = icmp eq i32 %tmp10, %arg1 332; MBEC-NEXT: [F: complex_loops_and_control] %tmp10 = add nsw i32 %.0, 3 333; MBEC-NEXT: [F: complex_loops_and_control] call void @D() 334; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp7, label %bb8, label %bb9 335; MBEC-NEXT: [F: complex_loops_and_control] %tmp7 = icmp eq i32 %tmp6, %arg1 336; MBEC-NEXT: [F: complex_loops_and_control] %tmp6 = add nsw i32 %.0, 2 337; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp3, label %bb4, label %bb5 338; MBEC-NEXT: [F: complex_loops_and_control] %tmp3 = icmp eq i32 %tmp, %arg1 339; MBEC-NEXT: [F: complex_loops_and_control] %tmp = add nsw i32 %.0, 1 340; MBEC-NEXT: [F: complex_loops_and_control] call void @B() 341; MBEC-NEXT: [F: complex_loops_and_control] %.0 = phi i32 [ %arg, %bb ], [ %.0.be, %.backedge ] 342; MBEC-NEXT: [F: complex_loops_and_control] br label %bb2 343; MBEC-NEXT: [F: complex_loops_and_control] call void @A() 344; MBEC-NOT: call 345; MBEC: -- Explore context of: br 346 br label %.backedge 347 348bb23: ; preds = %bb12 349 call void @G() 350; ME: call void @G() 351; ME-NOT: mustexec 352; ME-NEXT: ret 353; MBEC: -- Explore context of: call void @G() 354; MBEC-NEXT: [F: complex_loops_and_control] call void @G() 355; MBEC-NEXT: [F: complex_loops_and_control] ret void 356; MBEC-NEXT: [F: complex_loops_and_control] br label %bb23 357; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp11, label %bb12, label %bb13 358; MBEC-NEXT: [F: complex_loops_and_control] %tmp11 = icmp eq i32 %tmp10, %arg1 359; MBEC-NEXT: [F: complex_loops_and_control] %tmp10 = add nsw i32 %.0, 3 360; MBEC-NEXT: [F: complex_loops_and_control] call void @D() 361; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp7, label %bb8, label %bb9 362; MBEC-NEXT: [F: complex_loops_and_control] %tmp7 = icmp eq i32 %tmp6, %arg1 363; MBEC-NEXT: [F: complex_loops_and_control] %tmp6 = add nsw i32 %.0, 2 364; MBEC-NEXT: [F: complex_loops_and_control] br i1 %tmp3, label %bb4, label %bb5 365; MBEC-NEXT: [F: complex_loops_and_control] %tmp3 = icmp eq i32 %tmp, %arg1 366; MBEC-NEXT: [F: complex_loops_and_control] %tmp = add nsw i32 %.0, 1 367; MBEC-NEXT: [F: complex_loops_and_control] call void @B() 368; MBEC-NEXT: [F: complex_loops_and_control] %.0 = phi i32 [ %arg, %bb ], [ %.0.be, %.backedge ] 369; MBEC-NEXT: [F: complex_loops_and_control] br label %bb2 370; MBEC-NEXT: [F: complex_loops_and_control] call void @A() 371; MBEC-NOT: call 372; MBEC: -- Explore context of: ret 373 ret void 374} 375 376declare void @A() nounwind willreturn 377 378declare void @B() nounwind willreturn 379 380declare void @C() nounwind willreturn 381 382declare void @D() nounwind willreturn 383 384declare void @E() nounwind willreturn 385 386declare void @F() nounwind 387 388declare void @G() nounwind willreturn 389 390declare i32 @g(i32*) nounwind willreturn 391 392declare void @h(i32*) nounwind willreturn 393 394define i32 @nonnull_exec_ctx_1(i32* %a, i32 %b) { 395; MBEC: -- Explore context of: %tmp3 = icmp eq i32 %b, 0 396; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp3 = icmp eq i32 %b, 0 397; MBEC-NEXT: [F: nonnull_exec_ctx_1] br i1 %tmp3, label %ex, label %hd 398; MBEC-NEXT: -- Explore context of: br i1 %tmp3, label %ex, label %hd 399; MBEC-NEXT: [F: nonnull_exec_ctx_1] br i1 %tmp3, label %ex, label %hd 400; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp3 = icmp eq i32 %b, 0 401; MBEC-NEXT: -- Explore context of: %tmp5 = tail call i32 @g(i32* nonnull %a) 402; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp5 = tail call i32 @g(i32* nonnull %a) 403; MBEC-NEXT: [F: nonnull_exec_ctx_1] ret i32 %tmp5 404; MBEC-NEXT: [F: nonnull_exec_ctx_1] br i1 %tmp3, label %ex, label %hd 405; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp3 = icmp eq i32 %b, 0 406; MBEC-NEXT: -- Explore context of: ret i32 %tmp5 407; MBEC-NEXT: [F: nonnull_exec_ctx_1] ret i32 %tmp5 408; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp5 = tail call i32 @g(i32* nonnull %a) 409; MBEC-NEXT: [F: nonnull_exec_ctx_1] br i1 %tmp3, label %ex, label %hd 410; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp3 = icmp eq i32 %b, 0 411; MBEC-NEXT: -- Explore context of: %tmp7 = phi i32 [ %tmp8, %hd ], [ 0, %en ] 412; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp7 = phi i32 [ %tmp8, %hd ], [ 0, %en ] 413; MBEC-NEXT: [F: nonnull_exec_ctx_1] tail call void @h(i32* %a) 414; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp8 = add nuw i32 %tmp7, 1 415; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp9 = icmp eq i32 %tmp8, %b 416; MBEC-NEXT: [F: nonnull_exec_ctx_1] br i1 %tmp9, label %ex, label %hd 417; MBEC-NEXT: [F: nonnull_exec_ctx_1] br i1 %tmp3, label %ex, label %hd 418; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp3 = icmp eq i32 %b, 0 419; MBEC-NEXT: -- Explore context of: tail call void @h(i32* %a) 420; MBEC-NEXT: [F: nonnull_exec_ctx_1] tail call void @h(i32* %a) 421; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp8 = add nuw i32 %tmp7, 1 422; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp9 = icmp eq i32 %tmp8, %b 423; MBEC-NEXT: [F: nonnull_exec_ctx_1] br i1 %tmp9, label %ex, label %hd 424; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp7 = phi i32 [ %tmp8, %hd ], [ 0, %en ] 425; MBEC-NEXT: [F: nonnull_exec_ctx_1] br i1 %tmp3, label %ex, label %hd 426; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp3 = icmp eq i32 %b, 0 427; MBEC-NEXT: -- Explore context of: %tmp8 = add nuw i32 %tmp7, 1 428; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp8 = add nuw i32 %tmp7, 1 429; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp9 = icmp eq i32 %tmp8, %b 430; MBEC-NEXT: [F: nonnull_exec_ctx_1] br i1 %tmp9, label %ex, label %hd 431; MBEC-NEXT: [F: nonnull_exec_ctx_1] tail call void @h(i32* %a) 432; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp7 = phi i32 [ %tmp8, %hd ], [ 0, %en ] 433; MBEC-NEXT: [F: nonnull_exec_ctx_1] br i1 %tmp3, label %ex, label %hd 434; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp3 = icmp eq i32 %b, 0 435; MBEC-NEXT: -- Explore context of: %tmp9 = icmp eq i32 %tmp8, %b 436; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp9 = icmp eq i32 %tmp8, %b 437; MBEC-NEXT: [F: nonnull_exec_ctx_1] br i1 %tmp9, label %ex, label %hd 438; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp8 = add nuw i32 %tmp7, 1 439; MBEC-NEXT: [F: nonnull_exec_ctx_1] tail call void @h(i32* %a) 440; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp7 = phi i32 [ %tmp8, %hd ], [ 0, %en ] 441; MBEC-NEXT: [F: nonnull_exec_ctx_1] br i1 %tmp3, label %ex, label %hd 442; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp3 = icmp eq i32 %b, 0 443; MBEC-NEXT: -- Explore context of: br i1 %tmp9, label %ex, label %hd 444; MBEC-NEXT: [F: nonnull_exec_ctx_1] br i1 %tmp9, label %ex, label %hd 445; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp9 = icmp eq i32 %tmp8, %b 446; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp8 = add nuw i32 %tmp7, 1 447; MBEC-NEXT: [F: nonnull_exec_ctx_1] tail call void @h(i32* %a) 448; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp7 = phi i32 [ %tmp8, %hd ], [ 0, %en ] 449; MBEC-NEXT: [F: nonnull_exec_ctx_1] br i1 %tmp3, label %ex, label %hd 450; MBEC-NEXT: [F: nonnull_exec_ctx_1] %tmp3 = icmp eq i32 %b, 0 451en: 452 %tmp3 = icmp eq i32 %b, 0 453 br i1 %tmp3, label %ex, label %hd 454 455ex: 456 %tmp5 = tail call i32 @g(i32* nonnull %a) 457 ret i32 %tmp5 458 459hd: 460 %tmp7 = phi i32 [ %tmp8, %hd ], [ 0, %en ] 461 tail call void @h(i32* %a) 462 %tmp8 = add nuw i32 %tmp7, 1 463 %tmp9 = icmp eq i32 %tmp8, %b 464 br i1 %tmp9, label %ex, label %hd 465} 466 467define i32 @nonnull_exec_ctx_2(i32* %a, i32 %b) nounwind willreturn { 468; MBEC: -- Explore context of: %tmp3 = icmp eq i32 %b, 0 469; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp3 = icmp eq i32 %b, 0 470; MBEC-NEXT: [F: nonnull_exec_ctx_2] br i1 %tmp3, label %ex, label %hd 471; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp5 = tail call i32 @g(i32* nonnull %a) 472; MBEC-NEXT: [F: nonnull_exec_ctx_2] ret i32 %tmp5 473; MBEC-NEXT: -- Explore context of: br i1 %tmp3, label %ex, label %hd 474; MBEC-NEXT: [F: nonnull_exec_ctx_2] br i1 %tmp3, label %ex, label %hd 475; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp5 = tail call i32 @g(i32* nonnull %a) 476; MBEC-NEXT: [F: nonnull_exec_ctx_2] ret i32 %tmp5 477; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp3 = icmp eq i32 %b, 0 478; MBEC-NEXT: -- Explore context of: %tmp5 = tail call i32 @g(i32* nonnull %a) 479; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp5 = tail call i32 @g(i32* nonnull %a) 480; MBEC-NEXT: [F: nonnull_exec_ctx_2] ret i32 %tmp5 481; MBEC-NEXT: [F: nonnull_exec_ctx_2] br i1 %tmp3, label %ex, label %hd 482; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp3 = icmp eq i32 %b, 0 483; MBEC-NEXT: -- Explore context of: ret i32 %tmp5 484; MBEC-NEXT: [F: nonnull_exec_ctx_2] ret i32 %tmp5 485; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp5 = tail call i32 @g(i32* nonnull %a) 486; MBEC-NEXT: [F: nonnull_exec_ctx_2] br i1 %tmp3, label %ex, label %hd 487; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp3 = icmp eq i32 %b, 0 488; MBEC-NEXT: -- Explore context of: %tmp7 = phi i32 [ %tmp8, %hd ], [ 0, %en ] 489; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp7 = phi i32 [ %tmp8, %hd ], [ 0, %en ] 490; MBEC-NEXT: [F: nonnull_exec_ctx_2] tail call void @h(i32* %a) 491; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp8 = add nuw i32 %tmp7, 1 492; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp9 = icmp eq i32 %tmp8, %b 493; MBEC-NEXT: [F: nonnull_exec_ctx_2] br i1 %tmp9, label %ex, label %hd 494; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp5 = tail call i32 @g(i32* nonnull %a) 495; MBEC-NEXT: [F: nonnull_exec_ctx_2] ret i32 %tmp5 496; MBEC-NEXT: [F: nonnull_exec_ctx_2] br i1 %tmp3, label %ex, label %hd 497; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp3 = icmp eq i32 %b, 0 498; MBEC-NEXT: -- Explore context of: tail call void @h(i32* %a) 499; MBEC-NEXT: [F: nonnull_exec_ctx_2] tail call void @h(i32* %a) 500; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp8 = add nuw i32 %tmp7, 1 501; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp9 = icmp eq i32 %tmp8, %b 502; MBEC-NEXT: [F: nonnull_exec_ctx_2] br i1 %tmp9, label %ex, label %hd 503; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp5 = tail call i32 @g(i32* nonnull %a) 504; MBEC-NEXT: [F: nonnull_exec_ctx_2] ret i32 %tmp5 505; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp7 = phi i32 [ %tmp8, %hd ], [ 0, %en ] 506; MBEC-NEXT: [F: nonnull_exec_ctx_2] br i1 %tmp3, label %ex, label %hd 507; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp3 = icmp eq i32 %b, 0 508; MBEC-NEXT: -- Explore context of: %tmp8 = add nuw i32 %tmp7, 1 509; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp8 = add nuw i32 %tmp7, 1 510; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp9 = icmp eq i32 %tmp8, %b 511; MBEC-NEXT: [F: nonnull_exec_ctx_2] br i1 %tmp9, label %ex, label %hd 512; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp5 = tail call i32 @g(i32* nonnull %a) 513; MBEC-NEXT: [F: nonnull_exec_ctx_2] ret i32 %tmp5 514; MBEC-NEXT: [F: nonnull_exec_ctx_2] tail call void @h(i32* %a) 515; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp7 = phi i32 [ %tmp8, %hd ], [ 0, %en ] 516; MBEC-NEXT: [F: nonnull_exec_ctx_2] br i1 %tmp3, label %ex, label %hd 517; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp3 = icmp eq i32 %b, 0 518; MBEC-NEXT: -- Explore context of: %tmp9 = icmp eq i32 %tmp8, %b 519; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp9 = icmp eq i32 %tmp8, %b 520; MBEC-NEXT: [F: nonnull_exec_ctx_2] br i1 %tmp9, label %ex, label %hd 521; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp5 = tail call i32 @g(i32* nonnull %a) 522; MBEC-NEXT: [F: nonnull_exec_ctx_2] ret i32 %tmp5 523; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp8 = add nuw i32 %tmp7, 1 524; MBEC-NEXT: [F: nonnull_exec_ctx_2] tail call void @h(i32* %a) 525; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp7 = phi i32 [ %tmp8, %hd ], [ 0, %en ] 526; MBEC-NEXT: [F: nonnull_exec_ctx_2] br i1 %tmp3, label %ex, label %hd 527; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp3 = icmp eq i32 %b, 0 528; MBEC-NEXT: -- Explore context of: br i1 %tmp9, label %ex, label %hd 529; MBEC-NEXT: [F: nonnull_exec_ctx_2] br i1 %tmp9, label %ex, label %hd 530; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp5 = tail call i32 @g(i32* nonnull %a) 531; MBEC-NEXT: [F: nonnull_exec_ctx_2] ret i32 %tmp5 532; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp9 = icmp eq i32 %tmp8, %b 533; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp8 = add nuw i32 %tmp7, 1 534; MBEC-NEXT: [F: nonnull_exec_ctx_2] tail call void @h(i32* %a) 535; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp7 = phi i32 [ %tmp8, %hd ], [ 0, %en ] 536; MBEC-NEXT: [F: nonnull_exec_ctx_2] br i1 %tmp3, label %ex, label %hd 537; MBEC-NEXT: [F: nonnull_exec_ctx_2] %tmp3 = icmp eq i32 %b, 0 538en: 539 %tmp3 = icmp eq i32 %b, 0 540 br i1 %tmp3, label %ex, label %hd 541 542ex: 543 %tmp5 = tail call i32 @g(i32* nonnull %a) 544 ret i32 %tmp5 545 546hd: 547 %tmp7 = phi i32 [ %tmp8, %hd ], [ 0, %en ] 548 tail call void @h(i32* %a) 549 %tmp8 = add nuw i32 %tmp7, 1 550 %tmp9 = icmp eq i32 %tmp8, %b 551 br i1 %tmp9, label %ex, label %hd 552} 553