This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombine] Use FoldConstantArithmetic() to perform ((c1-A)+c2) -> (c1+c2)-A fold

Authored by lebedev.ri on May 30 2019, 7:10 AM.

Diff Detail


Event Timeline

I'm not sure what this FIXME was trying to say. getNode should detect the constants and call FoldConstantArithmetic anyway. @spatel?

craig.topper accepted this revision.May 30 2019, 11:11 AM

LGTM. I dont' think this causes a functional change. At best its a very minor compile time improvement.

This revision is now accepted and ready to land.May 30 2019, 11:11 AM
This revision was automatically updated to reflect the committed changes.