[all-commits] [llvm/llvm-project] 4fc52d: [InstCombine] Remove weaker fence adjacent to a st...

annamthomas via All-commits all-commits at lists.llvm.org
Tue Feb 1 11:06:37 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4fc52db116033253ad5b078b317a9f7ae0db87d2
      https://github.com/llvm/llvm-project/commit/4fc52db116033253ad5b078b317a9f7ae0db87d2
  Author: Anna Thomas <anna at azul.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/consecutive-fences.ll

  Log Message:
  -----------
  [InstCombine] Remove weaker fence adjacent to a stronger fence

We have an instCombine rule to remove identical consecutive fences.
We can extend this to remove weaker fences when we have consecutive stronger
fence.

As stated in the LangRef, a fence with a stronger ordering also implies
ordering weaker than itself: "A fence which has seq_cst ordering, in addition to
having both acquire and release semantics specified above, participates in the
global program order of other seq_cst operations and/or fences."

Reviewed-By: reames

Differential Revision: https://reviews.llvm.org/D118607




More information about the All-commits mailing list