[PATCH] D33300: [ImplicitNullChecks] Uphold an invariant in areMemoryOpsAliased

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 20:05:14 PDT 2017


sanjoy added inline comments.


================
Comment at: lib/CodeGen/ImplicitNullChecks.cpp:384
+        if (AR == AR_MayAlias) {
+          if (RedefinesPointerReg)
+            return SR_Impossible;
----------------
skatkov wrote:
> It seems that RedefinesPointerReg will check always the current MI, while you need a check of PrevMI.
> 
My intent was that as we scan down `NotNullSucc`, we will bail out of the entire transform (by returning `SR_Impossible`) the first time we see an instruction redefining `PointerReg`.  But this logic can be made clearer by adding an assert, which I will do in an update tomorrow.


https://reviews.llvm.org/D33300





More information about the llvm-commits mailing list