[PATCH] D59260: [DAGCombiner] If a TokenFactor would be merged into its user, consider the user later.

Nirav via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 29 15:09:35 PST 2021


I strongly suspect this is due to large Token factors which get decomposed
into a chain. The easy fix for this would be to restrict the predicate
further to limit this to inline on relatively small token factors (from the
tests changed in the PR we probably only need to inline token factors of
about 32 or less, but it'd be nice to keep it to anything below the max
operand size 1024). That should avoid the pathological case.

Unfortunately I'm not in a position to test this out in the near future,
but I'm happy to review if someone's willing to verify this is sufficient
for your purposes.

Cheers,

Nirav

On Thu, Dec 23, 2021, 16:12 Alexey Zhikhartsev via Phabricator <
reviews at reviews.llvm.org> wrote:

> alexey.zhikhar added a comment.
> Herald added subscribers: kerbowa, pengfei, Jim.
>
> @niravd Hi Nirav, my team and I discovered a compile time regression due
> to this patch. I submitted a bug report for it, we would really appreciate
> if you could take a look at it:
>
> https://github.com/llvm/llvm-project/issues/52858
>
> Thank you in advance.
>
>
> Repository:
>   rL LLVM
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D59260/new/
>
> https://reviews.llvm.org/D59260
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211229/1c7812c3/attachment.html>


More information about the llvm-commits mailing list