platform/upstream/gcc.git
23 months agoRISC-V: Add vsext.vf2 C API tests
Ju-Zhe Zhong [Mon, 6 Feb 2023 05:17:04 +0000 (13:17 +0800)]
RISC-V: Add vsext.vf2 C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vsext_vf2-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_m-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_m-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_m-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf2_tumu-3.c: New test.

23 months agoRISC-V: Add vsext.vf4 C API tests
Ju-Zhe Zhong [Mon, 6 Feb 2023 05:15:04 +0000 (13:15 +0800)]
RISC-V: Add vsext.vf4 C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vsext_vf4-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_m-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_m-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_m-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf4_tumu-3.c: New test.

23 months agoRISC-V: Add vsext.vf8 C API tests
Ju-Zhe Zhong [Mon, 6 Feb 2023 05:12:38 +0000 (13:12 +0800)]
RISC-V: Add vsext.vf8 C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vsext_vf8-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_m-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_m-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_m-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vsext_vf8_tumu-3.c: New test.

23 months agoRISC-V: Add vzext.vf2 C API tests
Ju-Zhe Zhong [Mon, 6 Feb 2023 05:11:06 +0000 (13:11 +0800)]
RISC-V: Add vzext.vf2 C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vzext_vf2-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_m-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_m-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_m-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf2_tumu-3.c: New test.

23 months agoRISC-V: Add vzext.vf4 C API tests
Ju-Zhe Zhong [Mon, 6 Feb 2023 05:09:49 +0000 (13:09 +0800)]
RISC-V: Add vzext.vf4 C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vzext_vf4-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_m-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_m-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_m-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf4_tumu-3.c: New test.

23 months agoRISC-V: Add vzext.vf8 C API tests
Ju-Zhe Zhong [Mon, 6 Feb 2023 05:08:39 +0000 (13:08 +0800)]
RISC-V: Add vzext.vf8 C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vzext_vf8-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_m-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_m-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_m-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vzext_vf8_tumu-3.c: New test.

23 months agoRISC-V: Add vsext/vzext C/C++ intrinsic support
Ju-Zhe Zhong [Mon, 6 Feb 2023 05:06:56 +0000 (13:06 +0800)]
RISC-V: Add vsext/vzext C/C++ intrinsic support

gcc/ChangeLog:

* config/riscv/iterators.md: Add sign_extend/zero_extend.
* config/riscv/riscv-vector-builtins-bases.cc (class ext): New class.
(BASE): Ditto.
* config/riscv/riscv-vector-builtins-bases.h: Add vsext/vzext support.
* config/riscv/riscv-vector-builtins-functions.def (vsext): New macro
define.
(vzext): Ditto.
* config/riscv/riscv-vector-builtins-shapes.cc (struct alu_def): Adjust
for vsext/vzext support.
* config/riscv/riscv-vector-builtins-types.def (DEF_RVV_WEXTI_OPS): New
macro define.
(DEF_RVV_QEXTI_OPS): Ditto.
(DEF_RVV_OEXTI_OPS): Ditto.
(DEF_RVV_WEXTU_OPS): Ditto.
(DEF_RVV_QEXTU_OPS): Ditto.
(DEF_RVV_OEXTU_OPS): Ditto.
(vint16mf4_t): Ditto.
(vint16mf2_t): Ditto.
(vint16m1_t): Ditto.
(vint16m2_t): Ditto.
(vint16m4_t): Ditto.
(vint16m8_t): Ditto.
(vint32mf2_t): Ditto.
(vint32m1_t): Ditto.
(vint32m2_t): Ditto.
(vint32m4_t): Ditto.
(vint32m8_t): Ditto.
(vint64m1_t): Ditto.
(vint64m2_t): Ditto.
(vint64m4_t): Ditto.
(vint64m8_t): Ditto.
(vuint16mf4_t): Ditto.
(vuint16mf2_t): Ditto.
(vuint16m1_t): Ditto.
(vuint16m2_t): Ditto.
(vuint16m4_t): Ditto.
(vuint16m8_t): Ditto.
(vuint32mf2_t): Ditto.
(vuint32m1_t): Ditto.
(vuint32m2_t): Ditto.
(vuint32m4_t): Ditto.
(vuint32m8_t): Ditto.
(vuint64m1_t): Ditto.
(vuint64m2_t): Ditto.
(vuint64m4_t): Ditto.
(vuint64m8_t): Ditto.
* config/riscv/riscv-vector-builtins.cc (DEF_RVV_WEXTI_OPS): Ditto.
(DEF_RVV_QEXTI_OPS): Ditto.
(DEF_RVV_OEXTI_OPS): Ditto.
(DEF_RVV_WEXTU_OPS): Ditto.
(DEF_RVV_QEXTU_OPS): Ditto.
(DEF_RVV_OEXTU_OPS): Ditto.
(rvv_arg_type_info::get_base_vector_type): Add sign_exted/zero_extend
support.
(rvv_arg_type_info::get_tree_type): Ditto.
* config/riscv/riscv-vector-builtins.h (enum rvv_base_type): Ditto.
* config/riscv/vector-iterators.md (z): New attribute.
* config/riscv/vector.md (@pred_<optab><mode>_vf2): New pattern.
(@pred_<optab><mode>_vf4): Ditto.
(@pred_<optab><mode>_vf8): Ditto.

23 months agoRISC-V: Add vsadd.vx C++ overloaded API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 08:29:27 +0000 (16:29 +0800)]
RISC-V: Add vsadd.vx C++ overloaded API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vsadd_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vsaddu.vx overloaded API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 08:27:57 +0000 (16:27 +0800)]
RISC-V: Add vsaddu.vx overloaded API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vsaddu_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vssub.vx C++ API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 08:26:06 +0000 (16:26 +0800)]
RISC-V: Add vssub.vx C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vssub_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vssubu.vx C++ API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 08:24:55 +0000 (16:24 +0800)]
RISC-V: Add vssubu.vx C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vssubu_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vsadd.vx C++ API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 08:23:43 +0000 (16:23 +0800)]
RISC-V: Add vsadd.vx C++ API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vsadd_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vsaddu.vx C++ API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 08:22:39 +0000 (16:22 +0800)]
RISC-V: Add vsaddu.vx C++ API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vsaddu_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vssub.vx C API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 08:21:19 +0000 (16:21 +0800)]
RISC-V: Add vssub.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vssub_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vssubu.vx C API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 08:18:27 +0000 (16:18 +0800)]
RISC-V: Add vssubu.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vssubu_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vsadd.vv C API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 02:01:06 +0000 (10:01 +0800)]
RISC-V: Add vsadd.vv C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vsadd_vv-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_m-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_m-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_m-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vsadd_vv_tumu-3.c: New test.

23 months agoRISC-V: Add vsaddu.vv C API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 01:59:55 +0000 (09:59 +0800)]
RISC-V: Add vsaddu.vv C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vsaddu_vv-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_m-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_m-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_m-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vsaddu_vv_tumu-3.c: New test.

23 months agoRISC-V: Add vssub.vv C API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 01:58:51 +0000 (09:58 +0800)]
RISC-V: Add vssub.vv C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vssub_vv-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_m-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_m-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_m-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vssub_vv_tumu-3.c: New test.

