From f5c178b6a41f3afcd195268a1a249c1c9fbea5a2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Sep 2022 15:41:51 +0200 Subject: [PATCH] [LICM] Remove unnecessary condition (NFC) --- llvm/lib/Transforms/Scalar/LICM.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index 41f5627..1fd66be 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. -- 2.7.4