Page MenuHomePhabricator

[DAGCombine][ARM] x ==/!= c -> (x - c) ==/!= 0 iff '-c' can be folded into the x node.
Changes PlannedPublic

Authored by lebedev.ri on May 25 2019, 10:23 AM.

Details

Summary

This fold, helps recover from the rest of the D62266 ARM regressions.
https://rise4fun.com/Alive/TvpC

Note that while the fold is quite flexible, i'we restricted it
to the single interesting pattern at the moment.

Diff Detail

Event Timeline

lebedev.ri created this revision.May 25 2019, 10:23 AM
lebedev.ri retitled this revision from [DAGCombine] x ==/!= c -> (x - c) ==/!= 0 iff '-c' can be folded into the x node. to [DAGCombine][ARM] x ==/!= c -> (x - c) ==/!= 0 iff '-c' can be folded into the x node..May 25 2019, 11:49 AM

Can you add test coverage for some other target, maybe x86?

Can you add test coverage for a few more variations? Maybe something with SUBCARRY?

Can you add test coverage for some other target, maybe x86?

Can you add test coverage for a few more variations? Maybe something with SUBCARRY?

I don't know how to add standalone test coverage here.

deadalnix accepted this revision.Oct 22 2019, 8:21 AM

It's indeed not clear if what you have is the result of the legalizer. In this case just proceed.

This revision is now accepted and ready to land.Oct 22 2019, 8:21 AM

It's indeed not clear if what you have is the result of the legalizer. In this case just proceed.

Okay :(
Thanks for the review.

This revision was automatically updated to reflect the committed changes.

This broke building of Qt, ffmpeg/libav and libgcrypt for mingw-i686, with failed asserts `BitWidth == RHS.BitWidth && "Bit widths must be the same"', see https://bugs.llvm.org/show_bug.cgi?id=43769 for reproduction sample.

hans added a subscriber: hans.Oct 23 2019, 10:53 AM

This broke building of Qt, ffmpeg/libav and libgcrypt for mingw-i686, with failed asserts `BitWidth == RHS.BitWidth && "Bit widths must be the same"', see https://bugs.llvm.org/show_bug.cgi?id=43769 for reproduction sample.

It also broke Chromium, see https://bugs.chromium.org/p/chromium/issues/detail?id=1016949#c1 for our reproducer.

I've reverted in 684ebc6.

This broke building of Qt, ffmpeg/libav and libgcrypt for mingw-i686, with failed asserts `BitWidth == RHS.BitWidth && "Bit widths must be the same"', see https://bugs.llvm.org/show_bug.cgi?id=43769 for reproduction sample.

It also broke Chromium, see https://bugs.chromium.org/p/chromium/issues/detail?id=1016949#c1 for our reproducer.

I've reverted in 684ebc6.

Thanks, this one is different from the first report.

lebedev.ri reopened this revision.Oct 23 2019, 11:09 AM
This revision is now accepted and ready to land.Oct 23 2019, 11:09 AM
lebedev.ri planned changes to this revision.Oct 23 2019, 11:10 AM