45 lines · plain
1; RUN: llvm-reduce %s -o %t --abort-on-invalid-reduction --delta-passes=basic-blocks --test FileCheck --test-arg %s --test-arg --check-prefix=INTERESTING --test-arg --input-file2; RUN: FileCheck %s --input-file %t --check-prefixes=CHECK,INTERESTING3 4 5; CHECK-LABEL: define i32 @keep_callbr(ptr %p, i1 %cond) {6; CHECK: entry1:7; CHECK-NEXT: callbr void asm8; INTERESTING: store i32 0,9; INTERESTING: store i32 1,10 11define i32 @keep_callbr(ptr %p, i1 %cond) {12entry1:13 callbr void asm sideeffect "", "!i,~{dirflag},~{fpsr},~{flags}"()14 to label %for.cond [label %preheader]15 16for.cond:17 store i32 0, ptr %p18 ret i32 019 20preheader:21 store i32 1, ptr %p22 ret i32 123}24 25 26; CHECK-LABEL: define i32 @drop_callbr(ptr %p, i1 %cond) {27; CHECK: entry1:28; CHECK-NEXT: br29; INTERESTING: store i32 0,30 31define i32 @drop_callbr(ptr %p, i1 %cond) {32entry1:33 callbr void asm sideeffect "", "!i,~{dirflag},~{fpsr},~{flags}"()34 to label %for.cond [label %preheader]35 36for.cond:37 store i32 0, ptr %p38 ret i32 039 40preheader:41 store i32 1, ptr %p42 ret i32 143 44}45