[PATCH] D118607: [InstCombine] Remove weaker fence adjacent to a stronger fence

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 31 10:31:04 PST 2022


anna planned changes to this revision.
anna added a comment.

fix based on Philip's comments about scopes.



================
Comment at: llvm/test/Transforms/InstCombine/consecutive-fences.ll:14
   fence seq_cst
   fence syncscope("singlethread") acquire
   fence syncscope("singlethread") acquire
----------------
reames wrote:
> Ah!  A case you need to be careful of and I think the current code is wrong on.
> 
> The stronger fence must also have a stronger scope.  For the moment, you could restrict the transform to the case where both fences are global scoped if desired.
> 
> We can't use a singlethread fence seq_cst to remove a global release fence.  
Thanks, I hadn't realized the part about scopes! Will fix the code. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118607/new/

https://reviews.llvm.org/D118607



More information about the llvm-commits mailing list