#46 Backport fix for LLVM 18 assertion failure (rhbz#2268800)
Merged 2 months ago by jexposit. Opened 2 months ago by nikic.
rpms/ nikic/mesa llvm-18-backport  into  rawhide

@@ -0,0 +1,40 @@ 

+ From f4a3905c37c0e299fb3bd48120e46e1f7817c90e Mon Sep 17 00:00:00 2001

+ From: Nikita Popov <npopov@redhat.com>

+ Date: Mon, 11 Mar 2024 14:45:41 +0100

+ Subject: [PATCH] Pass no-verify-fixpoint option to instcombine in LLVM 18

+ 

+ When LLVM 18 is used, pass the no-verify-fixpoint option when

+ running the instcombine pass. Otherwise LLVM may abort with an

+ error.

+ 

+ The background here is that this option is enabled by default for

+ testing purposes, because instcombine is normally only explicitly

+ invoked like this inside tests. If it is used in an actual

+ production pipeline, the no-verify-fixpoint option needs to be

+ enabled.

+ 

+ This should fix the issue reported at

+ https://bugzilla.redhat.com/show_bug.cgi?id=2268800.

+ ---

+  src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 ++++

+  1 file changed, 4 insertions(+)

+ 

+ diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c

+ index cd2108f3a08..1345d85b224 100644

+ --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c

+ +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c

+ @@ -609,7 +609,11 @@ gallivm_compile_module(struct gallivm_state *gallivm)

+     LLVMRunPasses(gallivm->module, passes, LLVMGetExecutionEngineTargetMachine(gallivm->engine), opts);

+  

+     if (!(gallivm_perf & GALLIVM_PERF_NO_OPT))

+ +#if LLVM_VERSION_MAJOR >= 18

+ +      strcpy(passes, "sroa,early-cse,simplifycfg,reassociate,mem2reg,instsimplify,instcombine<no-verify-fixpoint>");

+ +#else

+        strcpy(passes, "sroa,early-cse,simplifycfg,reassociate,mem2reg,instsimplify,instcombine");

+ +#endif

+     else

+        strcpy(passes, "mem2reg");

+  

+ -- 

+ 2.43.0

+ 

file modified
+4
@@ -76,6 +76,10 @@ 

  

  Patch10:        gnome-shell-glthread-disable.patch

  

+ # Backport of https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28101

+ # to fix LLVM 18 compatibility (https://bugzilla.redhat.com/show_bug.cgi?id=2268800).

+ Patch20:        0001-Pass-no-verify-fixpoint-option-to-instcombine-in-LLV.patch

+ 

  BuildRequires:  meson >= 1.3.0

  BuildRequires:  gcc

  BuildRequires:  gcc-c++

Backport of the pending fix at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28101 to fix an assertion failure with LLVM 18 affecting openQA tests: https://bugzilla.redhat.com/show_bug.cgi?id=2268800.

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/1d0963315e0f4fc295c9e8ea1acf1206

Pull-Request has been merged by jexposit

2 months ago