This is an archive of the discontinued LLVM Phabricator instance.

[SDAG] Add test for DAGCombiner multiple result commutative CSE
ClosedPublic

Authored by ibookstein on Jul 15 2022, 2:18 PM.

Details

Summary

This commit adds a test for DAGCombiner commutative CSE on
nodes with multiple results (UMUL_LOHI). In this commit it
asserts the lack of CSE, a later commit will demonstrate
the CSE in the changed assertions.

Signed-off-by: Itay Bookstein <ibookstein@gmail.com>

Diff Detail

Event Timeline

ibookstein created this revision.Jul 15 2022, 2:18 PM
ibookstein requested review of this revision.Jul 15 2022, 2:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 2:18 PM
barannikov88 accepted this revision.Jul 15 2022, 2:45 PM

Checked locally, there are indeed UMUL_LOHI nodes which haven't been CSEd, so LGTM.
I'm wondering how you came up with this...

This revision is now accepted and ready to land.Jul 15 2022, 2:45 PM

Something very similar to the use-case demonstrated in the test: the computation of the high part of a 64x64->128 squaring emitted four 32-bit multiplications rather than three, on a 32-bit arch.