[PATCH] D146489: [X86] Create extra prolog/epilog for stack realignment [part 2]
LuoYuanke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 20 18:11:30 PDT 2023
LuoYuanke created this revision.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
LuoYuanke requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch is to support D145650 <https://reviews.llvm.org/D145650> for elf target as well.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146489
Files:
llvm/lib/Target/X86/X86ArgumentStackSlotRebase.cpp
llvm/test/CodeGen/X86/i386-baseptr.ll
Index: llvm/test/CodeGen/X86/i386-baseptr.ll
===================================================================
--- llvm/test/CodeGen/X86/i386-baseptr.ll
+++ llvm/test/CodeGen/X86/i386-baseptr.ll
@@ -1,5 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=i386-pc-linux -stackrealign < %s | FileCheck %s
+; RUN: llc -mtriple=i386-pc-none-elf -stackrealign < %s | FileCheck %s
declare i32 @helper() nounwind
define void @base() #0 {
Index: llvm/lib/Target/X86/X86ArgumentStackSlotRebase.cpp
===================================================================
--- llvm/lib/Target/X86/X86ArgumentStackSlotRebase.cpp
+++ llvm/lib/Target/X86/X86ArgumentStackSlotRebase.cpp
@@ -114,7 +114,7 @@
if (F.hasFnAttribute(Attribute::Naked))
return false;
// Only support Linux
- if (!STI.isTargetLinux())
+ if (!STI.isTargetLinux() && !STI.isTargetELF())
return false;
if (!TRI->hasBasePointer(MF))
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146489.506812.patch
Type: text/x-patch
Size: 987 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230321/fb734690/attachment.bin>
More information about the llvm-commits
mailing list