179 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc -mtriple aarch64-arm-linux-gnu --enable-machine-outliner -outliner-leaf-descendants=false \3; RUN: -verify-machineinstrs %s -o - | FileCheck --check-prefixes CHECK,V8A %s4; RUN: llc -mtriple aarch64 -enable-machine-outliner -outliner-leaf-descendants=false \5; RUN: -verify-machineinstrs -mattr=+v8.3a %s -o - | \6; RUN: FileCheck %s --check-prefixes CHECK,V83A7 8declare i32 @thunk_called_fn(i32, i32, i32, i32)9 10define i32 @a() #0 {11; V8A-LABEL: a:12; V8A: // %bb.0: // %entry13; V8A-NEXT: hint #2514; V8A-NEXT: .cfi_negate_ra_state15; V8A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill16; V8A-NEXT: .cfi_def_cfa_offset 1617; V8A-NEXT: .cfi_offset w30, -1618; V8A-NEXT: mov w0, #1 // =0x119; V8A-NEXT: mov w1, #2 // =0x220; V8A-NEXT: mov w2, #3 // =0x321; V8A-NEXT: mov w3, #4 // =0x422; V8A-NEXT: bl thunk_called_fn23; V8A-NEXT: add w0, w0, #824; V8A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload25; V8A-NEXT: hint #2926; V8A-NEXT: ret27;28; V83A-LABEL: a:29; V83A: // %bb.0: // %entry30; V83A-NEXT: paciasp31; V83A-NEXT: .cfi_negate_ra_state32; V83A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill33; V83A-NEXT: .cfi_def_cfa_offset 1634; V83A-NEXT: .cfi_offset w30, -1635; V83A-NEXT: mov w0, #1 // =0x136; V83A-NEXT: mov w1, #2 // =0x237; V83A-NEXT: mov w2, #3 // =0x338; V83A-NEXT: mov w3, #4 // =0x439; V83A-NEXT: bl thunk_called_fn40; V83A-NEXT: add w0, w0, #841; V83A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload42; V83A-NEXT: retaa43entry:44 %call = tail call i32 @thunk_called_fn(i32 1, i32 2, i32 3, i32 4)45 %cx = add i32 %call, 846 ret i32 %cx47}48 49define i32 @b() #0 {50; V8A-LABEL: b:51; V8A: // %bb.0: // %entry52; V8A-NEXT: hint #2553; V8A-NEXT: .cfi_negate_ra_state54; V8A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill55; V8A-NEXT: .cfi_def_cfa_offset 1656; V8A-NEXT: .cfi_offset w30, -1657; V8A-NEXT: mov w0, #1 // =0x158; V8A-NEXT: mov w1, #2 // =0x259; V8A-NEXT: mov w2, #3 // =0x360; V8A-NEXT: mov w3, #4 // =0x461; V8A-NEXT: bl thunk_called_fn62; V8A-NEXT: add w0, w0, #8863; V8A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload64; V8A-NEXT: hint #2965; V8A-NEXT: ret66;67; V83A-LABEL: b:68; V83A: // %bb.0: // %entry69; V83A-NEXT: paciasp70; V83A-NEXT: .cfi_negate_ra_state71; V83A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill72; V83A-NEXT: .cfi_def_cfa_offset 1673; V83A-NEXT: .cfi_offset w30, -1674; V83A-NEXT: mov w0, #1 // =0x175; V83A-NEXT: mov w1, #2 // =0x276; V83A-NEXT: mov w2, #3 // =0x377; V83A-NEXT: mov w3, #4 // =0x478; V83A-NEXT: bl thunk_called_fn79; V83A-NEXT: add w0, w0, #8880; V83A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload81; V83A-NEXT: retaa82entry:83 %call = tail call i32 @thunk_called_fn(i32 1, i32 2, i32 3, i32 4)84 %cx = add i32 %call, 8885 ret i32 %cx86}87 88define hidden i32 @c(ptr %fptr) #0 {89; V8A-LABEL: c:90; V8A: // %bb.0: // %entry91; V8A-NEXT: hint #2592; V8A-NEXT: .cfi_negate_ra_state93; V8A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill94; V8A-NEXT: .cfi_def_cfa_offset 1695; V8A-NEXT: .cfi_offset w30, -1696; V8A-NEXT: mov x8, x097; V8A-NEXT: mov w0, #1 // =0x198; V8A-NEXT: mov w1, #2 // =0x299; V8A-NEXT: mov w2, #3 // =0x3100; V8A-NEXT: mov w3, #4 // =0x4101; V8A-NEXT: blr x8102; V8A-NEXT: add w0, w0, #8103; V8A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload104; V8A-NEXT: hint #29105; V8A-NEXT: ret106;107; V83A-LABEL: c:108; V83A: // %bb.0: // %entry109; V83A-NEXT: paciasp110; V83A-NEXT: .cfi_negate_ra_state111; V83A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill112; V83A-NEXT: .cfi_def_cfa_offset 16113; V83A-NEXT: .cfi_offset w30, -16114; V83A-NEXT: mov x8, x0115; V83A-NEXT: mov w0, #1 // =0x1116; V83A-NEXT: mov w1, #2 // =0x2117; V83A-NEXT: mov w2, #3 // =0x3118; V83A-NEXT: mov w3, #4 // =0x4119; V83A-NEXT: blr x8120; V83A-NEXT: add w0, w0, #8121; V83A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload122; V83A-NEXT: retaa123entry:124 %call = tail call i32 %fptr(i32 1, i32 2, i32 3, i32 4)125 %add = add nsw i32 %call, 8126 ret i32 %add127}128 129define hidden i32 @d(ptr %fptr) #0 {130; V8A-LABEL: d:131; V8A: // %bb.0: // %entry132; V8A-NEXT: hint #25133; V8A-NEXT: .cfi_negate_ra_state134; V8A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill135; V8A-NEXT: .cfi_def_cfa_offset 16136; V8A-NEXT: .cfi_offset w30, -16137; V8A-NEXT: mov x8, x0138; V8A-NEXT: mov w0, #1 // =0x1139; V8A-NEXT: mov w1, #2 // =0x2140; V8A-NEXT: mov w2, #3 // =0x3141; V8A-NEXT: mov w3, #4 // =0x4142; V8A-NEXT: blr x8143; V8A-NEXT: add w0, w0, #88144; V8A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload145; V8A-NEXT: hint #29146; V8A-NEXT: ret147;148; V83A-LABEL: d:149; V83A: // %bb.0: // %entry150; V83A-NEXT: paciasp151; V83A-NEXT: .cfi_negate_ra_state152; V83A-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill153; V83A-NEXT: .cfi_def_cfa_offset 16154; V83A-NEXT: .cfi_offset w30, -16155; V83A-NEXT: mov x8, x0156; V83A-NEXT: mov w0, #1 // =0x1157; V83A-NEXT: mov w1, #2 // =0x2158; V83A-NEXT: mov w2, #3 // =0x3159; V83A-NEXT: mov w3, #4 // =0x4160; V83A-NEXT: blr x8161; V83A-NEXT: add w0, w0, #88162; V83A-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload163; V83A-NEXT: retaa164entry:165 %call = tail call i32 %fptr(i32 1, i32 2, i32 3, i32 4)166 %add = add nsw i32 %call, 88167 ret i32 %add168}169 170attributes #0 = { "sign-return-address"="non-leaf" minsize }171 172; CHECK-NOT: OUTLINED_FUNCTION_{{.*}}173; CHECK-NOT: .cfi_b_key_frame174; CHECK-NOT: paci{{[a,b]}}sp175; CHECK-NOT: hint #2{{[5,7]}}176; CHECK-NOT: .cfi_negate_ra_state177; CHECK-NOT: auti{{[a,b]}}sp178; CHECK-NOT: hint #{{[29,31]}}179