This is an archive of the discontinued LLVM Phabricator instance.

[TableGen] Teach tablegen to allow SDNPCommutable nodes with more than 2 operands.
ClosedPublic

Authored by craig.topper on Sep 3 2017, 3:37 PM.

Details

Summary

Tablegen already supports commutable instrinsics with more than 2 operands. There it just assumes the first two operands are commutable.

I plan to use this to improve the generation of FMA patterns in the X86 backend.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Sep 3 2017, 3:37 PM
arsenm accepted this revision.Sep 3 2017, 3:57 PM
arsenm added a subscriber: arsenm.

LGTM, I've wanted this before.

This revision is now accepted and ready to land.Sep 3 2017, 3:57 PM
arsenm added a comment.Sep 3 2017, 3:58 PM

Could also use a note in TargetSelectionDAG.td on SDNPCommutative

This revision was automatically updated to reflect the committed changes.