[llvm] 001cb43 - [AMDGPU] SILoadStoreOptimizer: fewer calls to offsetsCanBeCombined
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 4 06:53:00 PST 2022
Author: Jay Foad
Date: 2022-02-04T14:52:11Z
New Revision: 001cb43159f33146b0a605126663da71f4847b7d
URL: https://github.com/llvm/llvm-project/commit/001cb43159f33146b0a605126663da71f4847b7d
DIFF: https://github.com/llvm/llvm-project/commit/001cb43159f33146b0a605126663da71f4847b7d.diff
LOG: [AMDGPU] SILoadStoreOptimizer: fewer calls to offsetsCanBeCombined
Only call offsetsCanBeCombined with Modify = true in cases
where it will really do something. NFC.
Added:
Modified:
llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
index 42fc927c7c27..a297bbd9a0e2 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;
}
More information about the llvm-commits
mailing list