Page MenuHomePhabricator

[AArch64] implement isReassocProfitable, disable for (u|s)mlal.
ClosedPublic

Authored by fhahn on May 18 2022, 8:42 AM.

Details

Summary

Currently reassociating add expressions can lead to failing to select
(u|s)mlal. Implement isReassocProfitable to skip reassociating
expressions that can be lowered to (u|s)mlal.

The same issue exists for the *mlsl variants as well, but the DAG
combiner doesn't use the isReassocProfitable hook before reassociating.
To be fixed in a follow-up commit as this requires DAGCombiner changes
as well.

Diff Detail

Event Timeline

fhahn created this revision.May 18 2022, 8:42 AM
fhahn requested review of this revision.May 18 2022, 8:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2022, 8:42 AM
dmgreen accepted this revision.May 19 2022, 5:49 AM

Sounds good to me.

I presume it will need to handle aarch64_neon_umull and UMULL because it will visit the add first, before the aarch64_neon_umull has been changed into a UMULL?

This revision is now accepted and ready to land.May 19 2022, 5:49 AM
This revision was landed with ongoing or failed builds.May 23 2022, 1:42 AM
This revision was automatically updated to reflect the committed changes.