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 ;; Also checks dot-cfg pass runs on func which has optnone attribute.
6 ; RUN: opt < %s -passes=dot-cfg -cfg-dot-filename-prefix=%t -cfg-func-name=f 2>/dev/null > /dev/null
7 ; RUN: FileCheck %s -input-file=%t.f.dot -check-prefix=F
8 ; RUN: FileCheck %s -input-file=%t.func.dot -check-prefix=Func
9 ; RUN: not test -f %t.other.dot
11 ; RUN: opt < %s -passes=dot-cfg-only -cfg-dot-filename-prefix=%t-only -cfg-func-name=f 2>/dev/null > /dev/null
12 ; RUN: FileCheck %s -input-file=%t-only.f.dot -check-prefix=F
13 ; RUN: FileCheck %s -input-file=%t-only.func.dot -check-prefix=Func
14 ; RUN: not test -f %t-only.other.dot
16 ; F: digraph "CFG for 'f' function"
19 %check = icmp sgt i32 %0, 0
20 br i1 %check, label %if, label %exit
23 exit: ; preds = %entry, %if
27 ; Func: digraph "CFG for 'func' function"
28 define void @func(i32) optnone noinline {
30 %check = icmp sgt i32 %0, 0
32 exit: ; preds = %entry
36 define void @other(i32) {
38 %check = icmp sgt i32 %0, 0
40 exit: ; preds = %entry