1 ; RUN: rm -f %t.other.dot %t-only.other.dot
3 ;; Both f and func are dumped because their names contain the pattern 'f' as a substring.
4 ; RUN: opt < %s -dot-cfg -cfg-dot-filename-prefix=%t -cfg-func-name=f 2>/dev/null
5 ; RUN: FileCheck %s -input-file=%t.f.dot -check-prefix=F
6 ; RUN: FileCheck %s -input-file=%t.func.dot -check-prefix=Func
7 ; RUN: not test -f %t.other.dot
9 ; RUN: opt < %s -dot-cfg-only -cfg-dot-filename-prefix=%t-only -cfg-func-name=f 2>/dev/null
10 ; RUN: FileCheck %s -input-file=%t-only.f.dot -check-prefix=F
11 ; RUN: FileCheck %s -input-file=%t-only.func.dot -check-prefix=Func
12 ; RUN: not test -f %t-only.other.dot
14 ; F: digraph "CFG for 'f' function"
17 %check = icmp sgt i32 %0, 0
18 br i1 %check, label %if, label %exit
21 exit: ; preds = %entry, %if
25 ; Func: digraph "CFG for 'func' function"
26 define void @func(i32) {
28 %check = icmp sgt i32 %0, 0
30 exit: ; preds = %entry
34 define void @other(i32) {
36 %check = icmp sgt i32 %0, 0
38 exit: ; preds = %entry