2020-10-22 12:52:27 +08:00
|
|
|
;RUN: opt < %s -dot-cfg -cfg-weights -cfg-raw-weights -cfg-dot-filename-prefix=%t 2>/dev/null
|
2018-10-09 12:30:23 +08:00
|
|
|
;RUN: FileCheck %s -input-file=%t.f.dot
|
2018-10-09 01:29:39 +08:00
|
|
|
|
|
|
|
define void @f(i32) {
|
|
|
|
entry:
|
|
|
|
%check = icmp sgt i32 %0, 0
|
|
|
|
br i1 %check, label %if, label %exit, !prof !0
|
|
|
|
|
2020-04-01 02:43:25 +08:00
|
|
|
; CHECK: label="W:7"
|
2018-10-09 01:29:39 +08:00
|
|
|
; CHECK-NOT: ["];
|
|
|
|
if: ; preds = %entry
|
|
|
|
br label %exit
|
2020-04-01 02:43:25 +08:00
|
|
|
; CHECK: label="W:1600"
|
2018-10-09 01:29:39 +08:00
|
|
|
; CHECK-NOT: ["];
|
|
|
|
exit: ; preds = %entry, %if
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
!0 = !{!"branch_weights", i32 1, i32 200}
|