23 months agoRISC-V: Add vssubu.vv C API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 01:57:42 +0000 (09:57 +0800)]
RISC-V: Add vssubu.vv C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vssubu_vv-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_m-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_m-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_m-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vssubu_vv_tumu-3.c: New test.

23 months agoRISC-V: Add vssubu.vv C++ API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 01:56:22 +0000 (09:56 +0800)]
RISC-V: Add vssubu.vv C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vssubu_vv-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vv-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vv-3.C: New test.
* g++.target/riscv/rvv/base/vssubu_vv_mu-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vv_mu-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vv_mu-3.C: New test.
* g++.target/riscv/rvv/base/vssubu_vv_tu-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vv_tu-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vv_tu-3.C: New test.
* g++.target/riscv/rvv/base/vssubu_vv_tum-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vv_tum-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vv_tum-3.C: New test.
* g++.target/riscv/rvv/base/vssubu_vv_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vssubu_vv_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vssubu_vv_tumu-3.C: New test.

23 months agoRISC-V: Add vsub.vv C++ API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 01:55:10 +0000 (09:55 +0800)]
RISC-V: Add vsub.vv C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vssub_vv-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vv-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vv-3.C: New test.
* g++.target/riscv/rvv/base/vssub_vv_mu-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vv_mu-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vv_mu-3.C: New test.
* g++.target/riscv/rvv/base/vssub_vv_tu-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vv_tu-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vv_tu-3.C: New test.
* g++.target/riscv/rvv/base/vssub_vv_tum-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vv_tum-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vv_tum-3.C: New test.
* g++.target/riscv/rvv/base/vssub_vv_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vssub_vv_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vssub_vv_tumu-3.C: New test.

23 months agoRISC-V: Add vsaddu.vv C++ API tests.
Ju-Zhe Zhong [Sun, 5 Feb 2023 01:53:50 +0000 (09:53 +0800)]
RISC-V: Add vsaddu.vv C++ API tests.

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vsaddu_vv-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vv-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vv-3.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vv_mu-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vv_mu-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vv_mu-3.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vv_tu-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vv_tu-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vv_tu-3.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vv_tum-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vv_tum-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vv_tum-3.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vv_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vv_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vsaddu_vv_tumu-3.C: New test.

23 months agoRISC-V: Add vsadd.vv C++ API tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 01:51:55 +0000 (09:51 +0800)]
RISC-V: Add vsadd.vv C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vsadd_vv-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vv-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vv-3.C: New test.
* g++.target/riscv/rvv/base/vsadd_vv_mu-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vv_mu-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vv_mu-3.C: New test.
* g++.target/riscv/rvv/base/vsadd_vv_tu-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vv_tu-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vv_tu-3.C: New test.
* g++.target/riscv/rvv/base/vsadd_vv_tum-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vv_tum-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vv_tum-3.C: New test.
* g++.target/riscv/rvv/base/vsadd_vv_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vsadd_vv_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vsadd_vv_tumu-3.C: New test.

23 months agoRISC-V: Add saturating Add && Sub vx constraint tests
Ju-Zhe Zhong [Sun, 5 Feb 2023 01:50:31 +0000 (09:50 +0800)]
RISC-V: Add saturating Add && Sub vx constraint tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/binop_vx_constraint-100.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-101.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-102.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-103.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-104.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-105.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-106.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-107.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-108.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-109.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-110.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-111.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-112.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-113.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-114.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-115.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-116.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-117.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-118.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-119.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-97.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-98.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-99.c: New test.

23 months agoRISC-V: Add saturating Addition && Subtraction C/C++ Support
Ju-Zhe Zhong [Sun, 5 Feb 2023 01:47:38 +0000 (09:47 +0800)]
RISC-V: Add saturating Addition && Subtraction C/C++ Support

gcc/ChangeLog:

* config/riscv/iterators.md: Add saturating Addition && Subtraction.
* config/riscv/riscv-v.cc (has_vi_variant_p): Ditto.
* config/riscv/riscv-vector-builtins-bases.cc (BASE): Ditto.
* config/riscv/riscv-vector-builtins-bases.h: Ditto.
* config/riscv/riscv-vector-builtins-functions.def (vsadd): New def.
(vssub): Ditto.
(vsaddu): Ditto.
(vssubu): Ditto.
* config/riscv/vector-iterators.md (sll.vi): Adjust for Saturating
support.
(sll.vv): Ditto.
(%3,%v4): Ditto.
(%3,%4): Ditto.
* config/riscv/vector.md (@pred_<optab><mode>): New pattern.
(@pred_<optab><mode>_scalar): New pattern.
(*pred_<optab><mode>_scalar): New pattern.
(*pred_<optab><mode>_extended_scalar): New pattern.

23 months agoRISC-V: Add vneg.v C++ API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 23:27:59 +0000 (07:27 +0800)]
RISC-V: Add vneg.v C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vneg_v-1.C: New test.
* g++.target/riscv/rvv/base/vneg_v-2.C: New test.
* g++.target/riscv/rvv/base/vneg_v-3.C: New test.
* g++.target/riscv/rvv/base/vneg_v_mu-1.C: New test.
* g++.target/riscv/rvv/base/vneg_v_mu-2.C: New test.
* g++.target/riscv/rvv/base/vneg_v_mu-3.C: New test.
* g++.target/riscv/rvv/base/vneg_v_tu-1.C: New test.
* g++.target/riscv/rvv/base/vneg_v_tu-2.C: New test.
* g++.target/riscv/rvv/base/vneg_v_tu-3.C: New test.
* g++.target/riscv/rvv/base/vneg_v_tum-1.C: New test.
* g++.target/riscv/rvv/base/vneg_v_tum-2.C: New test.
* g++.target/riscv/rvv/base/vneg_v_tum-3.C: New test.
* g++.target/riscv/rvv/base/vneg_v_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vneg_v_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vneg_v_tumu-3.C: New test.

23 months agoRISC-V: Add vnot.v C++ API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 23:26:41 +0000 (07:26 +0800)]
RISC-V: Add vnot.v C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vnot_v-1.C: New test.
* g++.target/riscv/rvv/base/vnot_v-2.C: New test.
* g++.target/riscv/rvv/base/vnot_v-3.C: New test.
* g++.target/riscv/rvv/base/vnot_v_mu-1.C: New test.
* g++.target/riscv/rvv/base/vnot_v_mu-2.C: New test.
* g++.target/riscv/rvv/base/vnot_v_mu-3.C: New test.
* g++.target/riscv/rvv/base/vnot_v_tu-1.C: New test.
* g++.target/riscv/rvv/base/vnot_v_tu-2.C: New test.
* g++.target/riscv/rvv/base/vnot_v_tu-3.C: New test.
* g++.target/riscv/rvv/base/vnot_v_tum-1.C: New test.
* g++.target/riscv/rvv/base/vnot_v_tum-2.C: New test.
* g++.target/riscv/rvv/base/vnot_v_tum-3.C: New test.
* g++.target/riscv/rvv/base/vnot_v_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vnot_v_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vnot_v_tumu-3.C: New test.

23 months agoRISC-V: Add unary constraint tests.
Ju-Zhe Zhong [Fri, 3 Feb 2023 23:25:22 +0000 (07:25 +0800)]
RISC-V: Add unary constraint tests.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/unop_v_constraint-1.c: New test.

