[all-commits] [llvm/llvm-project] dae991: [AA] Use the cmpxchg merged ordering in getModRefI...

Justin Lebar via All-commits all-commits at lists.llvm.org
Sun Jul 19 11:19:24 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dae991a55eacb4f3c3382f3cba2897ceb43e1725
      https://github.com/llvm/llvm-project/commit/dae991a55eacb4f3c3382f3cba2897ceb43e1725
  Author: Justin Lebar <justin.lebar at gmail.com>
  Date:   2026-07-19 (Sun, 19 Jul 2026)

  Changed paths:
    M llvm/lib/Analysis/AliasAnalysis.cpp
    M llvm/test/Analysis/BasicAA/atomics.ll

  Log Message:
  -----------
  [AA] Use the cmpxchg merged ordering in getModRefInfo (#210545)

When a cmpxchg's address is NoAlias with the queried location,
getModRefInfo still reports sync effects if the cmpxchg is stronger than
monotonic, since an ordered operation constrains code motion around
locations it never accesses.

But a cmpxchg op has two atomic orderings, and getModRefInfo looked
only at one of them.

Change it so we check the merged ordering, i.e. the stronger of the two.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list