This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Support vector maximum and minimum for RVP
Needs ReviewPublic

Authored by Jim on Jun 4 2021, 10:03 PM.

Details

Summary

Add codegen patterns matched to vector maximum and minimum.

Diff Detail

Event Timeline

Jim created this revision.Jun 4 2021, 10:03 PM
Jim requested review of this revision.Jun 4 2021, 10:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2021, 10:03 PM
craig.topper added inline comments.
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
840

What about cases where it isn't min/max? You'll have an unselectable vselect.

Why aren't not make ISD::SMAX and ISD::SMIN legal and match those?

Jim updated this revision to Diff 350172.Jun 6 2021, 8:55 PM

Set ISD::SMAX, ISD::SMIN, ISD::UMAX and ISD::UMIN as legal.

Jim marked an inline comment as done.Jun 6 2021, 8:56 PM