23 months agoRISC-V: Add vneg.v C/C++ API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 23:24:08 +0000 (07:24 +0800)]
RISC-V: Add vneg.v C/C++ API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vneg_v-1.c: New test.
* gcc.target/riscv/rvv/base/vneg_v-2.c: New test.
* gcc.target/riscv/rvv/base/vneg_v-3.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vneg_v_tumu-3.c: New test.

23 months agoRISC-V: Add vnot.v C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 23:22:40 +0000 (07:22 +0800)]
RISC-V: Add vnot.v C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vnot_v-1.c: New test.
* gcc.target/riscv/rvv/base/vnot_v-2.c: New test.
* gcc.target/riscv/rvv/base/vnot_v-3.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_m-1.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_m-2.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_m-3.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vnot_v_tumu-3.c: New test.

23 months agoRISC-V: Add unary C/C++ API support
Ju-Zhe Zhong [Fri, 3 Feb 2023 23:21:15 +0000 (07:21 +0800)]
RISC-V: Add unary C/C++ API support

gcc/ChangeLog:

* config/riscv/iterators.md: Add neg and not.
* config/riscv/riscv-vector-builtins-bases.cc (class unop): New class.
(BASE): Ditto.
* config/riscv/riscv-vector-builtins-bases.h: Ditto.
* config/riscv/riscv-vector-builtins-functions.def (vadd): Rename binop
into alu.
(vsub): Ditto.
(vand): Ditto.
(vor): Ditto.
(vxor): Ditto.
(vsll): Ditto.
(vsra): Ditto.
(vsrl): Ditto.
(vmin): Ditto.
(vmax): Ditto.
(vminu): Ditto.
(vmaxu): Ditto.
(vmul): Ditto.
(vdiv): Ditto.
(vrem): Ditto.
(vdivu): Ditto.
(vremu): Ditto.
(vrsub): Ditto.
(vneg): Ditto.
(vnot): Ditto.
* config/riscv/riscv-vector-builtins-shapes.cc (struct binop_def): Ditto.
(struct alu_def): Ditto.
(SHAPE): Ditto.
* config/riscv/riscv-vector-builtins-shapes.h: Ditto.
* config/riscv/riscv-vector-builtins.cc: Support unary C/C/++.
* config/riscv/vector-iterators.md: New iterator.
* config/riscv/vector.md (@pred_<optab><mode>): New pattern

23 months agoRISC-V: Fix VSETVL PASS bug in exception handling
Ju-Zhe Zhong [Sat, 4 Feb 2023 01:09:30 +0000 (09:09 +0800)]
RISC-V: Fix VSETVL PASS bug in exception handling

gcc/ChangeLog:

* config/riscv/riscv-vsetvl.cc (pass_vsetvl::compute_probabilities): Skip exit block.

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/exception-1.C: New test.

23 months agoDaily bump.
GCC Administrator [Sun, 12 Feb 2023 00:17:22 +0000 (00:17 +0000)]
Daily bump.

23 months agoipa-cp: Punt for too large offsets [PR108605]
Jakub Jelinek [Sat, 11 Feb 2023 14:57:54 +0000 (15:57 +0100)]
ipa-cp: Punt for too large offsets [PR108605]

Seems most of IPA uses unsigned type for byte offsets
ipa-param-manipulation.h:  unsigned unit_offset;
ipa-param-manipulation.h:  unsigned unit_offset;
ipa-param-manipulation.h:  void register_replacement (tree base, unsigned unit_offset, tree replacement);
ipa-param-manipulation.h:  tree lookup_replacement (tree base, unsigned unit_offset);
ipa-param-manipulation.h:                                                   unsigned unit_offset);
ipa-prop.h:  unsigned unit_offset;
ipa-prop.h:  tree get_value (int index, unsigned unit_offset, bool by_ref) const;
ipa-prop.h:  tree get_value (int index, unsigned unit_offset) const;
ipa-prop.h:  const ipa_argagg_value *get_elt (int index, unsigned unit_offset) const;
ipa-cp.cc:ipa_argagg_value_list::get_elt (int index, unsigned unit_offset) const
ipa-cp.cc:  unsigned prev_unit_offset = 0;
ipa-cp.cc:ipa_argagg_value_list::get_value (int index, unsigned unit_offset) const
ipa-cp.cc:ipa_argagg_value_list::get_value (int index, unsigned unit_offset,
ipa-cp.cc:      unsigned other_offset = other.m_elts[i].unit_offset;
ipa-cp.cc:  unsigned prev_unit_offset = 0;
ipa-cp.cc:  unsigned prev_unit_offset = 0;
ipa-cp.cc:      unsigned this_offset = elts[i].unit_offset;
ipa-cp.cc:  unsigned prev_unit_offset = 0;
ipa-cp.cc:        unsigned unit_offset = aglat->offset / BITS_PER_UNIT;
ipa-cp.cc:  unsigned prev_unit_offset = 0;
ipa-param-manipulation.cc:  unsigned unit_offset;
ipa-param-manipulation.cc:isra_get_ref_base_and_offset (tree expr, tree *base_p, unsigned *unit_offset_p)
ipa-param-manipulation.cc:                                                unsigned unit_offset,
ipa-param-manipulation.cc:                                                unsigned unit_offset)
ipa-param-manipulation.cc:ipa_param_body_adjustments::lookup_replacement (tree base, unsigned unit_offset)
ipa-param-manipulation.cc:  unsigned unit_offset;
ipa-prop.cc:      unsigned unit_offset = bit_offset / BITS_PER_UNIT;
ipa-sra.cc:  unsigned unit_offset;
ipa-sra.cc:  unsigned unit_offset;
ipa-sra.cc:                          unsigned unit_offset, unsigned unit_size)
ipa-sra.cc:      unsigned offset = argacc->unit_offset + delta_offset;
so before converting a HOST_WIDE_INT bit offset to unsigned byte offset
we need to punt for too large offsets.  Some places do that, e.g.
isra_get_ref_base_and_offset has
  if (offset < 0 || (offset / BITS_PER_UNIT) > UINT_MAX)
    return false;
but ipa_agg_value_from_jfunc doesn't.

The following patch fixes that.

2023-02-11  Jakub Jelinek  <jakub@redhat.com>

PR ipa/108605
* ipa-cp.cc (ipa_agg_value_from_jfunc): Return NULL_TREE also if
item->offset bit position is too large to be representable as
unsigned int byte position.

* c-c++-common/pr108605.c: New test.

23 months agodoc: Adjust link to WG14 N965
Gerald Pfeifer [Sat, 11 Feb 2023 11:59:10 +0000 (12:59 +0100)]
doc: Adjust link to WG14 N965

gcc/ChangeLog:

* doc/extend.texi (Other Builtins): Adjust link to WG14 N965.

23 months agopr65658.c: fix excess warnings on LLP64 targets
Jonathan Yong [Sat, 28 Jan 2023 18:12:50 +0000 (18:12 +0000)]
pr65658.c: fix excess warnings on LLP64 targets

gcc/testsuite/ChangeLog:

* gcc.dg/pr65658.c: fix LLP64 test.

Signed-off-by: Jonathan Yong <10walls@gmail.com>
23 months agogcc/testsuite: fix excess warnings for mingw-w64
Jonathan Yong [Sat, 28 Jan 2023 16:49:27 +0000 (16:49 +0000)]
gcc/testsuite: fix excess warnings for mingw-w64

gcc/testsuite/ChangeLog:

