This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][Clang] Update new overloading rules for RVV intrinsics.
ClosedPublic

Authored by khchen on Mar 23 2021, 7:35 AM.

Details

Summary

RVV intrinsics has new overloading rule, please see
https://github.com/riscv/rvv-intrinsic-doc/commit/82aac7dad4c6c1c351ed5b17ca6007c395843ed7

Changed:

  1. Rename generic to overloaded because the new rule is not using C11 generic.
  2. Change HasGeneric to HasNoMaskedOverloaded because all masked operations support overloading api.
  3. Add more overloaded tests due to overloading rule changed.

Diff Detail

Event Timeline

khchen created this revision.Mar 23 2021, 7:35 AM
khchen requested review of this revision.Mar 23 2021, 7:35 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 23 2021, 7:35 AM
craig.topper added inline comments.Mar 23 2021, 12:10 PM
llvm/docs/CommandGuide/tblgen.rst
133

This looks like an unintended change

279

Unintended change

khchen updated this revision to Diff 332852.Mar 23 2021, 7:21 PM

Fix unintended change.

liaolucy added inline comments.Mar 24 2021, 12:01 AM
clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vadd.c
11

riscv_vector_overloaded.h ?

khchen marked 3 inline comments as done.Mar 24 2021, 3:09 AM
khchen added inline comments.
clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vadd.c
11

Sorry, I forget to have a discussion in rvv-intrinsic-doc first about header file organization.
We prefer the toolchain only provide one vector intrinsic header for users.
Let we discuss it in https://github.com/riscv/rvv-intrinsic-doc/issues/73.

khchen updated this revision to Diff 333298.Mar 25 2021, 7:22 AM
khchen marked an inline comment as done.

Emit riscv_vector_overloaded.h into riscv_vector.h
Remove riscv_vector_overloaded.h

liaolucy added inline comments.Mar 25 2021, 6:57 PM
clang/utils/TableGen/RISCVVEmitter.cpp
10

remove riscv_vector_overloaded.h?

LGTM

khchen updated this revision to Diff 333486.Mar 25 2021, 7:21 PM

remove riscv_vector_overloaded.h

craig.topper accepted this revision.Mar 26 2021, 9:32 AM

LGTM other than those typos

clang/include/clang/Basic/riscv_vector.td
161

oerloading -> overloading

clang/utils/TableGen/RISCVVEmitter.cpp
11

fucntions -> functions

This revision is now accepted and ready to land.Mar 26 2021, 9:32 AM
clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vle.c