52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
# TODO(boomanaiden154): Remove this and use gc-empty-basic-blocks.ll directly.
|
|
# This should be trivial once we have an asm printer setup for X86 and at least
|
|
# a pipeline skeleton.
|
|
# RUN: llc %s -mtriple=x86_64 -passes=gc-empty-basic-blocks -o - | FileCheck %s
|
|
--- |
|
|
define void @foo(i1 zeroext %0) #0 {
|
|
br i1 %0, label %2, label %empty_block
|
|
|
|
2: ; preds = %1
|
|
%3 = call i32 @baz()
|
|
br label %4
|
|
|
|
empty_block: ; preds = %1
|
|
unreachable
|
|
|
|
4: ; preds = %2
|
|
ret void
|
|
}
|
|
|
|
declare i32 @baz()
|
|
|
|
attributes #0 = { nounwind }
|
|
...
|
|
---
|
|
name: foo
|
|
alignment: 16
|
|
body: |
|
|
bb.0:
|
|
successors: %bb.1(0x40000000), %bb.2(0x40000000)
|
|
liveins: $edi
|
|
|
|
frame-setup PUSH64r undef $rax, implicit-def $rsp, implicit $rsp
|
|
$al = MOV8rr $dil, implicit killed $edi
|
|
TEST8ri killed renamable $al, 1, implicit-def $eflags
|
|
JCC_1 %bb.1, 5, implicit killed $eflags
|
|
JMP_1 %bb.2
|
|
|
|
bb.1:
|
|
successors: %bb.3(0x80000000)
|
|
|
|
CALL64pcrel32 target-flags(x86-plt) @baz, csr_64, implicit $rsp, implicit $ssp, implicit-def $eax
|
|
JMP_1 %bb.3
|
|
|
|
bb.2.empty_block:
|
|
successors:
|
|
|
|
bb.3:
|
|
$rax = frame-destroy POP64r implicit-def $rsp, implicit $rsp
|
|
RET64
|
|
...
|
|
# CHECK-NOT: bb.2.empty_block:
|