[PATCH] D145572: [llvm][Uniformity] consistently handle uniform instructions

Sameer Sahasrabuddhe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 22:37:30 PST 2023


sameerds added a comment.

In D145572#4180375 <https://reviews.llvm.org/D145572#4180375>, @ruiling wrote:

> In D145572#4178109 <https://reviews.llvm.org/D145572#4178109>, @ronlieb wrote:
>
>> LGTM, as this resolves our downstream assertions seen in our CI
>
> Why would this fix an assertion? The description sounds like this is just an improvement. I think we need a reproducer for the assertion.

Please see the comment regarding pushUsers().



================
Comment at: llvm/lib/Analysis/UniformityAnalysis.cpp:62
     const Instruction &Instr) {
   assert(!isAlwaysUniform(Instr));
   if (Instr.isTerminator())
----------------
This is the assertion that got fired. Earlier, if an operation X occurred in a cycle C that was assumed to be divergent, would assume that X is also divergent even if it is always uniform. Then when we try to call pushUsers() on X, it would assert. The lit test in this change is an example of exactly that happening.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145572



More information about the llvm-commits mailing list