xref: /llvm-project/llvm/test/CodeGen/AArch64/machine-outliner-mapper-debug-output.mir (revision d1359acb9a4adba2dc872be017eab09a6a88058c)
1# RUN: llc -mtriple=aarch64 -debug-only=machine-outliner -run-pass=machine-outliner -verify-machineinstrs %s -o /dev/null 2>&1 | FileCheck %s
2# REQUIRES: asserts
3
4# CHECK-LABEL: *** Populating mapper ***
5# CHECK-NEXT: MAPPING FUNCTION: block_too_small
6# CHECK-NEXT:   MAPPING MBB: ''
7# CHECK-NEXT:     SKIP: MBB size less than minimum size of 2
8# CHECK-NEXT: MAPPING FUNCTION: no_outline
9# CHECK-NEXT: SKIP: Function has nooutline attribute
10# CHECK-NEXT: MAPPING FUNCTION: redzone
11# CHECK-NEXT: SKIP: redzone: unsafe to outline from
12# CHECK-NEXT: MAPPING FUNCTION: no_mf
13# CHECK-NEXT: SKIP: Function does not have a MachineFunction
14# CHECK-NEXT: MAPPING FUNCTION: block_addr_fn
15# CHECK-NEXT:   MAPPING MBB: 'label'
16# CHECK-NEXT:     SKIP: MBB's address is taken
17
18--- |
19  define void @block_too_small() noredzone { unreachable }
20  define void @no_outline() noredzone "nooutline" { unreachable }
21  define void @redzone() { unreachable }
22  declare void @no_mf()
23  define void @block_addr_fn() noredzone {
24  entry:
25    br label %label
26  label:
27    call void @block_addr_fn(ptr blockaddress(@block_addr_fn, %label))
28    ret void
29  }
30...
31---
32name:            no_outline
33tracksRegLiveness: true
34body:             |
35  bb.0:
36    liveins: $w0, $lr, $w8
37    RET undef $lr
38...
39---
40name:            block_too_small
41tracksRegLiveness: true
42body:             |
43  bb.0:
44    liveins: $w0, $lr, $w8
45    RET undef $lr
46...
47---
48name:            block_addr_fn
49tracksRegLiveness: true
50body:             |
51  bb.0.label (ir-block-address-taken %ir-block.label):
52    liveins: $w0, $lr, $w8
53    $w0 = ORRWri $wzr, 1
54    $w0 = ORRWri $wzr, 1
55    $w0 = ORRWri $wzr, 4
56    RET undef $lr
57...
58---
59