Page MenuHomePhabricator

[DAGCombine] optimizeSetCCOfSignedTruncationCheck(): handle inverted pattern

Authored by lebedev.ri on Aug 31 2018, 2:49 AM.

Diff Detail


Event Timeline

lebedev.ri created this revision.Aug 31 2018, 2:49 AM

That is complicated/magical. :)
It would be good to put an example with fixed constants in the code comments where you do the inversion, so we can better grasp how the transform works with real numbers.
x86 diffs look neutral or better. Adding some more potential AArch64 reviewers to confirm the same on those tests.

AArch64 test changes look fine.

110 ↗(On Diff #163491)

We should be able to optimize out the masking here, I think, but I guess that's orthogonal.

Add very basic example of the expected pattern as a comment.

spatel accepted this revision.Sep 1 2018, 4:54 AM


This revision is now accepted and ready to land.Sep 1 2018, 4:54 AM


Thank you for the review!

This revision was automatically updated to reflect the committed changes.