]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Change vsetvl tail and mask policy to default policy
authorLehua Ding <lehua.ding@rivai.ai>
Thu, 31 Aug 2023 07:22:57 +0000 (15:22 +0800)
committerLehua Ding <lehua.ding@rivai.ai>
Thu, 31 Aug 2023 10:44:01 +0000 (18:44 +0800)
commite69d050fd990f8e72e19e6dfb1bf7da2f09236f7
tree22567701aa3448254321a5ebf8c2e34721797fcd
parentb5900ad3a55d130ea201b178c9bddd5675743689
RISC-V: Change vsetvl tail and mask policy to default policy

This patch change the vsetvl policy to default policy
(returned by get_prefer_mask_policy and get_prefer_tail_policy) instead
fixed policy. Any policy is now returned, allowing change to agnostic
or undisturbed. In the future, users may be able to control the default
policy, such as keeping agnostic by compiler options.

gcc/ChangeLog:

* config/riscv/riscv-protos.h (IS_AGNOSTIC): Move to here.
* config/riscv/riscv-v.cc (gen_no_side_effects_vsetvl_rtx):
Change to default policy.
* config/riscv/riscv-vector-builtins-bases.cc: Change to default policy.
* config/riscv/riscv-vsetvl.h (IS_AGNOSTIC): Delete.
* config/riscv/riscv.cc (riscv_print_operand): Use IS_AGNOSTIC to test.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/binop_vx_constraint-171.c: Adjust.
* gcc.target/riscv/rvv/base/binop_vx_constraint-173.c: Adjust.
* gcc.target/riscv/rvv/vsetvl/vsetvl-24.c: New test.
gcc/config/riscv/riscv-protos.h
gcc/config/riscv/riscv-v.cc
gcc/config/riscv/riscv-vector-builtins-bases.cc
gcc/config/riscv/riscv-vsetvl.h
gcc/config/riscv/riscv.cc
gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-171.c
gcc/testsuite/gcc.target/riscv/rvv/base/binop_vx_constraint-173.c
gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vsetvl-24.c [new file with mode: 0644]