brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · 9ea516f Raw
68 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc %s -mtriple=aarch64 -o - | FileCheck %s --check-prefixes=CHECK,SDAG3; RUN: llc %s -mtriple=aarch64 -global-isel -o - | FileCheck %s --check-prefixes=CHECK,GI4 5; Tail calls which have stack arguments in the same offsets as the caller do not6; need to load and store the arguments from the stack.7 8declare void @func(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, i32 %i, i32 %j)9 10define void @wrapper_func(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, i32 %i, i32 %j) {11; CHECK-LABEL: wrapper_func:12; CHECK:       // %bb.0:13; CHECK-NEXT:    b func14 15  tail call void @func(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, i32 %i, i32 %j)16  ret void17}18 19define void @wrapper_func_zero_arg(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, i32 %i, i32 %j) {20; CHECK-LABEL: wrapper_func_zero_arg:21; CHECK:       // %bb.0:22; CHECK-NEXT:    str wzr, [sp, #8]23; CHECK-NEXT:    b func24  tail call void @func(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, i32 %i, i32 0)25  ret void26}27 28define void @wrapper_func_overriden_arg(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, i32 %i, i32 %j) {29; CHECK-LABEL: wrapper_func_overriden_arg:30; CHECK:       // %bb.0:31; CHECK-NEXT:    ldr w8, [sp]32; CHECK-NEXT:    str wzr, [sp]33; CHECK-NEXT:    str w8, [sp, #8]34; CHECK-NEXT:    b func35  tail call void @func(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, i32 0, i32 %i)36  ret void37}38 39declare void @func_i1(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, i32 %i, i1 %j)40 41; FIXME: Support i1 passthrough stack arguments in GlobalISel.42define void @wrapper_func_i1(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, i32 %i, i1 %j) {43; SDAG-LABEL: wrapper_func_i1:44; SDAG:       // %bb.0:45; SDAG-NEXT:    b func_i146;47; GI-LABEL: wrapper_func_i1:48; GI:       // %bb.0:49; GI-NEXT:    ldrb w8, [sp, #8]50; GI-NEXT:    strb w8, [sp, #8]51; GI-NEXT:    b func_i152  tail call void @func_i1(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, i32 %i, i1 %j)53  ret void54}55 56declare void @func_signext_i1(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, i32 %i, i1 signext %j)57 58; FIXME: Support zero/sign-extended stack arguments.59define void @wrapper_func_i8(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, i32 %i, i1 signext %j) {60; CHECK-LABEL: wrapper_func_i8:61; CHECK:       // %bb.0:62; CHECK-NEXT:    ldrsb w8, [sp, #8]63; CHECK-NEXT:    strb w8, [sp, #8]64; CHECK-NEXT:    b func_signext_i165  tail call void @func_signext_i1(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, i32 %i, i1 signext %j)66  ret void67}68