* c-c++-common/Wsizeof-array-div1.c: fix excess warnings.
* gcc.dg/Warray-bounds-52.c: ditto
* gcc.dg/Wstringop-overflow-62.c: ditto
* gcc.dg/attr-vector_size.c: ditto
* gcc.dg/overflow-warn-9.c: ditto

Signed-off-by: Jonathan Yong <10walls@gmail.com>
23 months agolibstdc++: Update link to "Worst-case efficient priority queues"
Gerald Pfeifer [Sat, 11 Feb 2023 08:00:01 +0000 (09:00 +0100)]
libstdc++: Update link to "Worst-case efficient priority queues"

libstdc++-v3/ChangeLog:

* doc/xml/manual/policy_data_structures_biblio.xml: Update
link to "Worst-case efficient priority queues".
* doc/html/manual/policy_data_structures.html: Regenerate.

23 months agolibiberty: fix lrealpath on Windows NTFS symlinks
niXman [Sat, 11 Feb 2023 06:18:10 +0000 (06:18 +0000)]
libiberty: fix lrealpath on Windows NTFS symlinks

gcc computes the wrong prefix if invoked through an NTFS
symlink. Try to resolve it if possible.

PR/108350

libiberty/ChangeLog:

* lrealpath.c (lrealpath): try to resolve symlink and
use UNC paths where applicable.

Signed-off-by: Jonathan Yong <10walls@gmail.com>
23 months agoDaily bump.
GCC Administrator [Sat, 11 Feb 2023 00:17:31 +0000 (00:17 +0000)]
Daily bump.

23 months agoanalyzer: don't warn for deref-before-check for checks in macros [PR108745]
David Malcolm [Fri, 10 Feb 2023 23:10:21 +0000 (18:10 -0500)]
analyzer: don't warn for deref-before-check for checks in macros [PR108745]

Integration testing shows this patch fixes all 9 known false positives
from -Wanalyzer-deref-before-check within ImageMagick-7.1.0-57, and
eliminates 34 further as-yet unassessed such diagnostics, without
eliminating the 1 known true positive.

This improves the rate of true positives for the warning from
1.56% to 4.76% of the total:

-Wanalyzer-deref-before-check: 1.56% -> 4.76% (GOOD: 1 BAD: 63->20)
    TRUE:  1
   FALSE: 15 ->  6 (-9)
             ImageMagick-7.1.0-57:  9 ->  0 (-9)
    TODO: 48 -> 14 (-34)
             ImageMagick-7.1.0-57: 21 ->  1 (-20)
                       qemu-7.2.0: 25 -> 11 (-14)

gcc/analyzer/ChangeLog:
PR analyzer/108745
* sm-malloc.cc (deref_before_check::emit): Reject the warning if
the check occurs within a macro defintion.

gcc/testsuite/ChangeLog:
PR analyzer/108745
* gcc.dg/analyzer/deref-before-check-macro-pr108745.c: New test.
* gcc.dg/analyzer/deref-before-check-macro.c: New test.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
23 months agoRegenerate .pot files
Joseph Myers [Fri, 10 Feb 2023 22:42:43 +0000 (22:42 +0000)]
Regenerate .pot files

gcc/po/
* gcc.pot: Regenerate.

libcpp/po/
* cpplib.pot: Regenerate.

23 months agoRA: Use caller save equivalent memory only for LRA
Vladimir N. Makarov [Fri, 10 Feb 2023 17:17:07 +0000 (12:17 -0500)]
RA: Use caller save equivalent memory only for LRA

Recently I submitted a patch to reuse memory with constant address for
caller saves optimization for constant or pure function call.  It
seems to work only for targets using LRA instead of the old reload
pass.  So the patch switches off this optimization when the old reload
pass is used.

        PR middle-end/108754

gcc/ChangeLog:

* ira.cc (update_equiv_regs): Set up ira_reg_equiv for
valid_combine only when ira_use_lra_p is true.

23 months agoRA: Use simple LRA for huge functions
Vladimir N. Makarov [Fri, 10 Feb 2023 16:12:37 +0000 (11:12 -0500)]
RA: Use simple LRA for huge functions

The PR108500 test contains a huge function and RA spends a lot of time
to compile the test with -O0.  The patch decreases compilation time
considerably for huge functions.  Compilation time for the PR test
decreases from 1235s to 709s on Intel i7-13600K.

        PR tree-optimization/108500

gcc/ChangeLog:

* params.opt (ira-simple-lra-insn-threshold): Add new param.
* ira.cc (ira): Use the param to switch on simple LRA.

23 months agoQuery rangers cache in readonly mode only from within
Andrew MacLeod [Thu, 9 Feb 2023 22:50:07 +0000 (17:50 -0500)]
Query rangers cache in readonly mode only from within

The change for 108356 allowed the cache to scan the dominator trees when
it was attempting a lookup rather than using the local value.  I
inadvertantly changed the externbal interface to also do this, so all
the GORI queries via range_on_edge of the cache could also do lookups.

This triggered a quadratic, possible expoential time increase when
the right conditions were presented. That being a cascading series of
recomputaions on outgoing edge calucaltions that at then searched the dom tree
instead of being a simple calcualtion using whats easily available.

The fix is to use the internal API within the cache rather than the
extrenal one that GORI uses.   This leaves GORI computations to be
resovled in linear time.

PR tree-optimization/108687
gcc/
* gimple-range-cache.cc (ranger_cache::range_on_edge): Revert
back to RFD_NONE mode for calculations.
(ranger_cache::propagate_cache): Call the internal edge range API
with RFD_READ_ONLY instead of changing the external routine.

23 months agoAdd function context for querying global ranges.
Andrew MacLeod [Mon, 6 Feb 2023 18:07:01 +0000 (13:07 -0500)]
Add function context for querying global ranges.

When processing arguments for assume functions, call get_global_range
directly and utilize a function context pointer to avoid any assumptions
about using cfun.

PR tree-optimization/108520
gcc/
* gimple-range-infer.cc (check_assume_func): Invoke
gimple_range_global directly instead using global_range_query.
* value-query.cc (get_range_global): Add function context and
avoid calling nonnull_arg_p if not cfun.
(gimple_range_global): Add function context pointer.
* value-query.h (imple_range_global): Add function context.

gcc/testsuite/
* g++.dg/pr108520.C: New.

