This is an archive of the discontinued LLVM Phabricator instance.

[clang][RISCV] Support operators for RVV sizeless vector types
Needs ReviewPublic

Authored by jacquesguan on Aug 18 2023, 1:24 AM.

Details

Summary

This patch supports arithmetic, bitwise logical, compare, shift and subscript operators for RVV sizeless vector types.

Diff Detail

Event Timeline

jacquesguan created this revision.Aug 18 2023, 1:24 AM
jacquesguan requested review of this revision.Aug 18 2023, 1:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 18 2023, 1:24 AM
craig.topper added inline comments.Aug 18 2023, 8:09 AM
clang/lib/Sema/SemaChecking.cpp
15491

Why do we need this, but SVE doesn't?

clang/lib/Sema/SemaExpr.cpp
12343

This code looks identical to the code above it.

16375

Update "SVE" to mention "RVV" too?

Matt added a subscriber: Matt.Aug 18 2023, 9:36 AM

Address comment

jacquesguan marked 2 inline comments as done.

fix if statement

jacquesguan marked an inline comment as done.Aug 20 2023, 7:55 PM
jacquesguan added inline comments.
clang/lib/Sema/SemaChecking.cpp
15491

Merged with the former sve function.

clang/lib/Sema/SemaExpr.cpp
12343

Removed.

16375

Done.

jacquesguan marked an inline comment as done.

fix test cases

Jim added inline comments.Aug 21 2023, 10:33 PM
clang/test/CodeGen/riscv-rvv-vla-arith-ops.c
4

zve64d has implied f and d.

91

Do we support operation for vfloat16 here?

Jim added inline comments.Aug 21 2023, 10:59 PM
clang/test/CodeGen/riscv-rvv-vla-arith-ops.c
4

I misunderstand it. Please ignore the comment.

add fp16 cases.

jacquesguan marked an inline comment as done.Aug 22 2023, 1:01 AM
jacquesguan added inline comments.
clang/test/CodeGen/riscv-rvv-vla-arith-ops.c
91

Thanks to point it. I added fp16 vector cases.

jacquesguan marked an inline comment as done.Sep 6 2023, 4:04 AM

ping.