From 2e7aed1947d2b280ef76466049af78e49472db40 Mon Sep 17 00:00:00 2001 From: luxufan Date: Mon, 5 Sep 2022 04:44:55 +0000 Subject: [PATCH] [MemorySSA][NFC] Simplify if condition Differential Revision: https://reviews.llvm.org/D133332 --- llvm/include/llvm/Analysis/MemorySSA.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/include/llvm/Analysis/MemorySSA.h b/llvm/include/llvm/Analysis/MemorySSA.h index c0ceab3..ac1daf8 100644 --- a/llvm/include/llvm/Analysis/MemorySSA.h +++ b/llvm/include/llvm/Analysis/MemorySSA.h @@ -1252,8 +1252,7 @@ private: // to unknown guarantees that any memory accesses that access locations // after the pointer are considered as clobbers, which is important to // catch loop carried dependences. - if (Location.Ptr && - !IsGuaranteedLoopInvariant(const_cast(Location.Ptr))) + if (!IsGuaranteedLoopInvariant(const_cast(Location.Ptr))) CurrentPair.second = Location.getWithNewSize(LocationSize::beforeOrAfterPointer()); PHITransAddr Translator( -- 2.7.4