23 months agoRISC-V: Add vand.vx C++ API test.
Ju-Zhe Zhong [Fri, 3 Feb 2023 08:14:05 +0000 (16:14 +0800)]
RISC-V: Add vand.vx C++ API test.

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vand_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vand_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vand_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vand_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vand_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vand_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vand_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vand_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vand_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vand_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vand_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vand_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vand_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vdiv.vx C++ API test.
Ju-Zhe Zhong [Fri, 3 Feb 2023 08:12:57 +0000 (16:12 +0800)]
RISC-V: Add vdiv.vx C++ API test.

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vdiv_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vdiv_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vdivu.vx C++ API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 08:11:38 +0000 (16:11 +0800)]
RISC-V: Add vdivu.vx C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vdivu_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vdivu_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vmax.vx C++ API tests.
Ju-Zhe Zhong [Fri, 3 Feb 2023 08:09:32 +0000 (16:09 +0800)]
RISC-V: Add vmax.vx C++ API tests.

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vmax_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmax_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vmaxu.vx C++ API tests.
Ju-Zhe Zhong [Fri, 3 Feb 2023 08:00:35 +0000 (16:00 +0800)]
RISC-V: Add vmaxu.vx C++ API tests.

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vmaxu_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmaxu_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vmin.vx C++ API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:58:30 +0000 (15:58 +0800)]
RISC-V: Add vmin.vx C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vmin_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmin_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vminu.vx C++ API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:57:12 +0000 (15:57 +0800)]
RISC-V: Add vminu.vx C++ API tests

  gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vminu_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vminu_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vmul.vx C++ API testcase
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:53:15 +0000 (15:53 +0800)]
RISC-V: Add vmul.vx C++ API testcase

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vmul_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vor.vx C++ API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:51:54 +0000 (15:51 +0800)]
RISC-V: Add vor.vx C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vor_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vor_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vor_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vor_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vor_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vor_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vor_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vor_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vor_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vor_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vor_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vor_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vor_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vrem.vx C++ API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:50:42 +0000 (15:50 +0800)]
RISC-V: Add vrem.vx C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vrem_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vrem_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vremu.vx C++ API tests.
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:49:11 +0000 (15:49 +0800)]
RISC-V: Add vremu.vx C++ API tests.

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vremu_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vremu_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vadd.vx C++ API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:45:23 +0000 (15:45 +0800)]
RISC-V: Add vadd.vx C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vadd_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vadd_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vrsub.vx C++ API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:43:18 +0000 (15:43 +0800)]
RISC-V: Add vrsub.vx C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vrsub_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vrsub_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vsub.vx C++ API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:42:07 +0000 (15:42 +0800)]
RISC-V: Add vsub.vx C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vsub_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vsub_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add vxor.vx C++ API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:40:24 +0000 (15:40 +0800)]
RISC-V: Add vxor.vx C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vxor_vx_mu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_mu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_mu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_mu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_mu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_mu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tu_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tum_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tum_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tum_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tum_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tum_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tum_rv64-3.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tumu_rv32-1.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tumu_rv32-2.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tumu_rv32-3.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tumu_rv64-1.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tumu_rv64-2.C: New test.
* g++.target/riscv/rvv/base/vxor_vx_tumu_rv64-3.C: New test.

23 months agoRISC-V: Add binary op vx constraint tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:37:16 +0000 (15:37 +0800)]
RISC-V: Add binary op vx constraint tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/binop_vx_constraint-1.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-10.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-11.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-12.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-13.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-14.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-15.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-16.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-17.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-18.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-19.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-2.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-20.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-21.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-22.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-23.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-24.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-25.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-26.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-27.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-28.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-29.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-3.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-30.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-31.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-32.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-33.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-34.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-35.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-36.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-37.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-38.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-39.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-4.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-40.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-41.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-42.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-43.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-44.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-45.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-46.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-47.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-48.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-49.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-5.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-50.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-51.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-52.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-53.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-54.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-55.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-56.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-57.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-58.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-59.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-6.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-60.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-61.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-62.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-63.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-64.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-65.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-66.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-67.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-68.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-69.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-7.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-70.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-71.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-72.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-73.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-74.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-75.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-76.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-77.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-78.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-79.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-8.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-80.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-81.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-82.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-83.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-84.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-85.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-86.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-87.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-88.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-89.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-9.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-90.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-91.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-92.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-93.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-94.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-95.c: New test.
* gcc.target/riscv/rvv/base/binop_vx_constraint-96.c: New test.

23 months agoRISC-V: Add vadd.vx C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:35:52 +0000 (15:35 +0800)]
RISC-V: Add vadd.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vadd_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vadd_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vand.vx C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:34:31 +0000 (15:34 +0800)]
RISC-V: Add vand.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vand_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vand_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vdiv.vx C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:30:24 +0000 (15:30 +0800)]
RISC-V: Add vdiv.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vdiv_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vdiv_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vdivu C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:24:58 +0000 (15:24 +0800)]
RISC-V: Add vdivu C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vdivu_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vdivu_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vmax.vx C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:23:38 +0000 (15:23 +0800)]
RISC-V: Add vmax.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vmax_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmax_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vmaxu.vx C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:22:24 +0000 (15:22 +0800)]
RISC-V: Add vmaxu.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vmaxu_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmaxu_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vmin.vx C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:20:38 +0000 (15:20 +0800)]
RISC-V: Add vmin.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vmin_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmin_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vminu.vx C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:18:11 +0000 (15:18 +0800)]
RISC-V: Add vminu.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vminu_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vminu_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vmul.vx C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:15:08 +0000 (15:15 +0800)]
RISC-V: Add vmul.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vmul_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vor.vx C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:13:51 +0000 (15:13 +0800)]
RISC-V: Add vor.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vor_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vor_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vrem.vx C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:11:52 +0000 (15:11 +0800)]
RISC-V: Add vrem.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vrem_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vrem_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vremu.vx C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:10:25 +0000 (15:10 +0800)]
RISC-V: Add vremu.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vremu_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vremu_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vrsub.vx C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:08:18 +0000 (15:08 +0800)]
RISC-V: Add vrsub.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vrsub_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vrsub_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vsub.vx C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:06:22 +0000 (15:06 +0800)]
RISC-V: Add vsub.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vsub_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vsub_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vxor.vx C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:04:49 +0000 (15:04 +0800)]
RISC-V: Add vxor.vx C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vxor_vx_m_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_m_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_m_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_m_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_m_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_m_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_mu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_mu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_mu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_mu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_mu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_mu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tu_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tum_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tum_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tum_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tum_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tum_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tum_rv64-3.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tumu_rv32-1.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tumu_rv32-2.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tumu_rv32-3.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tumu_rv64-1.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tumu_rv64-2.c: New test.
* gcc.target/riscv/rvv/base/vxor_vx_tumu_rv64-3.c: New test.

23 months agoRISC-V: Add vmul.vv C++ API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:02:54 +0000 (15:02 +0800)]
RISC-V: Add vmul.vv C++ API tests

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/base/vmul_vv-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vv-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vv-3.C: New test.
* g++.target/riscv/rvv/base/vmul_vv_mu-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vv_mu-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vv_mu-3.C: New test.
* g++.target/riscv/rvv/base/vmul_vv_tu-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vv_tu-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vv_tu-3.C: New test.
* g++.target/riscv/rvv/base/vmul_vv_tum-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vv_tum-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vv_tum-3.C: New test.
* g++.target/riscv/rvv/base/vmul_vv_tumu-1.C: New test.
* g++.target/riscv/rvv/base/vmul_vv_tumu-2.C: New test.
* g++.target/riscv/rvv/base/vmul_vv_tumu-3.C: New test.

23 months agoRISC-V: Add vmul.vv C API tests
Ju-Zhe Zhong [Fri, 3 Feb 2023 07:00:48 +0000 (15:00 +0800)]
RISC-V: Add vmul.vv C API tests

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/vmul_vv-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_m-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_m-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_m-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_mu-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_mu-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_mu-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_tu-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_tu-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_tu-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_tum-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_tum-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_tum-3.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_tumu-1.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_tumu-2.c: New test.
* gcc.target/riscv/rvv/base/vmul_vv_tumu-3.c: New test.

23 months agoRISC-V: Add binary vx C/C++ support
Ju-Zhe Zhong [Fri, 3 Feb 2023 06:56:05 +0000 (14:56 +0800)]
RISC-V: Add binary vx C/C++ support

