1 ; RUN: llc -verify-machineinstrs -enable-machine-outliner -aarch64-load-store-renaming=true -mtriple=aarch64-apple-darwin < %s | FileCheck %s
2 ; RUN: llc -verify-machineinstrs -enable-machine-outliner -aarch64-load-store-renaming=true -mtriple=aarch64-apple-darwin -mcpu=cortex-a53 -enable-misched=false < %s | FileCheck %s
3 ; RUN: llc -verify-machineinstrs -enable-machine-outliner -enable-linkonceodr-outlining -mtriple=aarch64-apple-darwin < %s | FileCheck %s -check-prefix=ODR
4 ; RUN: llc -verify-machineinstrs -enable-machine-outliner -mtriple=aarch64-apple-darwin -stop-after=machine-outliner < %s | FileCheck %s -check-prefix=TARGET_FEATURES
6 ; Make sure that we inherit target features from functions and make sure we have
7 ; the right function attributes.
8 ; TARGET_FEATURES: define internal void @OUTLINED_FUNCTION_{{[0-9]+}}()
9 ; TARGET_FEATURES-SAME: #[[ATTR_NUM:[0-9]+]]
10 ; TARGET_FEATURES-DAG: attributes #[[ATTR_NUM]] = {
11 ; TARGET_FEATURES-SAME: minsize
12 ; TARGET_FEATURES-SAME: nounwind
13 ; TARGET_FEATURES-SAME: optsize
14 ; TARGET_FEATURES-SAME: "target-features"="+sse"
16 define linkonce_odr void @fish() #0 {
19 ; ODR: [[OUTLINED:OUTLINED_FUNCTION_[0-9]+]]
20 %1 = alloca i32, align 4
21 %2 = alloca i32, align 4
22 %3 = alloca i32, align 4
23 %4 = alloca i32, align 4
24 %5 = alloca i32, align 4
25 %6 = alloca i32, align 4
26 store i32 1, i32* %1, align 4
27 store i32 2, i32* %2, align 4
28 store i32 3, i32* %3, align 4
29 store i32 4, i32* %4, align 4
30 store i32 5, i32* %5, align 4
31 store i32 6, i32* %6, align 4
35 define void @turtle() section "TURTLE,turtle" {
36 ; CHECK-LABEL: _turtle:
39 %1 = alloca i32, align 4
40 %2 = alloca i32, align 4
41 %3 = alloca i32, align 4
42 %4 = alloca i32, align 4
43 %5 = alloca i32, align 4
44 %6 = alloca i32, align 4
45 store i32 1, i32* %1, align 4
46 store i32 2, i32* %2, align 4
47 store i32 3, i32* %3, align 4
48 store i32 4, i32* %4, align 4
49 store i32 5, i32* %5, align 4
50 store i32 6, i32* %6, align 4
54 define void @cat() #0 {
56 ; CHECK: [[OUTLINED:OUTLINED_FUNCTION_[0-9]+]]
58 %1 = alloca i32, align 4
59 %2 = alloca i32, align 4
60 %3 = alloca i32, align 4
61 %4 = alloca i32, align 4
62 %5 = alloca i32, align 4
63 %6 = alloca i32, align 4
64 store i32 1, i32* %1, align 4
65 store i32 2, i32* %2, align 4
66 store i32 3, i32* %3, align 4
67 store i32 4, i32* %4, align 4
68 store i32 5, i32* %5, align 4
69 store i32 6, i32* %6, align 4
73 define void @dog() #0 {
77 %1 = alloca i32, align 4
78 %2 = alloca i32, align 4
79 %3 = alloca i32, align 4
80 %4 = alloca i32, align 4
81 %5 = alloca i32, align 4
82 %6 = alloca i32, align 4
83 store i32 1, i32* %1, align 4
84 store i32 2, i32* %2, align 4
85 store i32 3, i32* %3, align 4
86 store i32 4, i32* %4, align 4
87 store i32 5, i32* %5, align 4
88 store i32 6, i32* %6, align 4
94 ; CHECK-NEXT: [[OUTLINED]]:
96 ; CHECK-DAG: mov w8, #2
97 ; CHECK-DAG: stp w8, w9, [sp, #24]
98 ; CHECK-DAG: mov w9, #3
99 ; CHECK-DAG: mov w8, #4
100 ; CHECK-DAG: stp w8, w9, [sp, #16]
101 ; CHECK-DAG: mov w9, #5
102 ; CHECK-DAG: mov w8, #6
103 ; CHECK-DAG: stp w8, w9, [sp, #8]
104 ; CHECK-DAG: add sp, sp, #32
107 attributes #0 = { nounwind noredzone "target-cpu"="cyclone" "target-features"="+sse" }