1; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=basic-blocks,simplify-cfg --test %python --test-arg %p/remove-bbs-sequence.py %s -o %t 2; RUN: FileCheck %s < %t 3 4; The interestingness test is that the CFG contains a loop. Verify that the 5; unnecessary bb2 and bb3 are removed while still maintaining a loop. 6 7define void @main() { 8 bb0: 9 br label %bb1 10 bb1: 11 br label %bb2 12 bb2: 13 br label %bb3 14 bb3: 15 %phi = phi i32 [ undef, %bb2 ] 16 br label %bb4 17 bb4: 18 br label %bb1 19} 20 21; CHECK:define void @main() { 22; CHECK-NEXT: bb0: 23; CHECK-NEXT: br label %bb4 24; CHECK-EMPTY: 25; CHECK-NEXT: bb4: 26; CHECK-NEXT: %phi = phi i32 [ undef, %bb0 ], [ undef, %bb4 ] 27; CHECK-NEXT: br label %bb4 28; CHECK-NEXT:} 29