This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Extend vecreduce -> udot handling to mla reductions
ClosedPublic

Authored by dmgreen on Feb 23 2021, 6:17 AM.

Details

Summary

We previously had lowering for:

vecreduce.add(zext(X)) to vecreduce.add(UDOT(zero, X, one))

This extends that to also handle:

vecreduce.add(mul(zext(X), zext(Y)) to vecreduce.add(UDOT(zero, X, Y))

It extends the existing code to optionally handle a mul with equal extends.

Diff Detail

Event Timeline

dmgreen created this revision.Feb 23 2021, 6:17 AM
dmgreen requested review of this revision.Feb 23 2021, 6:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 23 2021, 6:17 AM
SjoerdMeijer accepted this revision.Mar 4 2021, 1:02 AM

Looks okay to me.

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
11762

Nit: can we not do:

Op0 = Op0.getOperand(0);

to avoid creating As and Bs?

This revision is now accepted and ready to land.Mar 4 2021, 1:02 AM