3 ; RUN: opt < %s -passes=dot-cfg -cfg-hide-unreachable-paths -cfg-dot-filename-prefix=%t/unreach 2>/dev/null > /dev/null
4 ; RUN: FileCheck %s -input-file=%t/unreach.callee.dot -check-prefix=UNREACH
5 ; RUN: opt < %s -passes=dot-cfg -cfg-hide-deoptimize-paths -cfg-dot-filename-prefix=%t/deopt 2>/dev/null > /dev/null
6 ; RUN: FileCheck %s -input-file=%t/deopt.callee.dot -check-prefix=DEOPT
7 ; RUN: opt < %s -passes=dot-cfg -cfg-dot-filename-prefix=%t/no-flags 2>/dev/null > /dev/null
8 ; RUN: FileCheck %s -input-file=%t/no-flags.callee.dot -check-prefix=NO-FLAGS
9 ; RUN: opt < %s -passes=dot-cfg -cfg-hide-unreachable-paths -cfg-hide-deoptimize-paths -cfg-dot-filename-prefix=%t/both-flags 2>/dev/null > /dev/null
10 ; RUN: FileCheck %s -input-file=%t/both-flags.callee.dot -check-prefix=BOTH-FLAGS
12 declare i8 @llvm.experimental.deoptimize.i8(...)
14 define i8 @callee(ptr %c) alwaysinline {
15 %c0 = load volatile i1, ptr %c
16 br i1 %c0, label %lleft, label %lright
17 ; NO-FLAGS: label="{lleft: \l %v0 = call i8 (...) @llvm.experimental.deoptimize.i8(i32 1) [ \"deopt\"(i32 1)\l... ]\l ret i8 %v0\l}"
18 ; DEOPT-NOT: label="{lleft: \l %v0 = call i8 (...) @llvm.experimental.deoptimize.i8(i32 1) [ \"deopt\"(i32 1)\l... ]\l ret i8 %v0\l}"
19 ; UNREACH: label="{lleft: \l %v0 = call i8 (...) @llvm.experimental.deoptimize.i8(i32 1) [ \"deopt\"(i32 1)\l... ]\l ret i8 %v0\l}"
20 ; BOTH-FLAGS-NOT: label="{lleft: \l %v0 = call i8 (...) @llvm.experimental.deoptimize.i8(i32 1) [ \"deopt\"(i32 1)\l... ]\l ret i8 %v0\l}"
22 %v0 = call i8(...) @llvm.experimental.deoptimize.i8(i32 1) [ "deopt"(i32 1) ]
25 ; NO-FLAGS: label="{lright: \l unreachable\l}"
26 ; DEOPT: label="{lright: \l unreachable\l}"
27 ; UNREACH-NOT: label="{lright: \l unreachable\l}"
28 ; BOTH-FLAGS-NOT: label="{lright: \l unreachable\l}"