[PATCH] D31726: AliasAnalysis: Be less conservative about volatile than atomic.

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 15:12:09 PDT 2017


dberlin added inline comments.


================
Comment at: lib/Analysis/AliasAnalysis.cpp:336
+  // Be conservative in the face of atomic.
+  if (isStrongerThan(L->getOrdering(), AtomicOrdering::NotAtomic))
     return MRI_ModRef;
----------------
dberlin wrote:
> sanjoy wrote:
> > Why not `isStrongerThan(L->getOrdering(), AtomicOrdering::Unordered)`? (same below)
> > 
> > OTOH I'm surprised that this did not break any tests.
> Honestly:
> Because i don't know enough to know if that's okay ;)
> If it is, happy to do it.
> 
> It breaks 1 optimizations test that i'm looking at:
> 
> memcpy/atomic.ll optimizes *less* now.
> Which makes no sense at all.  I suspect it was relying on weird aliasing before. I'm debugging.
> 
> Otherwise, it does break some memoryssa tests, which i'm updating for the correct answers.
> (i'm also still awaiting 3 stage results on linux)
> 
Actually the memcpyopt is exactly the issue you point out, so fixing as part of test updates.


https://reviews.llvm.org/D31726





More information about the llvm-commits mailing list