This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Make SelectionDAG aware of the known bits in USUBO and SSUBO and SUBC.
ClosedPublic

Authored by deadalnix on Feb 27 2017, 4:55 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

deadalnix created this revision.Feb 27 2017, 4:55 PM
RKSimon edited edge metadata.Feb 28 2017, 1:21 PM

Is there a test for ISD::SUBC ?

The test case in 32 bits is legalizing using SUBC but the it doesn't looks like the backend is able to find any optimization with the freed bits. I could come up with an example, but it would end up being contrived and I'm not sure it is worth it because the plan it to switch to USUBO/SUBCARRY anyway. I did not included SUBE in the list because it needs a different pattern, but I don't see a problem having SUBC in there.

RKSimon accepted this revision.Feb 28 2017, 2:44 PM

Makes sense - LGTM

This revision is now accepted and ready to land.Feb 28 2017, 2:44 PM
deadalnix updated this revision to Diff 90631.Mar 5 2017, 5:25 PM

Rebase on top of the changes in D30379

deadalnix updated this revision to Diff 91365.Mar 10 2017, 9:25 AM

Rebase and use setBits;

This revision was automatically updated to reflect the committed changes.