This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][Clang] Support RVV policy functions.
ClosedPublic

Authored by khchen on May 31 2022, 6:12 PM.

Details

Summary
  1. Add policy function support and tests for vadd, vmv, vfmv and all load

instructions except segment load. I didn't add all combination of policy
functions because it seem not to make sense.

  1. Rename HasUnMaskedOverloaded to SupportOverloading.
  2. vmv.s.x for ta policy could not have overloaded api.
  3. This patch does not support all operations, I will have other follow-up

patches support all.

[RFC] https://github.com/riscv-non-isa/rvv-intrinsic-doc/pull/137

Diff Detail

Event Timeline

khchen created this revision.May 31 2022, 6:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 31 2022, 6:12 PM
khchen requested review of this revision.May 31 2022, 6:12 PM
fakepaper56 added inline comments.Jun 2 2022, 2:06 AM
clang/lib/Sema/SemaRVVLookup.cpp
329 ↗(On Diff #433259)

Using const std::string &suffix.

clang/lib/Support/RISCVVIntrinsicUtils.cpp
873

Using const std::string &suffix.

StephenFan added inline comments.Jul 12 2022, 5:43 AM
clang/lib/Sema/SemaRVVLookup.cpp
378–388 ↗(On Diff #433259)

Reduce indentation.

khchen updated this revision to Diff 447940.Jul 27 2022, 12:36 AM

rebase and address @fakepaper56 and @StephenFan's comments, also do some refactoring.

kito-cheng accepted this revision.Jul 31 2022, 8:17 PM

LGTM, and verified with internal testsuite :)

This revision is now accepted and ready to land.Jul 31 2022, 8:17 PM
This revision was landed with ongoing or failed builds.Aug 1 2022, 10:45 AM
This revision was automatically updated to reflect the committed changes.
khchen marked an inline comment as done.