1 # RUN: llc -mtriple=aarch64-apple-darwin -run-pass=prologepilog \
2 # RUN: -run-pass=machine-outliner %s -pass-remarks-analysis='size-info' \
3 # RUN: -pass-remarks-output=%t.yaml -o /dev/null < %s 2> %t; \
4 # RUN: cat %t %t.yaml | FileCheck %s
6 # Ensure that the MachineOutliner produces codegen size remarks. Make sure...
7 # - Functions that are outlined from shrink in the remark (foo)
8 # - Outlined functions start with 0 instructions
9 # - Outlined functions end with the same number of instructions as the delta
11 # CHECK: remark: <unknown>:0:0: Machine Outliner: Function: foo:
12 # CHECK-SAME: MI instruction count changed from
13 # CHECK-SAME: [[FOO1:[1-9][0-9]*]] to [[FOO2:[1-9][0-9]*]];
14 # CHECK-SAME: Delta: [[FOODELTA:-?[1-9][0-9]*]]
15 # CHECK-NEXT: remark: <unknown>:0:0: Machine Outliner:
16 # CHECK-SAME: Function: OUTLINED_FUNCTION_0: MI instruction count changed from
17 # CHECK-SAME: 0 to [[OFUNCSIZE:[1-9][0-9]*]]; Delta: [[OFUNCSIZE]]
18 # CHECK-DAG: - Pass: Machine Outliner
19 # CHECK-NEXT: - String: ': Function: '
20 # CHECK-NEXT: - Function: foo
21 # CHECK-NEXT: - String: ': MI instruction count changed from '
22 # CHECK-NEXT: - MIInstrsBefore: '[[FOO1]]'
23 # CHECK-NEXT: - String: ' to '
24 # CHECK-NEXT: - MIInstrsAfter: '[[FOO2]]'
25 # CHECK-NEXT: - String: '; Delta: '
26 # CHECK-NEXT: - Delta: '[[FOODELTA]]'
28 # CHECK-NEXT: --- !Analysis
29 # CHECK-NEXT: Pass: size-info
30 # CHECK-NEXT: Name: FunctionMISizeChange
31 # CHECK-NEXT: Function: OUTLINED_FUNCTION_0
33 # CHECK-NEXT: - Pass: Machine Outliner
34 # CHECK-NEXT: - String: ': Function: '
35 # CHECK-NEXT: - Function: OUTLINED_FUNCTION_0
36 # CHECK-NEXT: - String: ': MI instruction count changed from '
37 # CHECK-NEXT: - MIInstrsBefore: '0'
38 # CHECK-NEXT: - String: ' to '
39 # CHECK-NEXT: - MIInstrsAfter: '[[OFUNCSIZE]]'
40 # CHECK-NEXT: - String: '; Delta: '
41 # CHECK-NEXT: - Delta: '[[OFUNCSIZE]]'
45 define void @foo() #0 {
49 attributes #0 = { minsize noinline noredzone "no-frame-pointer-elim"="true" }
53 tracksRegLiveness: true