gcc/ChangeLog:

* config/riscv/constraints.md (Wdm): Adjust constraint.
(Wbr): New constraint.
* config/riscv/predicates.md (reg_or_int_operand): New predicate.
* config/riscv/riscv-protos.h (emit_pred_op): Remove function.
(emit_vlmax_op): New function.
(emit_nonvlmax_op): Ditto.
(simm32_p): Ditto.
(neg_simm5_p): Ditto.
(has_vi_variant_p): Ditto.
* config/riscv/riscv-v.cc (emit_pred_op): Adjust function.
(emit_vlmax_op): New function.
(emit_nonvlmax_op): Ditto.
(expand_const_vector): Adjust function.
(legitimize_move): Ditto.
(simm32_p): New function.
(simm5_p): Ditto.
(neg_simm5_p): Ditto.
(has_vi_variant_p): Ditto.
* config/riscv/riscv-vector-builtins-bases.cc (class vrsub): New class.
(BASE): Ditto.
* config/riscv/riscv-vector-builtins-bases.h: Ditto.
* config/riscv/riscv-vector-builtins-functions.def (vmin): Remove
unsigned cases.
(vmax): Ditto.
(vminu): Remove signed cases.
(vmaxu): Ditto.
(vdiv): Remove unsigned cases.
(vrem): Ditto.
(vdivu): Remove signed cases.
(vremu): Ditto.
(vadd): Adjust.
(vsub): Ditto.
(vrsub): New class.
(vand): Adjust.
(vor): Ditto.
(vxor): Ditto.
(vmul): Ditto.
* config/riscv/riscv-vector-builtins.cc (DEF_RVV_U_OPS): New macro.
* config/riscv/riscv.h: change VL/VTYPE as fixed reg.
* config/riscv/vector-iterators.md: New iterators.
* config/riscv/vector.md (@pred_broadcast<mode>): Adjust pattern for vx
support.
(@pred_<optab><mode>_scalar): New pattern.
(@pred_sub<mode>_reverse_scalar): Ditto.
(*pred_<optab><mode>_scalar): Ditto.
(*pred_<optab><mode>_extended_scalar): Ditto.
(*pred_sub<mode>_reverse_scalar): Ditto.
(*pred_sub<mode>_extended_reverse_scalar): Ditto.

23 months agotree-optimization/108724 - vectorized code getting piecewise expanded
Richard Biener [Fri, 10 Feb 2023 10:07:30 +0000 (11:07 +0100)]
tree-optimization/108724 - vectorized code getting piecewise expanded

This fixes an oversight to when removing the hard limits on using
generic vectors for the vectorizer to enable both SLP and BB
vectorization to use those.  The vectorizer relies on vector lowering
to expand plus, minus and negate to bit operations but vector
lowering has a hard limit on the minimum number of elements per
work item.  Vectorizer costs for the testcase at hand work out
to vectorize a loop with just two work items per vector and that
causes element wise expansion and spilling.

The fix for now is to re-instantiate the hard limit, matching what
vector lowering does.  For the future the way to go is to emit the
lowered sequence directly from the vectorizer instead.

PR tree-optimization/108724
* tree-vect-stmts.cc (vectorizable_operation): Avoid
using word_mode vectors when vector lowering will
decompose them to elementwise operations.

* gcc.target/i386/pr108724.c: New testcase.

23 months agoRevert "docs: add caveat for __builtin_cpu_supports"
Jakub Jelinek [Fri, 10 Feb 2023 10:46:37 +0000 (11:46 +0100)]
Revert "docs: add caveat for __builtin_cpu_supports"

This reverts commit 1189d1b38e2b9507488ea294cda771c79e972c1d.

23 months agoAdd x86_64-gnu target to contrib/config-list.mk
Flavio Cruz [Thu, 2 Feb 2023 05:55:01 +0000 (00:55 -0500)]
Add x86_64-gnu target to contrib/config-list.mk

contrib/ChangeLog:
* config-list.mk: Add x86_64-gnu to list of archs.

Signed-off-by: Flavio Cruz <flaviocruz@gmail.com>
23 months agotree-optimization: [PR108684] ICE in verify_ssa due to simple_dce_from_worklist
Andrew Pinski [Tue, 7 Feb 2023 23:09:40 +0000 (23:09 +0000)]
tree-optimization: [PR108684] ICE in verify_ssa due to simple_dce_from_worklist

In simple_dce_from_worklist, we were removing an inline-asm which had a vdef.
We should not be removing inline-asm which have a vdef as this code
does not check to the store.
This fixes that oversight. This was a latent bug exposed recently
by both VRP and removal of stores to static starting to use
simple_dce_from_worklist.

Committed as approved.
Bootstrapped and tested on x86_64-linux-gnu with no regressions.

PR tree-optimization/108684

gcc/ChangeLog:

* tree-ssa-dce.cc (simple_dce_from_worklist):
Check all ssa names and not just non-vdef ones
before accepting the inline-asm.
Call unlink_stmt_vdef on the statement before
removing it.

gcc/testsuite/ChangeLog:

* gcc.c-torture/compile/dce-inline-asm-1.c: New test.
* gcc.c-torture/compile/dce-inline-asm-2.c: New test.
* gcc.dg/tree-ssa/pr108684-1.c: New test.

co-authored-by: Andrew Macleod  <amacleod@redhat.com>

23 months agoc: Allow conversions of null pointer constants to nullptr_t
Joseph Myers [Fri, 10 Feb 2023 00:42:47 +0000 (00:42 +0000)]
c: Allow conversions of null pointer constants to nullptr_t

WG14 has agreed to allow conversions (explicit and implicit) from null
pointer constants to nullptr_t; update GCC's nullptr_t implementation
to match.

Bootstrapped with no regressions for x86_64-pc-linux-gnu.

gcc/c/
* c-convert.cc (c_convert): Allow conversion of a null pointer
constant to nullptr_t.
* c-typeck.cc (null_pointer_constant_p): Remove static.
(convert_for_assignment): Allow conversion of a null pointer
constant to nullptr_t.
(digest_init): Handle NULLPTR_TYPE among scalar conversions.
* c-tree.h (null_pointer_constant_p): Declare.

gcc/testsuite/
* gcc.dg/c2x-nullptr-1.c: Test conversion of null pointer
constants to nullptr_t.
* gcc.dg/c2x-nullptr-3.c: Do not expect errors for conversion of
null pointer constants to nullptr_t.  Do test errors for
conversion of other values to nullptr_t and for unary '+' on
nullptr_t.

23 months agotestsuite: XFAIL g++.dg/pr71488.C and warn/Warray-bounds-16.C, PR107561
Hans-Peter Nilsson [Thu, 2 Feb 2023 19:35:52 +0000 (20:35 +0100)]
testsuite: XFAIL g++.dg/pr71488.C and warn/Warray-bounds-16.C, PR107561

These appear as regressions from a baseline before
r13-3761-ga239a63f868e29.  See the PR trail.

Note that the warning for g++.dg/pr71488.C is for a *header*
file, thus we can't match the line number (sanely).

gcc/testsuite:

PR tree-optimization/107561
* g++.dg/warn/Warray-bounds-16.C: XFAIL bogus "overflows destination"
warning.
* g++.dg/pr71488.C: Ditto, but just for ilp32 targets.

