This is an archive of the discontinued LLVM Phabricator instance.

[ARM] VMLAVA reduction patterns
ClosedPublic

Authored by dmgreen on Feb 11 2020, 1:43 AM.

Details

Summary

Similar to VADDV and VADDLV that have been added recently, this adds lowering and patterns for VMLAV, VMLAVA, VMLALV and VMLALVA. They perform the same roles as the add's, just folding a mul into the same instruction (and so taking two inputs). As such, they need to be lowered in the same way as the types are often not legal.

Diff Detail

Event Timeline

dmgreen created this revision.Feb 11 2020, 1:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2020, 1:43 AM
samparker added inline comments.Feb 12 2020, 1:09 AM
llvm/lib/Target/ARM/ARMInstrMVE.td
974

why does this pattern use a tGPR but the rest are GPR?

dmgreen updated this revision to Diff 244110.Feb 12 2020, 2:39 AM
dmgreen marked an inline comment as done.
dmgreen added inline comments.
llvm/lib/Target/ARM/ARMInstrMVE.td
974

Good eyes. I've changed them to tGPREven/tGPROdd, like the instruction definition.

The 16/8 below is also wrong. Apparently my testing script wasn't really testing what it should have.

samparker accepted this revision.Feb 12 2020, 4:37 AM

Cheers, LGTM

llvm/lib/Target/ARM/ARMInstrMVE.td
974

Ah, so D74224 needs changing then too?

This revision is now accepted and ready to land.Feb 12 2020, 4:37 AM
dmgreen marked an inline comment as done.Feb 12 2020, 7:34 AM
dmgreen added inline comments.
llvm/lib/Target/ARM/ARMInstrMVE.td
974

Yep. I folded the equivalent changes for the new and existing VADDV patterns into there and the previous commit.

This revision was automatically updated to reflect the committed changes.