This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add SVE lowering for vector.reduce.fminimum and fmaximum
ClosedPublic

Authored by dmgreen on Jun 19 2023, 8:17 AM.

Details

Summary

Following what is already performed for vector.reduce.fmin/fmax, this adds lowering for the new vector.reduce.fminimum/fmaximum nodes to the SVE fminv and fmaxv instructions via the existing FMINV_PRED/FMAXV_PRED nodes.

Diff Detail

Event Timeline

dmgreen created this revision.Jun 19 2023, 8:17 AM
dmgreen requested review of this revision.Jun 19 2023, 8:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 19 2023, 8:17 AM
paulwalker-arm added inline comments.Jun 20 2023, 7:14 AM
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
13583–13586

This code also affect fixed length SVE code generation, which means we'll need tests within sve-fixed-length-fp-reduce.ll and sve-streaming-mode-fixed-length-fp-reduce.ll as well.

llvm/test/CodeGen/AArch64/sve-split-fp-reduce.ll
35

Typo: "FMAXNMV"

Matt added a subscriber: Matt.Jun 20 2023, 2:08 PM

I was avoiding the fixed-length SVE, as the nodes were not marked custom they would go via the existing expansion. I can add support for them here too though, it's only two extra lines and a number of copied tests.

dmgreen updated this revision to Diff 533126.Jun 20 2023, 9:27 PM

Add fixed length support and tests.

dmgreen marked an inline comment as done.Jun 20 2023, 9:28 PM
dmgreen updated this revision to Diff 533916.Jun 23 2023, 3:43 AM

Rebase to see if precommit tests do better, now that the Neon side has been committed.

paulwalker-arm accepted this revision.Jun 23 2023, 6:37 AM
This revision is now accepted and ready to land.Jun 23 2023, 6:37 AM