2016-07-16 10:24:59 +08:00
|
|
|
# RUN: llc -march=x86-64 -run-pass none -o - %s | FileCheck %s
|
2015-07-31 00:54:38 +08:00
|
|
|
# This test ensures that the MIR parser parses basic block successors and
|
2015-12-01 13:29:22 +08:00
|
|
|
# probabilities correctly.
|
2015-07-31 00:54:38 +08:00
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
|
define i32 @foo(i32 %a) {
|
|
|
|
entry:
|
|
|
|
%0 = icmp sle i32 %a, 10
|
|
|
|
br i1 %0, label %less, label %exit
|
|
|
|
|
|
|
|
less:
|
|
|
|
ret i32 0
|
|
|
|
|
|
|
|
exit:
|
|
|
|
ret i32 %a
|
|
|
|
}
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: foo
|
2015-08-14 07:10:16 +08:00
|
|
|
body: |
|
|
|
|
; CHECK-LABEL: bb.0.entry:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: successors: %bb.1(0x2a3d70a4), %bb.2(0x55c28f5c)
|
2015-08-14 07:10:16 +08:00
|
|
|
; CHECK-LABEL: bb.1.less:
|
|
|
|
bb.0.entry:
|
2017-12-05 01:18:51 +08:00
|
|
|
successors: %bb.1 (33), %bb.2(67)
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $edi
|
2015-08-14 07:10:16 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
CMP32ri8 $edi, 10, implicit-def $eflags
|
|
|
|
JG_1 %bb.2, implicit killed $eflags
|
2015-08-14 07:10:16 +08:00
|
|
|
|
|
|
|
bb.1.less:
|
2018-02-01 06:04:26 +08:00
|
|
|
$eax = MOV32r0 implicit-def dead $eflags
|
|
|
|
RETQ killed $eax
|
2015-08-14 07:10:16 +08:00
|
|
|
|
|
|
|
bb.2.exit:
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $edi
|
2015-08-14 07:10:16 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$eax = COPY killed $edi
|
|
|
|
RETQ killed $eax
|
2015-07-31 00:54:38 +08:00
|
|
|
...
|