[MemorySSA][NFC] Simplify if condition
authorluxufan <luxufan@iscas.ac.cn>
Mon, 5 Sep 2022 04:44:55 +0000 (04:44 +0000)
committerluxufan <luxufan@iscas.ac.cn>
Mon, 5 Sep 2022 10:43:17 +0000 (10:43 +0000)
Differential Revision: https://reviews.llvm.org/D133332

llvm/include/llvm/Analysis/MemorySSA.h

index c0ceab3..ac1daf8 100644 (file)
@@ -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<Value *>(Location.Ptr)))
+      if (!IsGuaranteedLoopInvariant(const_cast<Value *>(Location.Ptr)))
         CurrentPair.second =
             Location.getWithNewSize(LocationSize::beforeOrAfterPointer());
       PHITransAddr Translator(