[llvm] f5c178b - [LICM] Remove unnecessary condition (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 1 06:42:48 PDT 2022
Author: Nikita Popov
Date: 2022-09-01T15:42:35+02:00
New Revision: f5c178b6a41f3afcd195268a1a249c1c9fbea5a2
URL: https://github.com/llvm/llvm-project/commit/f5c178b6a41f3afcd195268a1a249c1c9fbea5a2
DIFF: https://github.com/llvm/llvm-project/commit/f5c178b6a41f3afcd195268a1a249c1c9fbea5a2.diff
LOG: [LICM] Remove unnecessary condition (NFC)
Added:
Modified:
llvm/lib/Transforms/Scalar/LICM.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index 41f562768e06..1fd66be06b5a 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -2038,13 +2038,10 @@ bool llvm::promoteLoopAccessesToScalars(
bool GuaranteedToExecute =
SafetyInfo->isGuaranteedToExecute(*UI, DT, CurLoop);
StoreIsGuanteedToExecute |= GuaranteedToExecute;
- if (!DereferenceableInPH || !SafeToInsertStore ||
- (InstAlignment > Alignment)) {
- if (GuaranteedToExecute) {
- DereferenceableInPH = true;
- SafeToInsertStore = true;
- Alignment = std::max(Alignment, InstAlignment);
- }
+ if (GuaranteedToExecute) {
+ DereferenceableInPH = true;
+ SafeToInsertStore = true;
+ Alignment = std::max(Alignment, InstAlignment);
}
// If a store dominates all exit blocks, it is safe to sink.
More information about the llvm-commits
mailing list