Page MenuHomePhabricator

[DAGCombine] More diamond carry pattern optimization.
Needs ReviewPublic

Authored by deadalnix on Sun, Jan 27, 9:48 AM.

Details

Summary

This diff improve the capability of DAGCOmbine to generate linear carries propagation in presence of a diamond pattern. It is now able to match a large variety of different patterns rather than some hardcoded one.

Arguably, the codegen in test cases is not better, but this is to be expected. The goal of this transformation is more about canonicalisation than actual optimisation.

Diff Detail

Event Timeline

deadalnix created this revision.Sun, Jan 27, 9:48 AM
deadalnix retitled this revision from [DAGCombine] More diamong carry pattern optimization. to [DAGCombine] More diamond carry pattern optimization..Sun, Jan 27, 9:52 AM

Fix NewY's type which was invalid in some circustances

craig.topper added inline comments.Mon, Jan 28, 4:56 PM
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
2543

usualy->usually

2544

linarized->linearized

2588

fnd->find

deadalnix updated this revision to Diff 184009.Mon, Jan 28, 7:34 PM

Fix typos.
Rebase on top of D57367