mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
43dacf8f39
Do not create CALLSEQ_START/CALLSEQ_END when there is no callframe to setup and the callframe size is 0. - Fixes an invalid callframe nesting for byval arguments, which would look like this before this patch (as in `big-byval.ll`): ... ADJCALLSTACKDOWN 32768, 0, ... # Setup for extfunc ... ADJCALLSTACKDOWN 0, 0, ... # setup for memcpy ... BL &memcpy ... ADJCALLSTACKUP 0, 0, ... # destroy for memcpy ... BL &extfunc ADJCALLSTACKUP 32768, 0, ... # destroy for extfunc - Saves us two instructions in the common case of zero-sized stackframes. - Remove an unnecessary scheduling barrier (hence the small unittest changes). Differential Revision: https://reviews.llvm.org/D42006 llvm-svn: 322917
14 lines
417 B
LLVM
14 lines
417 B
LLVM
; RUN: llc -o - %s -verify-machineinstrs | FileCheck %s
|
|
target triple = "aarch64--"
|
|
|
|
; Make sure we don't fail machine verification because the memcpy callframe
|
|
; setup is nested inside the extfunc callframe setup.
|
|
; CHECK-LABEL: func:
|
|
; CHECK: bl memcpy
|
|
; CHECK: bl extfunc
|
|
declare void @extfunc([4096 x i64]* byval %p)
|
|
define void @func([4096 x i64]* %z) {
|
|
call void @extfunc([4096 x i64]* byval %z)
|
|
ret void
|
|
}
|