[PATCH] D45858: [DivRemPairs] Fix non-determinism in use list order.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 24 08:28:49 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D45858#1075653, @gberry wrote:

> In https://reviews.llvm.org/D45858#1073565, @spatel wrote:
>
> > That looks ok, but I'm curious;
> >
> > 1. How do you discover this problem?
>
>
> I ran into this when testing a totally unrelated change that I expected to have no effect on final code generation.  When it generated different code for one llvm-test-suite test case, I investigated why, and it led me here.
>
> > 2. Is it possible to make the problem visible in a regression test (if so, please add a test)?
>
> I don't think so, but maybe.  The problem is that before this change, the DivRemPairs pass will generate non-deterministic use-list orderings.  I could write a test that dumps the use-list info and check that, but that seems pretty fragile.


The answer to #1 suggests that we could reduce a codegen test based on whatever wiggled in test-suite? I don't know how much effort that requires, so if it doesn't seem worthwhile, I won't hold up this patch. I just want to know what I should do if I run into a similar problem. Also, @mgrang is the answer about the reverse-iteration-bot sufficient? (Again, I don't know anything about it, so trying to understand better.)


Repository:
  rL LLVM

https://reviews.llvm.org/D45858





More information about the llvm-commits mailing list