[clang] [AMDGPU][SPIR-V] Fix treating SPIR-V input as the wrong LLVM-IR (PR #202986)
Alex Voicu via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 12 07:31:47 PDT 2026
================
@@ -5385,22 +5385,20 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-emit-llvm-uselists");
if (IsUsingLTO) {
+ const Arg *LTOArg = Args.getLastArg(options::OPT_foffload_lto,
+ options::OPT_foffload_lto_EQ);
if (IsDeviceOffloadAction && !JA.isDeviceOffloading(Action::OFK_OpenMP) &&
!Args.hasFlag(options::OPT_offload_new_driver,
options::OPT_no_offload_new_driver,
C.getActiveOffloadKinds() != Action::OFK_None) &&
- !Triple.isAMDGPU()) {
+ !Triple.isAMDGPU() && !Triple.isSPIRV()) {
----------------
AlexVlx wrote:
Does vanilla SPIR-V work @sarnex? If not we'll have to gate on vendor == AMD for SPIRV
https://github.com/llvm/llvm-project/pull/202986
More information about the cfe-commits
mailing list