Page MenuHomePhabricator

[ARM] Make PerformSHLSimplify add nodes to the DAG worklist correctly.

Authored by efriedma on Aug 13 2018, 2:45 PM.



Intentionally excluding nodes from the DAGCombine worklist is likely to lead to weird optimizations and infinite loops, so it's generally a bad idea.

To avoid the infinite loops, fix DAGCombine to use the isDesirableToCommuteWithShift target hook before performing the transforms in question, and implement the target hook in the ARM backend disable the transforms in question.

Fixes . (I don't have a reduced testcase for that bug. But we should have sufficient test coverage for PerformSHLSimplify given that we're not playing weird tricks with the worklist. I can try to bugpoint it if necessary, though.)

Diff Detail


Event Timeline

efriedma created this revision.Aug 13 2018, 2:45 PM
samparker accepted this revision.Aug 14 2018, 12:16 AM

Thanks for fixing this, LGTM.

This revision is now accepted and ready to land.Aug 14 2018, 12:16 AM
This revision was automatically updated to reflect the committed changes.