Skip to content

Commit

Permalink
[examples] Fix rvv intrinsic.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghb97 committed Aug 15, 2024
1 parent 7d5ff51 commit 4b87f52
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions examples/RVVExperiment/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,16 @@ rvv-insert-extract-intrinsics-asm:
-mattr=+m,+d,+v -riscv-v-vector-bits-min=256 \
--filetype=asm -o log.s

# TODO: Fix me.
rvv-c-setvl-translate:
@${LOCAL_CLANG} -march=rv64gcv --target=riscv64-unknown-linux-gnu \
--sysroot=${RISCV_GNU_TOOLCHAIN_SYSROOT} --gcc-toolchain=${RISCV_GNU_TOOLCHAIN} \
./rvv-c-setvl.c -fPIC -S -emit-llvm -o log.ll

# TODO: Fix me.
rvv-c-setvl-asm:
@${LOCAL_CLANG} -march=rv64gcv --target=riscv64-unknown-linux-gnu \
--sysroot=${RISCV_GNU_TOOLCHAIN_SYSROOT} --gcc-toolchain=${RISCV_GNU_TOOLCHAIN} \
./rvv-c-setvl.c -fPIC -S -o log.s

# TODO: Fix me.
run-targets += rvv-c-setvl-run
rvv-c-setvl-run:
@${LOCAL_CLANG} -march=rv64gcv --target=riscv64-unknown-linux-gnu \
Expand Down
2 changes: 1 addition & 1 deletion examples/RVVExperiment/rvv-c-setvl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

int main() {
int avl = 70;
int vl = vsetvl_e32m2(avl);
int vl = __riscv_vsetvl_e32m2(avl);
printf("vl: %d\n", vl);

return 0;
Expand Down

0 comments on commit 4b87f52

Please sign in to comment.