23 months agotestsuite: XFAIL bogus g++.dg/warn/Wstringop-overflow-4.C:144, PR106120
Hans-Peter Nilsson [Tue, 7 Feb 2023 16:28:50 +0000 (17:28 +0100)]
testsuite: XFAIL bogus g++.dg/warn/Wstringop-overflow-4.C:144, PR106120

There was a commit r13-2082-gbf13a13c65bd06 "c++: remove some xfails"
(not referencing the PR) that dealt with part of the PR, but didn't
xfail the ilp32-specific (bogus) warning mentioned in the PR.

PR testsuite/106120
* g++.dg/warn/Wstringop-overflow-4.C:144 XFAIL bogus warning for
ilp32 targets with c++98.

23 months agoDaily bump.
GCC Administrator [Fri, 10 Feb 2023 00:17:42 +0000 (00:17 +0000)]
Daily bump.

23 months agoc++: ICE initing lifetime-extended constexpr var [PR107079]
Marek Polacek [Wed, 8 Feb 2023 19:02:48 +0000 (14:02 -0500)]
c++: ICE initing lifetime-extended constexpr var [PR107079]

We ICE on the simple:

  struct X { const X* x = this; };
  constexpr const X& x = X{};

where store_init_value initializes 'x' with

  &TARGET_EXPR <D.2768, {.x=(const struct X *) &<PLACEHOLDER_EXPR struct X>}>

but we must lifetime-extend via extend_ref_init_temps and we get

  _ZGR1x_.x = (const struct X *) &<PLACEHOLDER_EXPR struct X> >>>;, (const struct X &) &_ZGR1x_;

Since 'x' was declared constexpr, we do cxx_constant_init and we hit
the preeval code added in r269003 while evaluating the INIT_EXPR:

  _ZGR1x_.x = (const struct X *) &<PLACEHOLDER_EXPR struct X> >>>

but we have no ctx.ctor or ctx.object here so lookup_placeholder won't
find anything that could replace X and we ICE on
 7861       /* A placeholder without a referent.  We can get here when
 7862          checking whether NSDMIs are noexcept, or in massage_init_elt;
 7863          just say it's non-constant for now.  */
 7864       gcc_assert (ctx->quiet);
because cxx_constant_init means !ctx->quiet.  It's not correct that
there isn't a referent.  I think the following patch is a pretty
straightforward fix: pass the _ZGR var down to maybe_constant_init so
that it can replace the PLACEHOLDER_EXPR with _ZGR1x_.

The commented assert in the test doesn't pass: we complain that _ZGR1x_
isn't a constexpr variable because we don't implement DR2126 (PR101588).

PR c++/107079

gcc/cp/ChangeLog:

* call.cc (set_up_extended_ref_temp): Pass var to maybe_constant_init.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/constexpr-nsdmi2.C: New test.

23 months agoanalyzer: fix further overzealous state purging [PR108733]
David Malcolm [Thu, 9 Feb 2023 22:09:51 +0000 (17:09 -0500)]
analyzer: fix further overzealous state purging [PR108733]

PR analyzer/108733 reports various false positives in qemu from
-Wanalyzer-use-of-uninitialized-value with __attribute__((cleanup))
at -O1 and above.

Root cause is that the state-purging code was failing to treat:
   _25 = MEM[(void * *)&val];
as a usage of "val", leading to it erroneously purging the
initialization of "val" along an execution path that didn't otherwise
use "val", apart from the  __attribute__((cleanup)).

Fixed thusly.

Integration testing on the patch show this change in the number of
diagnostics:
  -Wanalyzer-use-of-uninitialized-value
       coreutils-9.1: 18 -> 16 (-2)
          qemu-7.2.0: 87 -> 80 (-7)
where all that I investigated appear to have been false positives, hence
an improvement.

gcc/analyzer/ChangeLog:
PR analyzer/108733
* state-purge.cc (get_candidate_for_purging): Add ADDR_EXPR
and MEM_REF.

gcc/testsuite/ChangeLog:
PR analyzer/108733
* gcc.dg/analyzer/torture/uninit-pr108733.c: New test.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
23 months agoRA: Implement reuse of equivalent memory for caller saves optimization (2nd version)
Vladimir N. Makarov [Thu, 9 Feb 2023 20:18:48 +0000 (15:18 -0500)]
RA: Implement reuse of equivalent memory for caller saves optimization (2nd version)

The test pr103541.c shows opportunity to reuse memory with constant address for
caller saves optimization for constant or pure function call.  The patch
implements the memory reuse.

        PR rtl-optimization/103541
        PR rtl-optimization/108711

gcc/ChangeLog:

* ira.h (struct ira_reg_equiv_s): Add new field caller_save_p.
* ira.cc (validate_equiv_mem): Check memref address variance.
(no_equiv): Clear caller_save_p flag.
(update_equiv_regs): Define caller save equivalence for
valid_combine.
(setup_reg_equiv): Clear defined_p flag for caller save equivalence.
* lra-constraints.cc (lra_copy_reg_equiv): Add new arg
call_save_p.  Use caller save equivalence depending on the arg.
(split_reg): Adjust the call.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pr103541.c: New.
* g++.target/i386/pr108711.C: New.

23 months agoFortran: catch invalid kind in character conversion [PR69636,PR103779]
Harald Anlauf [Thu, 9 Feb 2023 20:16:14 +0000 (21:16 +0100)]
Fortran: catch invalid kind in character conversion [PR69636,PR103779]

gcc/fortran/ChangeLog:

PR fortran/69636
PR fortran/103779
* intrinsic.cc (gfc_convert_chartype): Recover on invalid character
kind in conversion instead of generating an internal error.

gcc/testsuite/ChangeLog:

PR fortran/69636
PR fortran/103779
* gfortran.dg/pr103779.f90: New test.

Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
23 months agoi386: Call get_available_features for all CPUs with max_level >= 1 [PR100758]
Jakub Jelinek [Thu, 9 Feb 2023 16:43:19 +0000 (17:43 +0100)]
i386: Call get_available_features for all CPUs with max_level >= 1 [PR100758]

get_available_features doesn't depend on cpu_model2->__cpu_{family,model}
and just sets stuff up based on CPUID leaf 1, or some extended ones,
so I wonder why are we calling it separately for Intel, AMD and Zhaoxin
and not for all other CPUs too?  I think various programs in the wild
which aren't using __builtin_cpu_{is,supports} just check the various CPUID
leafs and query bits in there, without blacklisting unknown CPU vendors,
so I think even __builtin_cpu_supports ("sse2") etc. should be reliable
if those VENDOR_{CENTAUR,CYRIX,NSC,OTHER} CPUs set those bits in CPUID leaf
1 or some extended ones.  Calling it for all CPUs also means it can be
inlined because there will be just a single caller.

I have tested it on Intel and Martin tested it on AMD, but can't test it
on non-Intel/AMD; for Intel/AMD/Zhaoxin it should be really no change in
behavior.

2023-02-09  Jakub Jelinek  <jakub@redhat.com>

PR target/100758
* common/config/i386/cpuinfo.h (get_zhaoxin_cpu): Formatting fixes.
(cpu_indicator_init): Call get_available_features for all CPUs with
max_level >= 1, rather than just Intel, AMD or Zhaoxin.  Formatting
fixes.

