From 328ac4736166053811df917d721350e3dfe3f1e2 Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Tue, 7 Oct 2025 22:56:43 -0400 Subject: [PATCH] AMDGPU: skip AMDGPUAttributor pass on R600 some more. This is a follow-up for #162207, where I neglected to skip the second use of AMDGPUAttributor for R600 targets. This use is covered by the test lld/test/ELF/lto/r600.ll. --- llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp index 723d07e8ea079..4f7df70f41050 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp @@ -966,7 +966,7 @@ void AMDGPUTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) { PM.addPass(InternalizePass(mustPreserveGV)); PM.addPass(GlobalDCEPass()); } - if (EnableAMDGPUAttributor) { + if (EnableAMDGPUAttributor && getTargetTriple().isAMDGCN()) { AMDGPUAttributorOptions Opt; if (HasClosedWorldAssumption) Opt.IsClosedWorld = true;