From 3e2d4e85d34705466fe0c8c370b2481d65587fc4 Mon Sep 17 00:00:00 2001 From: "Luo, Yuanke" Date: Tue, 21 Mar 2023 20:12:35 +0800 Subject: [PATCH] Revert "[X86] Create extra prolog/epilog for stack realignment [part 2]" This reverts commit 614c63bec6d67cbfdc17b50e443ff769a28c18d0. --- llvm/lib/Target/X86/X86ArgumentStackSlotRebase.cpp | 2 +- llvm/test/CodeGen/X86/i386-baseptr.ll | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/Target/X86/X86ArgumentStackSlotRebase.cpp b/llvm/lib/Target/X86/X86ArgumentStackSlotRebase.cpp index bf6079123431..ef3751e40f17 100644 --- a/llvm/lib/Target/X86/X86ArgumentStackSlotRebase.cpp +++ b/llvm/lib/Target/X86/X86ArgumentStackSlotRebase.cpp @@ -114,7 +114,7 @@ bool X86ArgumentStackSlotPass::runOnMachineFunction(MachineFunction &MF) { if (F.hasFnAttribute(Attribute::Naked)) return false; // Only support Linux - if (!STI.isTargetLinux() && !STI.isTargetELF()) + if (!STI.isTargetLinux()) return false; if (!TRI->hasBasePointer(MF)) return false; diff --git a/llvm/test/CodeGen/X86/i386-baseptr.ll b/llvm/test/CodeGen/X86/i386-baseptr.ll index df921f2738ff..cb8d849a8684 100644 --- a/llvm/test/CodeGen/X86/i386-baseptr.ll +++ b/llvm/test/CodeGen/X86/i386-baseptr.ll @@ -1,6 +1,5 @@ ; 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 {