brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 2a25c46 Raw
43 lines · plain
1; RUN: rm -f %t.other.dot %t-only.other.dot2 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.5 6; RUN: opt < %s -passes=dot-cfg -cfg-dot-filename-prefix=%t -cfg-func-name=f 2>/dev/null > /dev/null7; RUN: FileCheck %s -input-file=%t.f.dot -check-prefix=F8; RUN: FileCheck %s -input-file=%t.func.dot -check-prefix=Func9; RUN: not test -f %t.other.dot10 11; RUN: opt < %s -passes=dot-cfg-only -cfg-dot-filename-prefix=%t-only -cfg-func-name=f 2>/dev/null > /dev/null12; RUN: FileCheck %s -input-file=%t-only.f.dot -check-prefix=F13; RUN: FileCheck %s -input-file=%t-only.func.dot -check-prefix=Func14; RUN: not test -f %t-only.other.dot15 16; F: digraph "CFG for 'f' function"17define void @f(i32) {18entry:19  %check = icmp sgt i32 %0, 020  br i1 %check, label %if, label %exit21if:                     ; preds = %entry22  br label %exit23exit:                   ; preds = %entry, %if24  ret void25}26 27; Func: digraph "CFG for 'func' function"28define void @func(i32) optnone noinline {29entry:30  %check = icmp sgt i32 %0, 031  br label %exit32exit:                   ; preds = %entry33  ret void34}35 36define void @other(i32) {37entry:38  %check = icmp sgt i32 %0, 039  br label %exit40exit:                   ; preds = %entry41  ret void42}43