Skip to content

Commit

Permalink
[4/11][Clang][RISCV] Expand all variants for unit stride segment store
Browse files Browse the repository at this point in the history
This is the 4th patch of the patch-set. For the cover letter, please
checkout D152069.

Depends on D152071.

This patch expands all variants for unit stride segment store. The
store intrinsics does not have any policy variants. This patch also
fixes the trailing suffix in the intrinsics' function name that
representing the return type, adding `x{NF}`.

For the same reason mentioned in [3/11], only full test case for
vsseg2e32 is added.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D152072
  • Loading branch information
eopXD committed Jun 14, 2023
1 parent 0e9548b commit b59ca49
Show file tree
Hide file tree
Showing 3 changed files with 682 additions and 14 deletions.
19 changes: 14 additions & 5 deletions clang/include/clang/Basic/riscv_vector.td
Expand Up @@ -1565,9 +1565,15 @@ multiclass RVVUnitStridedSegLoadTuple<string op> {
}

multiclass RVVUnitStridedSegStoreTuple<string op> {
foreach type = ["i"] in {
defvar eew = !cond(!eq(type, "i") : "32");
foreach nf = [2] in {
foreach type = TypeList in {
defvar eew = !cond(!eq(type, "c") : "8",
!eq(type, "s") : "16",
!eq(type, "i") : "32",
!eq(type, "l") : "64",
!eq(type, "x") : "16",
!eq(type, "f") : "32",
!eq(type, "d") : "64");
foreach nf = NFList in {
let Name = op # nf # "e" # eew # "_v_tuple",
OverloadedName = op # nf # "e" # eew # "_tuple",
IRName = op # nf,
Expand Down Expand Up @@ -1600,8 +1606,11 @@ multiclass RVVUnitStridedSegStoreTuple<string op> {
return Builder.CreateCall(F, Operands, "");
}
}] in {
defvar T = "(Tuple:" # nf # ")";
def : RVVBuiltin<"v", "0Pe" # T # "v", type>;
defvar T = "(Tuple:" # nf # ")";
def : RVVBuiltin<T # "v", "0Pe" # T # "v", type>;
if !not(IsFloat<type>.val) then {
def : RVVBuiltin<T # "Uv", "0PUe" # T # "Uv", type>;
}
}
}
}
Expand Down

0 comments on commit b59ca49

Please sign in to comment.