ac/llvm: fix AC_TM_CHECK_IR

This was using the wrong pass.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Fixes: 3f272fd15e ("ac/llvm: fix build with LLVM 17")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24140>
(cherry picked from commit 85d1159a2a)
This commit is contained in:
Rhys Perry 2023-07-13 14:25:04 +01:00 committed by Eric Engestrom
parent 627e9cd551
commit 70328a0a8a
2 changed files with 3 additions and 2 deletions

View file

@ -5908,7 +5908,7 @@
"description": "ac/llvm: fix AC_TM_CHECK_IR",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "3f272fd15e9f0776056699e90ce021f4766d3384"
},

View file

@ -27,6 +27,7 @@
#include <llvm/Analysis/TargetLibraryInfo.h>
#include <llvm/IR/IRBuilder.h>
#include <llvm/IR/LegacyPassManager.h>
#include <llvm/IR/Verifier.h>
#include <llvm/Target/TargetMachine.h>
#include <llvm/MC/MCSubtargetInfo.h>
#include <llvm/Support/CommandLine.h>
@ -307,7 +308,7 @@ LLVMPassManagerRef ac_create_passmgr(LLVMTargetLibraryInfoRef target_library_inf
LLVMAddTargetLibraryInfo(target_library_info, passmgr);
if (check_ir)
unwrap(passmgr)->add(createMachineVerifierPass("mesa ir"));
unwrap(passmgr)->add(createVerifierPass());
unwrap(passmgr)->add(createAlwaysInlinerLegacyPass());