[PATCH] D80715: [ARM] prologue instructions emitted for naked function with >64 byte argument
Simon Wallis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 03:48:49 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4dba59689d00: [ARM] prologue instructions emitted for naked function with >64 byte argument (authored by simonwallis2).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80715/new/
https://reviews.llvm.org/D80715
Files:
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/test/CodeGen/ARM/naked-no-prolog.ll
Index: llvm/test/CodeGen/ARM/naked-no-prolog.ll
===================================================================
--- /dev/null
+++ llvm/test/CodeGen/ARM/naked-no-prolog.ll
@@ -0,0 +1,13 @@
+; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a7 -verify-machineinstrs %s -o - | FileCheck %s
+
+%struct.S = type { [65 x i8] }
+
+define void @naked_no_prologue(%struct.S* byval(%struct.S) align 4 %0) naked noinline nounwind optnone {
+; CHECK-NOT: stm
+; CHECK-NOT: str
+
+entry:
+ ret void
+ unreachable
+}
+
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -9607,6 +9607,10 @@
const DataLayout &DL = DAG.getDataLayout();
SmallVector<ISD::InputArg, 16> Ins;
+ // In Naked functions we aren't going to save any registers.
+ if (F.hasFnAttribute(Attribute::Naked))
+ return;
+
if (!FuncInfo->CanLowerReturn) {
// Put in an sret pointer parameter before all the other parameters.
SmallVector<EVT, 1> ValueVTs;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80715.269483.patch
Type: text/x-patch
Size: 1126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200609/9502dcf7/attachment.bin>
More information about the llvm-commits
mailing list