blob: bc41395e1e832fb4b7be96393073a7adfc0ca10a [file] [log] [blame]
Juergen Ributzka454d3742014-06-13 00:45:11 +00001; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s
2; RUN: llc < %s -fast-isel -fast-isel-abort -mtriple=x86_64-apple-darwin10 | FileCheck %s
3
4; Test if the BBs are reordred according to their branch weights.
5define i64 @branch_weights_test(i64 %a, i64 %b) {
6; CHECK-LABEL: branch_weights_test
7; CHECK-LABEL: success
8; CHECK-LABEL: fail
9 %1 = icmp ult i64 %a, %b
10 br i1 %1, label %fail, label %success, !prof !0
11
12fail:
13 ret i64 -1
14
15success:
16 ret i64 0
17}
18
19!0 = metadata !{metadata !"branch_weights", i32 0, i32 2147483647}