SHA256
1
0
forked from pool/llvm14

- Drop llvm-rust-mangle-for-fastcall.patch again: it's already

backported in upstream, somehow I missed that.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm14?expand=0&rev=8
This commit is contained in:
Aaron Puchert 2022-04-12 21:02:23 +00:00 committed by Git OBS Bridge
parent 45602e73a0
commit 9ac6309fc4
3 changed files with 0 additions and 49 deletions

View File

@ -1,41 +0,0 @@
From 54b909de682bfa4e3389b680b0916ab18c99952a Mon Sep 17 00:00:00 2001
From: Amanieu d'Antras <amanieu@gmail.com>
Date: Fri, 25 Feb 2022 22:06:47 +0000
Subject: [PATCH] [Mangler] Mangle aliases to fastcall/vectorcall functions
correctly
These aliases are produced by MergeFunctions and need to be mangled according to the calling convention of the function they are pointing to instead of defaulting to the C calling convention.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D120382
---
llvm/lib/IR/Mangler.cpp | 2 +-
llvm/test/CodeGen/X86/fastcall-correct-mangling.ll | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/llvm/lib/IR/Mangler.cpp b/llvm/lib/IR/Mangler.cpp
index 2399ea27ee9d4..b8e3e40e4c1d5 100644
--- a/llvm/lib/IR/Mangler.cpp
+++ b/llvm/lib/IR/Mangler.cpp
@@ -144,7 +144,7 @@ void Mangler::getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV,
// Mangle functions with Microsoft calling conventions specially. Only do
// this mangling for x86_64 vectorcall and 32-bit x86.
- const Function *MSFunc = dyn_cast<Function>(GV);
+ const Function *MSFunc = dyn_cast_or_null<Function>(GV->getAliaseeObject());
// Don't add byte count suffixes when '\01' or '?' are in the first
// character.
diff --git a/llvm/test/CodeGen/X86/fastcall-correct-mangling.ll b/llvm/test/CodeGen/X86/fastcall-correct-mangling.ll
index 00dc44e75e8f5..dd8ce0f0ef505 100644
--- a/llvm/test/CodeGen/X86/fastcall-correct-mangling.ll
+++ b/llvm/test/CodeGen/X86/fastcall-correct-mangling.ll
@@ -31,3 +31,7 @@ define private x86_fastcallcc void @dontCrash() {
; CHECK64-LABEL: {{^}}.LdontCrash:
ret void
}
+
+@alias = alias void(i64, i8, i8, i16), void(i64, i8, i8, i16)* @func
+; CHECK32-LABEL: {{^}}.set @alias@20, @func@20
+; CHECK64-LABEL: {{^}}.set alias, func

View File

@ -58,11 +58,6 @@ Sun Apr 3 13:42:27 UTC 2022 - Aaron Puchert <aaronpuchert@alice-dsl.net>
- Consistently set host triple as *-suse-linux-gnu*.
- Only suggest documentation packages.
-------------------------------------------------------------------
Wed Mar 9 17:53:48 UTC 2022 - Dirk Müller <dmueller@suse.com>
- Add llvm-rust-mangle-for-fastcall.patch for rust 1.59.
-------------------------------------------------------------------
Sun Mar 6 21:24:55 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@ -127,8 +127,6 @@ Source100: %{name}-rpmlintrc
Source101: baselibs.conf
# PATCH-FIX-OPENSUSE lto-disable-cache.patch -- Disable ThinLTO cache
Patch0: lto-disable-cache.patch
# PATCH-FIX-UPSTREAM https://github.com/llvm/llvm-project/commit/54b909de682bfa4e3389b680b0916ab18c99952a.
Patch1: llvm-rust-mangle-for-fastcall.patch
# PATCH-FIX-OPENSUSE assume-opensuse.patch idoenmez@suse.de -- Always enable openSUSE/SUSE features
Patch2: assume-opensuse.patch
# PATCH-FIX-OPENSUSE default-to-i586.patch -- Use i586 as default target for 32bit
@ -575,7 +573,6 @@ This package contains the development files for Polly.
%prep
%setup -q -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -b 50 -b 51 -n llvm-%{_version}.src
%patch0 -p2
%patch1 -p2
%patch5 -p1
%patch13 -p1
%patch14 -p1