1 # RUN: llc -mtriple=aarch64--- -run-pass=machine-outliner \
2 # RUN: -verify-machineinstrs %s -o - | FileCheck %s
4 # Ensure that we never outline calls into sequences where unsafe stack
5 # instructions are present.
8 define void @foo() #0 { ret void }
9 define void @bar() #0 { ret void }
10 define void @baz() #0 { ret void }
11 define void @f1() #0 { ret void }
12 define void @f2() #0 { ret void }
13 attributes #0 = { minsize noinline noredzone "frame-pointer"="all" }
18 tracksRegLiveness: true
22 ; CHECK-LABEL: name: f1
27 BL @foo, implicit-def dead $lr, implicit $sp
28 $x20, $x19 = LDPXi $sp, 63
29 $x20, $x19 = LDPXi $sp, 63
30 $x20, $x19 = LDPXi $sp, 63
31 $x20, $x19 = LDPXi $sp, 63
33 BL @bar, implicit-def dead $lr, implicit $sp
34 $x11 = ADDXri $sp, 48, 0;
35 $x12 = ADDXri $sp, 48, 0;
36 $x13 = ADDXri $sp, 48, 0;
37 $x14 = ADDXri $sp, 48, 0;
39 BL @baz, implicit-def dead $lr, implicit $sp
40 $x0 = ADDXri $sp, 48, 0;
41 $x1 = ADDXri $sp, 48, 0;
48 tracksRegLiveness: true
52 ; CHECK-LABEL: name: f2
57 BL @foo, implicit-def dead $lr, implicit $sp
58 $x20, $x19 = LDPXi $sp, 63
59 $x20, $x19 = LDPXi $sp, 63
60 $x20, $x19 = LDPXi $sp, 63
61 $x20, $x19 = LDPXi $sp, 63
63 BL @bar, implicit-def dead $lr, implicit $sp
64 $x11 = ADDXri $sp, 48, 0;
65 $x12 = ADDXri $sp, 48, 0;
66 $x13 = ADDXri $sp, 48, 0;
67 $x14 = ADDXri $sp, 48, 0;
69 BL @baz, implicit-def dead $lr, implicit $sp
70 $x0 = ADDXri $sp, 48, 0;
71 $x1 = ADDXri $sp, 48, 0;