23 months agomatch.pd: Simplify BFR of insert when extracting exactly all inserted bits [PR108688]
Jakub Jelinek [Thu, 9 Feb 2023 15:07:40 +0000 (16:07 +0100)]
match.pd: Simplify BFR of insert when extracting exactly all inserted bits [PR108688]

On Thu, Feb 09, 2023 at 09:16:17AM +0100, Richard Biener via Gcc-patches wrote:
> Hmm.  Can we handle the case of the extraction exactly covering the
> insertion separately then and simplify to plain @1?

I was suggesting that in the PR.  Here it is as an incremental patch
on top of Andrew's patch.

On the newly added testcase the ifcvt-folding difference without/with the
incremental patch is:
--- pr108688.c.171t.ifcvt_      2023-02-09 10:47:30.169916845 +0100
+++ pr108688.c.171t.ifcvt       2023-02-09 10:48:44.942793453 +0100
@@ -25,6 +25,8 @@ Number of blocks in CFG: 11
 Number of blocks to update: 5 ( 45%)

+Applying pattern match.pd:7487, gimple-match.cc:243200
+Applying pattern match.pd:3987, gimple-match.cc:75423
 Matching expression match.pd:1677, gimple-match.cc:209
 Applying pattern match.pd:1733, gimple-match.cc:109481
 Matching expression match.pd:2393, gimple-match.cc:852
@@ -70,7 +72,6 @@ void foo ()
   signed char _29;
   <unnamed-signed:7> _30;
   unsigned int ivtmp_33;
-  <unnamed-signed:7> _ifc__35;
   unsigned char _ifc__37;
   unsigned char _ifc__38;
   unsigned char _ifc__39;
@@ -91,8 +92,7 @@ void foo ()
   _2 = (<unnamed-signed:7>) a.0_1;
   _ifc__38 = u.D.2741;
   _ifc__39 = BIT_INSERT_EXPR <_ifc__38, _2, 0 (7 bits)>;
-  _ifc__35 = BIT_FIELD_REF <_ifc__39, 7, 0>;
-  _4 = (signed char) _ifc__35;
+  _4 = (signed char) _2;
   b.1_5 = b;
   _6 = (signed char) b.1_5;
   _7 = _4 ^ _6;

2023-02-09  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/108688
* match.pd (bit_field_ref [bit_insert]): Simplify BIT_FIELD_REF
of BIT_INSERT_EXPR extracting exactly all inserted bits even
when without mode precision.  Formatting fixes.

* gcc.c-torture/compile/pr108688-1.c: Add PR number as comment.
* gcc.dg/pr108688.c: New test.

23 months agomatch.pd: When simplifying BFR of an insert, require a mode precision integral type...
Andrew Pinski [Thu, 9 Feb 2023 15:03:54 +0000 (16:03 +0100)]
match.pd: When simplifying BFR of an insert, require a mode precision integral type [PR108688]

The same problem as PR 88739 has crept in but
this time in match.pd when simplifying bit_field_ref of
an bit_insert. That is we are generating a BIT_FIELD_REF
of a non-mode-precision integral type.

PR tree-optimization/108688
* match.pd (bit_field_ref [bit_insert]): Avoid generating
BIT_FIELD_REFs of non-mode-precision integral operands.

* gcc.c-torture/compile/pr108688-1.c: New test.

23 months agoOpenMP/Fortran: Partially fix non-rect loop nests [PR107424]
Tobias Burnus [Thu, 9 Feb 2023 14:51:13 +0000 (15:51 +0100)]
OpenMP/Fortran: Partially fix non-rect loop nests [PR107424]

This patch ensures that loop bounds depending on outer loop vars use the
proper TREE_VEC format. It additionally gives a sorry if such an outer
var has a non-one/non-minus-one increment as currently a count variable
is used in this case (see PR).

Finally, it avoids 'count' and just uses a local loop variable if the
step increment is +/-1.

PR fortran/107424

gcc/fortran/ChangeLog:

* trans-openmp.cc (struct dovar_init_d): Add 'sym' and
'non_unit_incr' members.
(gfc_nonrect_loop_expr): New.
(gfc_trans_omp_do): Call it; use normal loop bounds
for unit stride - and only create local loop var.

libgomp/ChangeLog:

* testsuite/libgomp.fortran/non-rectangular-loop-1.f90: New test.
* testsuite/libgomp.fortran/non-rectangular-loop-1a.f90: New test.
* testsuite/libgomp.fortran/non-rectangular-loop-2.f90: New test.
* testsuite/libgomp.fortran/non-rectangular-loop-3.f90: New test.
* testsuite/libgomp.fortran/non-rectangular-loop-4.f90: New test.
* testsuite/libgomp.fortran/non-rectangular-loop-5.f90: New test.

gcc/testsuite/ChangeLog:

* gfortran.dg/goacc/privatization-1-compute-loop.f90: Update dg-note.
* gfortran.dg/goacc/privatization-1-routine_gang-loop.f90: Likewise.

23 months agodocs: add caveat for __builtin_cpu_supports
Martin Liska [Thu, 9 Feb 2023 10:33:31 +0000 (11:33 +0100)]
docs: add caveat for __builtin_cpu_supports

Document that the function does not work correctly for old
VIA processors.

PR target/100758

gcc/ChangeLog:

* doc/extend.texi: Document that the function
does not work correctly for old VIA processors.

23 months agoOpenMP: Parse align clause in allocate directive in C/C++
Tobias Burnus [Thu, 9 Feb 2023 10:40:29 +0000 (11:40 +0100)]
OpenMP: Parse align clause in allocate directive in C/C++

gcc/c/ChangeLog:

* c-parser.cc (c_parser_omp_allocate): Parse align
clause and check for restrictions.

gcc/cp/ChangeLog:

* parser.cc (cp_parser_omp_allocate): Parse align
clause and check for restrictions.

gcc/testsuite/ChangeLog:

* c-c++-common/gomp/allocate-5.c: Extend for align clause.

23 months agoFortran/OpenMP: Fix -fopenmp-simd for 'omp assume(s)'
Tobias Burnus [Thu, 9 Feb 2023 09:58:00 +0000 (10:58 +0100)]
Fortran/OpenMP: Fix -fopenmp-simd for 'omp assume(s)'

While 'omp assume' is enabled by -fopenmp-simd, 'omp assumes' is not;
however, due to the way parsing works in Fortran (esp. for fixed-form
source code), 'assumes' was parsed by 'assume' which then stumbled over
the tailing 's'.

gcc/fortran/

* parse.cc (decode_omp_directive): Really ignore 'assumes' with
-fopenmp-simd.

gcc/testsuite/

* gfortran.dg/gomp/openmp-simd-8.f90: New test.

23 months agolto-wrapper: Pass through -funwind-tables and -fasynchronous-unwind-tables
Andreas Schwab [Tue, 17 Jan 2023 15:47:13 +0000 (16:47 +0100)]
lto-wrapper: Pass through -funwind-tables and -fasynchronous-unwind-tables

The -funwind-tables and -fasynchronous-unwind-tables options are relevant
for the output pass, so they need to be passed through by the LTO wrapper.
Otherwise, dwarf2out_assembly_start may output a ".cfi_sections
.debug_frame" directive when debug info is enabled even if every
translation unit was compiled with -funwind-tables.

gcc/
* lto-wrapper.cc (merge_and_complain): Handle
-funwind-tables and -fasynchronous-unwind-tables.
(append_compiler_options): Likewise.