This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] (addc X, (adde Y, 0, Carry)) -> (adde X, Y, Carry) when Y + 1 cannot overflow.
AbandonedPublic

Authored by deadalnix on Feb 5 2017, 8:42 AM.

Details

Summary

This is extracted from D29443 .

Event Timeline

deadalnix created this revision.Feb 5 2017, 8:42 AM
RKSimon edited edge metadata.Feb 6 2017, 5:57 AM

Should this wait for D29524 and then use SelectionDAG::computeOverflowKind?

They can be done in any order. It indeed exposes more combine opportunity with D29524 .

deadalnix updated this revision to Diff 87240.Feb 6 2017, 8:50 AM

Rebase and use computeOverflowKind

I take it this needs to wait until we have an answer to the PowerPC DAG issue?

This will cause the same problem if X is dependent on the result of the result of the Carry producer in some manner, so yes.

deadalnix abandoned this revision.Jun 1 2017, 4:03 AM

This is not relevent anymore.