Update to LLVM 18.1.8

This commit is contained in:
Jesus Checa Hidalgo 2024-07-11 12:39:51 +02:00
parent ebe30abc30
commit 4120a277ba
3 changed files with 10 additions and 81 deletions

View file

@ -1,74 +0,0 @@
From 9d1f05a7b8537deb5f626cd1b7b26ef2678f4c8e Mon Sep 17 00:00:00 2001
From: Arthur Eubanks <aeubanks@google.com>
Date: Thu, 27 Jul 2023 13:27:58 -0700
Subject: [PATCH] [PEI] Don't zero out noreg operands
A tail call may have $noreg operands.
Fixes a crash.
Reviewed By: xgupta
Differential Revision: https://reviews.llvm.org/D156485
(cherry picked from commit f800c1f3b207e7bcdc8b4c7192928d9a078242a0)
---
llvm/lib/CodeGen/PrologEpilogInserter.cpp | 9 +++++++--
llvm/test/CodeGen/X86/zero-call-used-regs.ll | 14 ++++++++++++++
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index e323aaaeefaf..49047719fdaa 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
@@ -1285,6 +1285,8 @@ void PEI::insertZeroCallUsedRegs(MachineFunction &MF) {
continue;
MCRegister Reg = MO.getReg();
+ if (!Reg)
+ continue;
// This picks up sibling registers (e.q. %al -> %ah).
for (MCRegUnit Unit : TRI.regunits(Reg))
@@ -1308,8 +1310,11 @@ void PEI::insertZeroCallUsedRegs(MachineFunction &MF) {
if (!MO.isReg())
continue;
- for (const MCPhysReg &Reg :
- TRI.sub_and_superregs_inclusive(MO.getReg()))
+ MCRegister Reg = MO.getReg();
+ if (!Reg)
+ continue;
+
+ for (const MCPhysReg Reg : TRI.sub_and_superregs_inclusive(Reg))
RegsToZero.reset(Reg);
}
}
diff --git a/llvm/test/CodeGen/X86/zero-call-used-regs.ll b/llvm/test/CodeGen/X86/zero-call-used-regs.ll
index 63d51c916bb9..97ad5ce9c8cb 100644
--- a/llvm/test/CodeGen/X86/zero-call-used-regs.ll
+++ b/llvm/test/CodeGen/X86/zero-call-used-regs.ll
@@ -241,6 +241,20 @@ entry:
ret i32 %x
}
+define dso_local void @tailcall(ptr %p) local_unnamed_addr #0 "zero-call-used-regs"="used-gpr" {
+; I386-LABEL: tailcall:
+; I386: # %bb.0:
+; I386-NEXT: movl {{[0-9]+}}(%esp), %eax
+; I386-NEXT: jmpl *(%eax) # TAILCALL
+;
+; X86-64-LABEL: tailcall:
+; X86-64: # %bb.0:
+; X86-64-NEXT: jmpq *(%rdi) # TAILCALL
+ %c = load ptr, ptr %p
+ tail call void %c()
+ ret void
+}
+
; Don't emit zeroing registers in "main" function.
define dso_local i32 @main() local_unnamed_addr #1 {
; I386-LABEL: main:
--
2.43.0

View file

@ -36,7 +36,7 @@
%global maj_ver 18 %global maj_ver 18
%global min_ver 1 %global min_ver 1
%global patch_ver 7 %global patch_ver 8
#global rc_ver 4 #global rc_ver 4
%if %{with snapshot_build} %if %{with snapshot_build}
@ -598,6 +598,9 @@ fi
%changelog %changelog
* Thu Jul 11 2024 Jesus Checa Hidalgo <jchecahi@redhat.com> - 18.1.8-1
- Update to LLVM 18.1.8
* Fri Jun 07 2024 Tom Stellard <tstellar@redhat.com> - 18.1.7-1 * Fri Jun 07 2024 Tom Stellard <tstellar@redhat.com> - 18.1.7-1
- 18.1.7 Release - 18.1.7 Release

12
sources
View file

@ -1,6 +1,6 @@
SHA512 (llvm-18.1.7.src.tar.xz) = 5dcb87b30d865ceee3b3e48da170aef0b382ff9a90048cf2561ae7351c295fbbc1a805a9ec654449451b9bb4673d295f9692e38f08146bdba25076fdaa65e5fd SHA512 (cmake-18.1.8.src.tar.xz) = e02243b491f9e688db28d7b53270fcf87debf09d3c95b136a7c7b96e26890de68712c60a1e85f5a448a95ad8c81f2d8ae77047780822443bbe39f1a9e6211007
SHA512 (llvm-18.1.7.src.tar.xz.sig) = d484b53a88a0faa6980fde5b220c3fe6cc1a035f84022cae05890501955c91014c7daba19a23edee91bf59b03ece3b999db7409937d36b08c854fbb72c573e61 SHA512 (cmake-18.1.8.src.tar.xz.sig) = 99191e95130fe4363a8db8f411a0e61af0549ad182a1280f99f0dd3ee679a321b993d103c6915d535a55d9f8a4d7fea86b7fdcc77605e02150e8edf1e18dee57
SHA512 (cmake-18.1.7.src.tar.xz) = 2d8ec0e2ccf28bc9f64a17ba3f55071a05cf211164facc1516d1631da203e82bdb33bf184e5354fd6c010c116f298264b05b19df8148ea91899b799f789e20b5 SHA512 (llvm-18.1.8.src.tar.xz) = 930814730bb2d80cf7f7b2968f0f1f1442009ca62a7ca29992b69d63823270584b059d16aa845bb381411da566e7e4f255fcfbc38acbdf865eb0419b4dfd7459
SHA512 (cmake-18.1.7.src.tar.xz.sig) = 7f4b5f933d387fa9eb61e4ba299c4ddeb202c6ef52d13b4f50b93d04fd3c11a27c443ebcdf448910a28c1e82d03a57791a19334dfe2a39f23ffef835df0c54be SHA512 (llvm-18.1.8.src.tar.xz.sig) = aab7cb61a6b5dd3776a9b306d91d08763710725b72ba6a4263d3cca5ae5959e3b073b27dbfd95f9a53a78600c6f414e2fd1cc0dbe3176d7cf142996f7af700ca
SHA512 (third-party-18.1.7.src.tar.xz) = a59133f43a15b191eb43b3be974ccb34a0ee73a230d99bdf01918f8c196fdcc766a45eb112672e2ca88550e0c3e8a77ac250c7fa645936e57086c7dc9083aa7f SHA512 (third-party-18.1.8.src.tar.xz) = bedaa5d29ebeaf0ee1c700eb8492d0fef185e7c16528202927c81117d94fadd568829aa0e1873e1217e8e72866f3876a9681bbdb2a6a0a5466fc911f7b3620d4
SHA512 (third-party-18.1.7.src.tar.xz.sig) = 552ae1febb4f5814e3b71d442d07b70e59c80fa1110a5a3a3eef627218d02e1220ad9879c925b38196014fae68dbc04e53155bc637e9fbba5e06d18c9e615ba5 SHA512 (third-party-18.1.8.src.tar.xz.sig) = 32c4d779a56a3908b291a4f0cf1df72ccb86b55439ad66f9cbad1b48a77cb92b129b131806d2914d0e63cb319cde3181a2c03b75856ec36cee5f88120bb58214