48 lines · plain
1; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=basic-blocks --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t2; RUN: FileCheck %s < %t3 4; Make sure an invalid reduction isn't produced due to leaving behind5; invalid code in %bb8 after it becomes unreachable.6 7; CHECK-INTERESTINGNESS: store i32 0,8; CHECK-INTERESTINGNESS: store i32 1,9; CHECK-INTERESTINGNESS: store i32 2,10 11 12; CHECK: bb:13; CHECK-NEXT: store i32 0, ptr addrspace(3) null, align 414 15; CHECK: bb6: ; preds = %bb8, %bb16; CHECK-NEXT: store i32 1, ptr addrspace(3) null, align 417 18; CHECK: bb8: ; preds = %bb619; CHECK-NEXT: %tmp = phi ptr addrspace(5) [ null, %bb6 ]20define amdgpu_kernel void @foo(i32 %arg) {21bb:22 store i32 0, ptr addrspace(3) null23 br label %bb624 25bb6: ; preds = %bb10, %bb9, %bb8, %bb26 store i32 1, ptr addrspace(3) null27 switch i32 0, label %bb7 [28 i32 0, label %bb829 ]30 31bb7: ; preds = %bb632 unreachable33 34bb8: ; preds = %bb635 %tmp = phi ptr addrspace(5) [ null, %bb6 ]36 store i32 2, ptr addrspace(5) %tmp37 switch i32 %arg, label %bb6 [38 i32 0, label %bb1039 i32 1, label %bb940 ]41 42bb9: ; preds = %bb843 br label %bb644 45bb10: ; preds = %bb846 br label %bb647}48