Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RISC V vector predication support intrinsics support #7119

Merged
merged 47 commits into from
Oct 26, 2022
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a678da1
Add support for generating llvm.vp.* intrinsics. This is particularly
Sep 16, 2022
541833c
Add vector predicated store support.
Sep 22, 2022
282b6fd
Merge branch 'main' into llvm_vector_predication_intrinsics
Sep 23, 2022
cab2f01
Change how void type is handled with call_intrin, other vector
Sep 23, 2022
5f2972a
Merge branch 'main' into llvm_vector_predication_intrinsics
Sep 24, 2022
4a689e0
Merge branch 'main' into llvm_vector_predication_intrinsics
Sep 27, 2022
72412ac
Merge branch 'main' into llvm_vector_predication_intrinsics
Sep 29, 2022
a6a0ba9
Fix a few issues with types, order of arguments and name mangling in
Oct 5, 2022
ab2a68f
Add support for using @llvm.vp.reduce.* intrinsics in vector reductions.
Oct 7, 2022
0abb16d
Merge branch 'llvm_vector_predication_intrinsics' into riscv_update
Oct 7, 2022
3627ef4
Put RISC V intrinsics support back in.
Oct 7, 2022
8fd2aeb
Merge branch 'main' into llvm_vector_predication_intrinsics
Oct 18, 2022
af55a2e
Small refactor to clean up vector predication support. Mainly
Oct 21, 2022
eaa4100
Typo slipped in.
Oct 21, 2022
d9b52c7
Merge branch 'main' into llvm_vector_predication_intrinsics
Oct 21, 2022
f3f67cb
Merge branch 'llvm_vector_predication_intrinsics' into riscv_update
Oct 21, 2022
7a8201c
This time for sure.
Oct 21, 2022
fca802f
Merge branch 'llvm_vector_predication_intrinsics' into riscv_update
Oct 21, 2022
c0a9679
Formatting.
Oct 21, 2022
97b6d82
Merge branch 'llvm_vector_predication_intrinsics' into riscv_update
Oct 21, 2022
100a5c1
Formatting.
Oct 21, 2022
db0ea7c
More formatting.
Oct 21, 2022
bfc72ee
Merge branch 'llvm_vector_predication_intrinsics' into riscv_update
Oct 21, 2022
96dcd93
Use std::optional instead of -1 bottom value for mangle_index. Simple
Oct 24, 2022
51f3e35
Switch to using instead of typedef per review feedback.
Oct 24, 2022
cb0cbbc
Address review feedback re: default arguments, moving string
Oct 24, 2022
740f121
Add GitHub issue for fmax/fmin strict_float TODO.
Oct 24, 2022
2c0df5f
Rearrage the maze of twisty passages to not use vector predicated
Oct 24, 2022
1a60098
Merge branch 'llvm_vector_predication_intrinsics' into riscv_update
Oct 24, 2022
d2d848f
Merge branch 'main' into riscv_update
Oct 25, 2022
ea065fb
Formatting.
Oct 25, 2022
788a375
Formatting.
Oct 25, 2022
85d92f8
Typo.
Oct 25, 2022
259c33b
Address some review feedback.
Oct 25, 2022
99f7e00
More review feedback.
Oct 25, 2022
b5a4050
Add comment pointing to architecture spec on fixed-point rounding mode.
Oct 25, 2022
f8117ee
Add issue reference for rounding mode tracking.
Oct 25, 2022
98c8dd9
Fix crash causing typo in vector predication PR.
Oct 26, 2022
f6e7088
Fix another issue with vector predication PR where switching to a
Oct 26, 2022
43ac99a
Another typo in switching from args to vp_args.
Oct 26, 2022
f8f80b6
When synthesizing an all ones mask, take mask type from first vector
Oct 26, 2022
6404db0
Add support for mangling in the result type of a vector predication
Oct 26, 2022
8691848
Add support for signed by unsigned widening multiply (vwmulsu).
Oct 26, 2022
e35b82c
Formatting.
Oct 26, 2022
069000f
Improve naming and comments on patterns for handling all integer type
Oct 26, 2022
3f5f100
Formatting.
Oct 26, 2022
1e8e2aa
Comment fix.
Oct 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review feedback re: default arguments, moving string
concatenation into one line.
Z Stern committed Oct 24, 2022
commit cb0cbbc96e5158fd3abaab6cc03054b2b581665b
8 changes: 4 additions & 4 deletions src/CodeGen_LLVM.cpp
Original file line number Diff line number Diff line change
@@ -2032,7 +2032,7 @@ void CodeGen_LLVM::visit(const Load *op) {

llvm::Type *load_type = llvm_type_of(op->type.element_of());
if (ramp && stride && stride->value == 1) {
value = codegen_dense_vector_load(op, nullptr);
value = codegen_dense_vector_load(op);
} else if (ramp && stride && 2 <= stride->value && stride->value <= 4) {
// Try to rewrite strided loads as shuffles of dense loads,
// aligned to the stride. This makes adjacent strided loads
@@ -2088,7 +2088,8 @@ void CodeGen_LLVM::visit(const Load *op) {
Expr slice_base = simplify(base + load_base_i);

Value *load_i = codegen_vector_load(op->type.with_lanes(load_lanes_i), op->name, slice_base,
op->image, op->param, align, nullptr, false, nullptr);
op->image, op->param, align, /*vpred=*/nullptr,
/*slice_to_native=*/false);

std::vector<int> constants;
for (int j = 0; j < lanes_i; j++) {
@@ -4320,8 +4321,7 @@ void CodeGen_LLVM::codegen_vector_reduce(const VectorReduce *op, const Expr &ini
}

if (use_llvm_vp_intrinsics) {
string vp_name = "llvm.vp.reduce.";
vp_name += name;
string vp_name = "llvm.vp.reduce." + name;
codegen(initial_value);
llvm::Value *init = value;
codegen(op->value);