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"); +#else strcpy(passes, "sroa,early-cse,simplifycfg,reassociate,mem2reg,instsimplify,instcombine"); +#endif else strcpy(passes, "mem2reg");