1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/test/Other/cfg-printer-branch-weights.ll
Chandler Carruth 0073f67e9e [CFG Printer] Add support for writing the dot files with a custom
prefix.

Use this to direct these files to a specific location in the test suite
so that we don't write files out to random directories (or fail if the
working directory isn't writable).

llvm-svn: 344014
2018-10-09 04:30:23 +00:00

20 lines
463 B
LLVM

;RUN: opt < %s -analyze -dot-cfg -cfg-dot-filename-prefix=%t 2>/dev/null
;RUN: FileCheck %s -input-file=%t.f.dot
define void @f(i32) {
entry:
%check = icmp sgt i32 %0, 0
br i1 %check, label %if, label %exit, !prof !0
; CHECK: label="W:1"
; CHECK-NOT: ["];
if: ; preds = %entry
br label %exit
; CHECK: label="W:200"
; CHECK-NOT: ["];
exit: ; preds = %entry, %if
ret void
}
!0 = !{!"branch_weights", i32 1, i32 200}