29 lines · plain
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 %t2; RUN: FileCheck %s < %t3 4; The interestingness test is that the CFG contains a loop. Verify that the5; unnecessary bb2 and bb3 are removed while still maintaining a loop.6 7define void @main() {8 bb0:9 br label %bb110 bb1:11 br label %bb212 bb2:13 br label %bb314 bb3:15 %phi = phi i32 [ undef, %bb2 ]16 br label %bb417 bb4:18 br label %bb119}20 21; CHECK:define void @main() {22; CHECK-NEXT: bb0:23; CHECK-NEXT: br label %bb424; CHECK-EMPTY:25; CHECK-NEXT: bb4:26; CHECK-NEXT: %phi = phi i32 [ undef, %bb0 ], [ undef, %bb4 ]27; CHECK-NEXT: br label %bb428; CHECK-NEXT:}29