[llvm] 21dadd7 - [DAGCombiner] avoid unnecessary indirection from SDNode/SDValue; NFCI

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 4 03:24:35 PDT 2020


Hi Sanjay,

On Fri, 29 May 2020 at 14:37, Sanjay Patel via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> -    Replace0 &= !N0->hasOneUse();
> -    Replace1 &= (N0 != N1) && !N1->hasOneUse();
> +    Replace0 &= !N0.hasOneUse();
> +    Replace1 &= (N0 != N1) && !N1.hasOneUse();

I believe this change caused a regression because other values
produced by the SDNode may have users too. This affected sqlite
originally, but see the attached smaller reproducer. Because we don't
notice the user of the load's chain it gets orphaned and emitted after
the call it should precede.

I've not reverted it outright, but kind of think it might be a good
idea; it wasn't immediately obvious to me that this is the only site
that cared about other results.

Cheers.

Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simplest.ll
Type: application/octet-stream
Size: 19953 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200604/40cf6fb5/attachment.obj>


More information about the llvm-commits mailing list