From 001cb43159f33146b0a605126663da71f4847b7d Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 4 Feb 2022 14:51:28 +0000 Subject: [PATCH] [AMDGPU] SILoadStoreOptimizer: fewer calls to offsetsCanBeCombined Only call offsetsCanBeCombined with Modify = true in cases where it will really do something. NFC. --- llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp index 42fc927..a297bbd 100644 --- a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp +++ b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp @@ -979,7 +979,7 @@ bool SILoadStoreOptimizer::checkAndPrepareMerge( // correct for the new instruction. This should return true, because // this function should only be called on CombineInfo objects that // have already been confirmed to be mergeable. - if (CI.InstClass != MIMG) + if (CI.InstClass == DS_READ || CI.InstClass == DS_WRITE) offsetsCanBeCombined(CI, *STM, Paired, true); return true; } -- 2.7.4