[PATCH] D115229: [AMDGPU] In SIMemoryLegalizer assume all atomic ops have memoperands

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 8 05:49:55 PST 2021


arsenm added a comment.

In D115229#3178899 <https://reviews.llvm.org/D115229#3178899>, @foad wrote:

> I wasn't aware that passes were allowed to drop MMOs. Do you know of any specific examples? It seems like a bit of an odd situation if they are allowed to, but it never actually happens in practice.

The verifier doesn't enforce an MMO requirement, so it's defacto. Plus hasUnorderedMemoryRef implies this is OK.

I think the concern would be if you did something like if convert 2 conditional loads into one load with a select on the pointer. You would have to common the memory operands somehow (which I guess would be dropping the IR reference and selecting the most conservative flags of the pair)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115229



More information about the llvm-commits mailing list