This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Convert VSLIDE(UP|DOWN) nodes to "VL" versions (NFC)
ClosedPublic

Authored by frasercrmck on Feb 11 2021, 7:13 AM.

Details

Summary

This patch prepares the RISCV VSLIDEUP and VSLIDEDOWN custom nodes to
ones carrying additional mask and vector-length operands. This is
primarily so they can be used by both systems.

This also takes the opportunity to create some helper functions to deal
with the common task of getting the default (unmasked) VL operands.

Diff Detail

Event Timeline

frasercrmck created this revision.Feb 11 2021, 7:13 AM
frasercrmck requested review of this revision.Feb 11 2021, 7:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2021, 7:13 AM
craig.topper added inline comments.Feb 11 2021, 11:40 AM
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
844

Do these need to be EVT or can they be MVT? May need to use getSimpleValueType in some of the callers.

  • rebase on main
  • use MVTs instead of EVTs
frasercrmck marked an inline comment as done.Feb 12 2021, 1:57 AM
frasercrmck added inline comments.
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
844

Thinking again, I don't think they need to be EVTs since these methods should only be used to create legal nodes. Will update.

This revision is now accepted and ready to land.Feb 12 2021, 9:28 AM
arcbbb accepted this revision.Feb 12 2021, 7:51 PM

LGTM!

frasercrmck marked an inline comment as done.
  • rebase
  • add another trivial use of getDefaultVLOps