platform/upstream/gcc.git
17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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>
17 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>

17 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.

17 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.

17 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.

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

17 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.

17 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>
17 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.

17 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>
17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 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.

17 months agoc++: Mangle EXCESS_PRECISION_EXPR <REAL_CST> as fold_convert REAL_CST [PR108698]
Jakub Jelinek [Thu, 9 Feb 2023 08:31:55 +0000 (09:31 +0100)]
c++: Mangle EXCESS_PRECISION_EXPR <REAL_CST> as fold_convert REAL_CST [PR108698]

For standard excess precision, like the C FE we parse floating
point constants as EXCESS_PRECISION_EXPR of promoted REAL_CST
rather than the nominal REAL_CST, and as the following testcase
shows the constants might need mangling.

The following patch mangles those as fold_convert of the REAL_CST
to EXCESS_PRECISION_EXPR type, i.e. how they were mangled before.

I'm not really sure EXCESS_PRECISION_EXPR can appear elsewhere
in expressions that would need mangling, tried various testcases
but haven't managed to come up with one.  If that is possible,
we'd keep ICEing on it without/with this patch, and the big question
is how to mangle those; they could be mangled as casts from the
promoted type back to nominal, but then in the mangled expressions
one could see the effects of excess precision.  Until we have
a reproducer, that is just theoretical though.

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

PR c++/108698
* mangle.cc (write_expression, write_template_arg): Handle
EXCESS_PRECISION_EXPR with REAL_CST operand as
write_template_arg_literal on fold_convert of the REAL_CST
to EXCESS_PRECISION_EXPR type.

* g++.dg/cpp0x/pr108698.C: New test.

17 months agotree-optimization/26854 - slow bitmap operations
Richard Biener [Tue, 7 Feb 2023 13:01:22 +0000 (14:01 +0100)]
tree-optimization/26854 - slow bitmap operations

With the compiler.i testcase from the PR one can see bitmap_set_bit
very high in the profile, originating from SSA update and alias
stmt walking.  For SSA update mark_block_for_update essentially
performs redundant bitmap_set_bits and is called via
insert_updated_phi_nodes_for as

      EXECUTE_IF_SET_IN_BITMAP (pruned_idf, 0, i, bi)
...
          mark_block_for_update (bb);
          FOR_EACH_EDGE (e, ei, bb->preds)
            if (e->src->index >= 0)
              mark_block_for_update (e->src);

which is quite random in the access pattern and runs into the
O(n) case of the linked list bitmap representation.  Switching
blocks_to_update to tree view around insert_updated_phi_nodes_for
improves SSA update time from

 tree SSA incremental               :   4.26 (  3%)

to

 tree SSA incremental               :   2.98 (  2%)

Likewise the visited bitmap allocated by the alias walker benefits
from using the tree view in case of large CFGs and we see an
improvement from

 alias stmt walking                 :  10.53 (  9%)

to

 alias stmt walking                 :   4.05 (  4%)

PR tree-optimization/26854
* tree-into-ssa.cc (update_ssa): Turn blocks_to_update to tree
view around insert_updated_phi_nodes_for.
* tree-ssa-alias.cc (maybe_skip_until): Allocate visited bitmap
in tree view.
(walk_aliased_vdefs_1): Likewise.

17 months agoDaily bump.
GCC Administrator [Thu, 9 Feb 2023 00:17:38 +0000 (00:17 +0000)]
Daily bump.

17 months agoc: Update checks on constexpr pointer initializers
Joseph Myers [Wed, 8 Feb 2023 23:41:47 +0000 (23:41 +0000)]
c: Update checks on constexpr pointer initializers

WG14 has agreed a change of the rules on constexpr pointer
initializers, so that a (constant) null value that is not a null
pointer constant is accepted in that context, rather than only
accepting null pointer constants.  (In particular, this means that a
constexpr variable of pointer type can be used to initializer another
such variable.)  Remove the null pointer constant restriction in GCC,
instead checking just whether the value is null.

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

gcc/c/
* c-typeck.cc (check_constexpr_init): Remove argument
null_pointer_constant.  Only check pointer initializers for being
null.
(digest_init): Update calls to check_constexpr_init.

gcc/testsuite/
* gcc.dg/c2x-constexpr-1.c: Test initialization of constexpr
pointers with null values that are not null pointer constants.
* gcc.dg/c2x-constexpr-3.c: Test initialization of constexpr
pointers with non-null values, not with null values that are not
null pointer constants.

17 months agodoc: Change fsf.org to www.fsf.org
Gerald Pfeifer [Wed, 8 Feb 2023 21:11:14 +0000 (22:11 +0100)]
doc: Change fsf.org to www.fsf.org

fsf.org has been serving a 301 (permanent redirect) http response for
a long while.

gcc/ChangeLog:

* doc/include/gpl_v3.texi: Change fsf.org to www.fsf.org.

17 months agotestsuite: Fix asm-goto-with-outputs tests; limit to lra targets
Hans-Peter Nilsson [Tue, 7 Feb 2023 18:46:29 +0000 (19:46 +0100)]
testsuite: Fix asm-goto-with-outputs tests; limit to lra targets

These tests spuriously lacked a "lra" limiter.  Code using
"asm goto" with outputs gets a:
 error: the target does not support 'asm goto' with outputs in 'asm'
compilation error when compiled for a non-LRA target.  Limit
to LRA targets as other asm-goto-with-outputs tests.

* gcc.dg/torture/pr100398.c: Limit to lra targets.
* gcc.dg/pr100590.c: Ditto.

17 months agoanalyzer: fix overzealous state purging with on-stack structs [PR108704]
David Malcolm [Wed, 8 Feb 2023 18:47:36 +0000 (13:47 -0500)]
analyzer: fix overzealous state purging with on-stack structs [PR108704]

PR analyzer/108704 reports many false positives seen from
-Wanalyzer-use-of-uninitialized-value on qemu's softfloat.c on code like
the following:

   struct st s;
   s = foo ();
   s = bar (s); // bogusly reports that s is uninitialized here

where e.g. "struct st" is "floatx80" in the qemu examples.

The root cause is overzealous purging of on-stack structs in the code I
added in r12-7718-gfaacafd2306ad7, where at:

s = bar (s);

state_purge_per_decl::process_point_backwards "sees" the assignment to 's'
and stops processing, effectively treating 's' as unneeded before this
stmt, not noticing the use of 's' in the argument.

Fixed thusly.

The patch greatly reduces the number of
-Wanalyzer-use-of-uninitialized-value warnings from my integration tests:
  ImageMagick-7.1.0-57:  10 ->  6   (-4)
              qemu-7.2: 858 -> 87 (-771)
         haproxy-2.7.1:   1 ->  0   (-1)
All of the above that I've examined appear to be false positives.

gcc/analyzer/ChangeLog:
PR analyzer/108704
* state-purge.cc (state_purge_per_decl::process_point_backwards):
Don't stop processing the decl if it's fully overwritten by
this stmt if it's also used by this stmt.

gcc/testsuite/ChangeLog:
PR analyzer/108704
* gcc.dg/analyzer/uninit-7.c: New test.
* gcc.dg/analyzer/uninit-pr108704.c: New test.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
17 months agoarm: Optimize arm-mlib.h header inclusion [pr108505].
Srinath Parvathaneni [Wed, 8 Feb 2023 18:39:06 +0000 (18:39 +0000)]
arm: Optimize arm-mlib.h header inclusion [pr108505].

I have committed a fix [1] into gcc trunk for a build
issue mentioned in pr108505 and latter received few upstream
comments proposing more robust fix for this issue.

In this patch I'm addressing those comments and sending this
as a followup patch.

gcc/ChangeLog:

2023-01-27  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

PR target/108505
* config.gcc (tm_mlib_file): Define new variable.

17 months agoFortran: error handling of global entity appearing in COMMON block [PR103259]
Steve Kargl [Tue, 7 Feb 2023 19:18:42 +0000 (20:18 +0100)]
Fortran: error handling of global entity appearing in COMMON block [PR103259]

gcc/fortran/ChangeLog:

PR fortran/103259
* resolve.cc (resolve_common_vars): Avoid NULL pointer dereference
when a symbol's location is not set.

gcc/testsuite/ChangeLog:

PR fortran/103259
* gfortran.dg/pr103259.f90: New test.

17 months agovect-patterns: Fix up vect_widened_op_tree [PR108692]
Jakub Jelinek [Wed, 8 Feb 2023 17:41:21 +0000 (18:41 +0100)]
vect-patterns: Fix up vect_widened_op_tree [PR108692]

The following testcase is miscompiled on aarch64-linux since r11-5160.
Given
  <bb 3> [local count: 955630225]:
  # i_22 = PHI <i_20(6), 0(5)>
  # r_23 = PHI <r_19(6), 0(5)>
...
  a.0_5 = (unsigned char) a_15;
  _6 = (int) a.0_5;
  b.1_7 = (unsigned char) b_17;
  _8 = (int) b.1_7;
  c_18 = _6 - _8;
  _9 = ABS_EXPR <c_18>;
  r_19 = _9 + r_23;
...
where SSA_NAMEs 15/17 have signed char, 5/7 unsigned char and rest is int
we first pattern recognize c_18 as
patt_34 = (a.0_5) w- (b.1_7);
which is still correct, 5/7 are unsigned char subtracted in wider type,
but then vect_recog_sad_pattern turns it into
SAD_EXPR <a_15, b_17, r_23>
which is incorrect, because 15/17 are signed char and so it is
sum of absolute signed differences rather than unsigned sum of
absolute unsigned differences.
The reason why this happens is that vect_recog_sad_pattern calls
vect_widened_op_tree with MINUS_EXPR, WIDEN_MINUS_EXPR on the
patt_34 = (a.0_5) w- (b.1_7); statement's vinfo and vect_widened_op_tree
calls vect_look_through_possible_promotion on the operands of the
WIDEN_MINUS_EXPR, which looks through the further casts.
vect_look_through_possible_promotion has careful code to stop when there
would be nested casts that need to be preserved, but the problem here
is that the WIDEN_*_EXPR operation itself has an implicit cast on the
operands already - in this case of WIDEN_MINUS_EXPR the unsigned char
5/7 SSA_NAMEs are widened to unsigned short before the subtraction,
and vect_look_through_possible_promotion obviously isn't told about that.

Now, I think when we see those WIDEN_{MULT,MINUS,PLUS}_EXPR codes, we had
to look through possible promotions already when creating those and so
vect_look_through_possible_promotion again isn't really needed, all we need
to do is arrange what that function will do if the operand isn't result
of any cast.  Other option would be let vect_look_through_possible_promotion
know about the implicit promotion from the WIDEN_*_EXPR, but I'm afraid
that would be much harder.

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

PR tree-optimization/108692
* tree-vect-patterns.cc (vect_widened_op_tree): If rhs_code is
widened_code which is different from code, don't call
vect_look_through_possible_promotion but instead just check op is
SSA_NAME with integral type for which vect_is_simple_use is true
and call set_op on this_unprom.

* gcc.dg/pr108692.c: New test.

17 months agoaarch64: Fix return_address_sign_ab_exception.C regression
Andrea Corallo [Thu, 2 Feb 2023 16:25:05 +0000 (17:25 +0100)]
aarch64: Fix return_address_sign_ab_exception.C regression

Hi all,

this is to fix the regression of
g++.target/aarch64/return_address_sign_ab_exception.C that I
introduced with d8dadbc9a5199bf7bac1ab7376b0f84f45e94350.

'aarch_ra_sign_key' for aarch64 ended up being non defined in the opt
file and the function attribute "branch-protection=pac-ret+leaf+b-key"
stopped working as expected.

This patch moves the definition of 'aarch_ra_sign_key' to the opt
files for both Arm back-ends.

Regards

  Andera Corallo

gcc/ChangeLog:

* config/aarch64/aarch64-protos.h (aarch_ra_sign_key): Remove
declaration.
* config/aarch64/aarch64.cc (aarch_ra_sign_key): Remove
definition.
* config/aarch64/aarch64.opt (aarch64_ra_sign_key): Rename
to 'aarch_ra_sign_key'.
* config/arm/aarch-common.cc (aarch_ra_sign_key): Remove
declaration.
* config/arm/arm-protos.h (aarch_ra_sign_key): Likewise.
* config/arm/arm.cc (enum aarch_key_type): Remove definition.
* config/arm/arm.opt: Define.

17 months agotestsuite: Import objc-dg-prune in execute.exp
Richard Sandiford [Wed, 8 Feb 2023 13:40:29 +0000 (13:40 +0000)]
testsuite: Import objc-dg-prune in execute.exp

The GCC-local definition of gcc-dg-prune removes extra error messages,
such as one from the linker warning about executable stacks.  This is
then used by tool-specific pruners like objc-dg-prune, defined in
objc-dg.exp.  However, objc/execute/execute.exp didn't include
objc-dg.exp, meaning that the linker warning could trigger a
failure in objc/execute/nested-func-1.m.

gcc/testsuite/
* objc/execute/execute.exp: Load objc-dg.exp.

17 months agovect: Check gather/scatter offset types [PR108316]
Richard Sandiford [Wed, 8 Feb 2023 13:40:29 +0000 (13:40 +0000)]
vect: Check gather/scatter offset types [PR108316]

The gather/scatter support can over-widen an offset if the target
requires it, but this relies on using a pattern sequence to add
the widening conversion.  That failed in the testcase because an
earlier pattern (bool) took priority.

I think we should allow patterns to be applied to other patterns,
but that's quite an invasive change and isn't suitable for stage 4.
This patch instead punts if the offset type doesn't match the
expected one.

If we switched to using the SLP representation for everything,
we would probably handle both patterns by rewriting the graph,
which should be much easier.

gcc/
PR tree-optimization/108316
* tree-vect-stmts.cc (get_load_store_type): When using
internal functions for gather/scatter, make sure that the type
of the offset argument is consistent with the offset vector type.

gcc/testsuite/
PR tree-optimization/108316
* gcc.dg/vect/pr108316.c: New test.

17 months agoRevert "RA: Implement reuse of equivalent memory for caller saves optimization"
Vladimir N. Makarov [Wed, 8 Feb 2023 13:25:10 +0000 (08:25 -0500)]
Revert "RA: Implement reuse of equivalent memory for caller saves optimization"

This reverts commit f661c0bb6371f355966a67b5ce71398e80792948.

17 months agotestsuite: Fix up PR108525 test [PR108525]
Jakub Jelinek [Wed, 8 Feb 2023 12:57:00 +0000 (13:57 +0100)]
testsuite: Fix up PR108525 test [PR108525]

Seems when committing the PR108525 fix I've missed that a test with
the same name had been added a few hours before for PR108526.

This patch separates the PR108525 test into a new file.

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

PR c++/108525
* g++.dg/cpp23/static-operator-call5.C: Move PR108525 testcase
incorrectly applied into PR108526 testcase ...
* g++.dg/cpp23/static-operator-call6.C: ... here.  New test.

17 months agotree.def: Remove outdated comment on SAD_EXPR
Jakub Jelinek [Wed, 8 Feb 2023 11:02:35 +0000 (12:02 +0100)]
tree.def: Remove outdated comment on SAD_EXPR

While looking at PR108692, I've noticed SAD_EXPR comment mentions that
WIDEN_MINUS_EXPR is missing, which is not true anymore since r11-5160.

The following patch just removes that part of the comment.

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

* tree.def (SAD_EXPR): Remove outdated comment about missing
WIDEN_MINUS_EXPR.

17 months agoDaily bump.
GCC Administrator [Wed, 8 Feb 2023 00:17:03 +0000 (00:17 +0000)]
Daily bump.

17 months agoFix 'libgomp.fortran/reverse-offload-6.f90' nvptx offloading compilation
Thomas Schwinge [Tue, 7 Feb 2023 20:23:47 +0000 (21:23 +0100)]
Fix 'libgomp.fortran/reverse-offload-6.f90' nvptx offloading compilation

Fix-up for recent commit 0b1ce70a813b98ef2893779d14ad6c90c5d06a71
"libgomp: Fix reverse offload issues".

libgomp/
* testsuite/libgomp.fortran/reverse-offload-6.f90: Fix nvptx
offloading compilation.

17 months agoanalyzer: fix -Wanalyzer-use-of-uninitialized-value false +ve on "read" [PR108661]
David Malcolm [Tue, 7 Feb 2023 21:10:20 +0000 (16:10 -0500)]
analyzer: fix -Wanalyzer-use-of-uninitialized-value false +ve on "read" [PR108661]

My integration testing shows many false positives from
-Wanalyzer-use-of-uninitialized-value.

One cause turns out to be that as of r13-1404-g97baacba963c06
fd_state_machine::on_stmt recognizes calls to "read", and returns true,
so that region_model::on_call_post doesn't call handle_unrecognized_call
on them, and so the analyzer erroneously "thinks" that the buffer
pointed to by "read" is never touched by the "read" call.

This works for "fread" because sm-file.cc implements kf_fread, which
handles calls to "fread" by clobbering the buffer pointed to.  In the
long term we should probably be smarter about this and bifurcate the
analysis to consider e.g. errors vs full reads vs partial reads, etc
(which I'm tracking in PR analyzer/108689).

In the meantime, this patch adds a kf_read for "read" analogous to the
one for "fread", fixing 6 false positives seen in git-2.39.0 and
2 in haproxy-2.7.1.

gcc/analyzer/ChangeLog:
PR analyzer/108661
* sm-fd.cc (class kf_read): New.
(register_known_fd_functions): Register "read".
* sm-file.cc (class kf_fread): Update comment.

gcc/testsuite/ChangeLog:
PR analyzer/108661
* gcc.dg/analyzer/fread-pr108661.c: New test.
* gcc.dg/analyzer/read-pr108661.c: New test.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
17 months agoFortran: ASSOCIATE variables should not be TREE_STATIC [PR95107]
Harald Anlauf [Mon, 6 Feb 2023 19:59:51 +0000 (20:59 +0100)]
Fortran: ASSOCIATE variables should not be TREE_STATIC [PR95107]

gcc/fortran/ChangeLog:

PR fortran/95107
* trans-decl.cc (gfc_finish_var_decl): With -fno-automatic, do not
make ASSOCIATE variables TREE_STATIC.

gcc/testsuite/ChangeLog:

PR fortran/95107
* gfortran.dg/save_7.f90: New test.

17 months agodoc: Update -fchar8_t documentation
Marek Polacek [Tue, 7 Feb 2023 16:21:37 +0000 (11:21 -0500)]
doc: Update -fchar8_t documentation

Since C++20 P2513R4, char8_t Compatibility and Portability Fix it is
no longer true that

  char ca[] = u8"xx";

causes an error so adjust the example for -fchar8_t.

gcc/ChangeLog:

* doc/invoke.texi: Update -fchar8_t documentation.

17 months agoRA: Implement reuse of equivalent memory for caller saves optimization
Vladimir N. Makarov [Tue, 7 Feb 2023 13:27:36 +0000 (08:27 -0500)]
RA: Implement reuse of equivalent memory for caller saves optimization

The test case 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

gcc/ChangeLog:

* ira.h (struct ira_reg_equiv_s): Add new field caller_save_p.
* ira.cc (validate_equiv_mem): Check memref address variance.
(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.

17 months agotree-optimization/26854 - compile-time hog in SSA forwprop
Richard Biener [Tue, 7 Feb 2023 12:01:12 +0000 (13:01 +0100)]
tree-optimization/26854 - compile-time hog in SSA forwprop

The following addresses

 tree forward propagate             :  12.41 (  9%)

seen with the compile.i testcase of this PR which points at
the has_use_on_stmt function which, for SSA names with many
uses is slow.  The solution is to instead of immediate uses,
look at stmt operands to identify whether a name has a use
on a stmt.  That improves SSA forwprop to

 tree forward propagate             :   1.30 (  0%)

for this testcase.

PR tree-optimization/26854
* gimple-fold.cc (has_use_on_stmt): Look at stmt operands
instead of immediate uses.

17 months agoipa-split: Don't split returns_twice functions [PR106923]
Jakub Jelinek [Tue, 7 Feb 2023 09:34:45 +0000 (10:34 +0100)]
ipa-split: Don't split returns_twice functions [PR106923]

As discussed in the PR, returns_twice functions are rare/special beasts
that need special treatment in the cfg, and inside of their bodies
we don't know which part actually works the weird returns twice way
(either in the fork/vfork sense, or in the setjmp) and aren't updating
ab edges to reflect that.

I think easiest is just to never split these, like we already never
split noreturn or malloc functions.

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

PR tree-optimization/106923
* ipa-split.cc (execute_split_functions): Don't split returns_twice
functions.

* gcc.dg/pr106923.c: New test.

17 months agocgraph: Handle simd clones in cgraph_node::set_{const,pure}_flag [PR106433]
Jakub Jelinek [Tue, 7 Feb 2023 09:33:54 +0000 (10:33 +0100)]
cgraph: Handle simd clones in cgraph_node::set_{const,pure}_flag [PR106433]

The following testcase ICEs, because we determine only in late pure const
pass that bar is const (the content of the function loses a store to a
global var during dse3 and read from it during cddce2) and local-pure-const2
makes it const.  The cgraph ordering is that post IPA (in late IPA simd
clones are created) bar is processed first, then foo as its caller, then
foo.simdclone* and finally bar.simdclone*.  Conceptually I think that is the
right ordering which allows for static simd clones to be removed.

The reason for the ICE is that because bar was marked const, the call to
it lost vops before vectorization, and when we in foo.simdclone* try to
vectorize the call to bar, we replace it with bar.simdclone* which hasn't
been marked const and so needs vops, which we don't add.

Now, because the simd clones are created from the same IL, just in a loop
with different argument/return value passing, I think generally if the base
function is determined to be const or pure, the simd clones should be too,
unless e.g. the vectorization causes different optimization decisions, but
then still the global memory reads if any shouldn't affect what the function
does and global memory stores shouldn't be reachable at runtime.

So, the following patch changes set_{const,pure}_flag to mark also simd
clones.

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

PR tree-optimization/106433
* cgraph.cc (set_const_flag_1): Recurse on simd clones too.
(cgraph_node::set_pure_flag): Call set_pure_flag_1 on simd clones too.

* gcc.c-torture/compile/pr106433.c: New test.

17 months agotestsuite: Expect -Wdeprecated warning in warn/Wstrict-aliasing-bogus-union-2.C for...
Jakub Jelinek [Tue, 7 Feb 2023 09:23:13 +0000 (10:23 +0100)]
testsuite: Expect -Wdeprecated warning in warn/Wstrict-aliasing-bogus-union-2.C for C++23

On Mon, Feb 06, 2023 at 02:26:01PM +0000, Jonathan Wakely via Gcc-patches wrote:
> With the recent change to deprecate std::aligned_storage and
> std::aligned_union we need to adjust some tests that now fail with
> -std=c++23.

The g++.dg/warn/Wstrict-aliasing-bogus-union-2.C test is also affected:
PASS: g++.dg/warn/Wstrict-aliasing-bogus-union-2.C  -std=gnu++2b  (test for bogus messages, line 12)
FAIL: g++.dg/warn/Wstrict-aliasing-bogus-union-2.C  -std=gnu++2b (test for excess errors)
Excess errors:
.../gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C:8:8: warning: 'template<long unsigned int _Len, long unsigned int _Align> struct std::aligned_storage' is deprecated [-

The following patch adds dg-warning for it.

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

* g++.dg/warn/Wstrict-aliasing-bogus-union-2.C: Expect
-Wdeprecated warning for C++23.

17 months agoEnable 512 bit vector for zen4
Jan Hubicka [Tue, 7 Feb 2023 04:23:00 +0000 (05:23 +0100)]
Enable 512 bit vector for zen4

While internally 512 registers are splits into two 256 halves, 512 bit vectors
reduces number of instructions to retire and has chance to improve paralelism.
There are few tsvc benchmarks that improves significantly:

           runtime
benchmark  256bit  512bit
s2275      48.57   20.67    -58%
s311       32.29   16.06    -50%
s312       32.30   16.07    -50%
vsumr      32.30   16.07    -50%
s314       10.77   5.42     -50%
s313       21.52   10.85    -50%
vdotr      43.05   21.69    -50%
s316       10.80   5.64     -48%
s235       61.72   33.91    -45%
s161       15.91   9.95     -38%
s3251      32.13   20.31    -36%

And there are no benchmarks with off-noise regression.  The basic matrix
multiplication loop improves by 32%.  It is also expected that 512 bit
vectors are more power effecient (I can't masure that).

The down side is that loops with low trip counts may get slower when the
unvectorized prologue and epilogue is hit more often.  With SPECfp this
problem happens with x264 (12% regression) and bwaves (6% regression)
and this is tracked in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108410
and will need more work on vectorizer to support masked epilogues.

After some additional testing it seems that using 512 bit vectors by
default is now overall better choice.

Bootstrapped/regtested x86_64-linux. Plan to commit it tomorrow.

* config/i386/x86-tune.def (X86_TUNE_AVX256_OPTIMAL): Turn off
for znver4.

17 months agoDaily bump.
GCC Administrator [Tue, 7 Feb 2023 00:17:44 +0000 (00:17 +0000)]
Daily bump.

17 months agoModula2 meets clang [PR108135]
Gaius Mulley [Mon, 6 Feb 2023 21:14:32 +0000 (21:14 +0000)]
Modula2 meets clang [PR108135]

Remove unused function (and build warnings).

gcc/m2/ChangeLog:

* gm2-compiler/M2Search.mod (DSdbEnter): Comment out.
(DSdbExit): Comment out.

PR modula2/108135

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
17 months agolibstdc++: Document P1642 and extensions
Arsen Arsenović [Mon, 23 Jan 2023 12:41:45 +0000 (13:41 +0100)]
libstdc++: Document P1642 and extensions

libstdc++-v3/ChangeLog:

* doc/xml/manual/using.xml: Document newly-freestanding
headers and the effect of the -ffreestanding flag.
* doc/xml/manual/status_cxx2023.xml: Document P1642R11 as
completed.
* doc/xml/manual/configure.xml: Document that hosted installs
respect __STDC_HOSTED__.
* doc/xml/manual/test.xml: Document how to run tests in
freestanding mode.
* doc/html/*: Regenerate.

17 months agoFormat error in m2pp.cc (m2pp_integer_cst) [PR107234]
Gaius Mulley [Mon, 6 Feb 2023 18:50:18 +0000 (18:50 +0000)]
Format error in m2pp.cc (m2pp_integer_cst) [PR107234]

Use HOST_WIDE_INT_PRINT_UNSIGNED instead of hardcoding a
specific format.

gcc/m2/ChangeLog:

* m2pp.cc (m2pp_integer_cst): Use
HOST_WIDE_INT_PRINT_UNSIGNED as the format specifier.

PR modula2/107234
    Co-Authored by: Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
17 months agoamdgcn: Pass -mstack-size through to runtime
Andrew Stubbs [Mon, 6 Feb 2023 12:47:28 +0000 (12:47 +0000)]
amdgcn: Pass -mstack-size through to runtime

But only for the offload case.

gcc/ChangeLog:

* config/gcn/mkoffload.cc (gcn_stack_size): New global variable.
(process_asm): Create a constructor for GCN_STACK_SIZE.
(main): Parse the -mstack-size option.

17 months agoRemove unused variables and procedures.
Gaius Mulley [Mon, 6 Feb 2023 15:24:06 +0000 (15:24 +0000)]
Remove unused variables and procedures.

Remove unused variables and procedures (and remove build
warning clutter).

gcc/m2/ChangeLog:

* gm2-compiler/M2Preprocess.mod (BaseName): Comment out.
* gm2-lang.cc (opt): Remove.
* gm2spec.cc (add_include): Remove.
(full_libraries): Remove.
(concat_option): Remove.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
17 months agoaarch64: Fix up bfmlal lane pattern [PR104921]
Alex Coplan [Mon, 6 Feb 2023 14:32:21 +0000 (14:32 +0000)]
aarch64: Fix up bfmlal lane pattern [PR104921]

As the testcase shows, this pattern had an incorrect constraint leading
to GCC's output getting rejected by the assembler.

This patch fixes the constraint accordingly.

The test is split into two: one that can run without bf16 support from
the assembler and another that checks that the output actually assembles
when such support is available.

Bootstrapped/regtested on aarch64-linux-gnu.

OK for GCC 13? Or better to wait for next stage 1? What about backports?

Thanks,
Alex

gcc/ChangeLog:

PR target/104921
* config/aarch64/aarch64-simd.md (aarch64_bfmlal<bt>_lane<q>v4sf):
Use correct constraint for operand 3.

gcc/testsuite/ChangeLog:

PR target/104921
* gcc.target/aarch64/pr104921-1.c: New test.
* gcc.target/aarch64/pr104921-2.c: New test.
* gcc.target/aarch64/pr104921.x: Include file for new tests.

17 months agolibstdc++: Fix non-reserved name for template parameter
Jonathan Wakely [Mon, 6 Feb 2023 12:16:05 +0000 (12:16 +0000)]
libstdc++: Fix non-reserved name for template parameter

libstdc++-v3/ChangeLog:

* include/bits/ranges_algo.h (__find_last_fn): Rename T to _Tp.
(__find_last_if_fn): Likewise.

17 months agolibstdc++: Fix testsuite warnings about new C++23 deprecations
Jonathan Wakely [Sat, 4 Feb 2023 00:04:55 +0000 (00:04 +0000)]
libstdc++: Fix testsuite warnings about new C++23 deprecations

With the recent change to deprecate std::aligned_storage and
std::aligned_union we need to adjust some tests that now fail with
-std=c++23.

libstdc++-v3/ChangeLog:

* include/std/type_traits: Add diagnostic pragmas around
references to deprecated std::aligned_storage and
std::aligned_union traits.
* testsuite/20_util/aligned_storage/requirements/alias_decl.cc:
Add dg-warning for et c++23.
* testsuite/20_util/aligned_storage/requirements/explicit_instantiation.cc:
Likewise.
* testsuite/20_util/aligned_storage/value.cc: Likewise.
* testsuite/20_util/aligned_union/1.cc: Likewise.
* testsuite/20_util/aligned_union/requirements/alias_decl.cc:
Likewise.

17 months agolibstdc++: Implement P1413R3 'deprecate aligned_storage and aligned_union'
Nathaniel Shead [Wed, 28 Dec 2022 14:28:25 +0000 (01:28 +1100)]
libstdc++: Implement P1413R3 'deprecate aligned_storage and aligned_union'

Adds deprecated attributes for C++23, and makes use of it for
std::aligned_storage, std::aligned_storage_t, std::aligned_union, and
std::aligned_union_t.

libstdc++-v3/ChangeLog:

* doc/doxygen/user.cfg.in (PREDEFINED): Add new macros.
* include/bits/c++config (_GLIBCXX23_DEPRECATED)
(_GLIBCXX23_DEPRECATED_SUGGEST): New macros.
* include/std/type_traits (aligned_storage, aligned_union)
(aligned_storage_t, aligned_union_t): Deprecate for C++23.
* testsuite/20_util/aligned_storage/deprecated-2b.cc: New test.
* testsuite/20_util/aligned_union/deprecated-2b.cc: New test.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
17 months agolibstdc++: Normalise _GLIBCXX20_DEPRECATED macro
Nathaniel Shead [Wed, 28 Dec 2022 14:28:11 +0000 (01:28 +1100)]
libstdc++: Normalise _GLIBCXX20_DEPRECATED macro

Updates _GLIBCXX20_DEPRECATED to be defined and behave the same as the
versions for other standards (e.g. _GLIBCXX17_DEPRECATED).

libstdc++-v3/ChangeLog:

* doc/doxygen/user.cfg.in (PREDEFINED): Update macros.
* include/bits/c++config (_GLIBCXX20_DEPRECATED): Make
consistent with other 'deprecated' macros.
* include/std/type_traits (is_pod, is_pod_v): Use
_GLIBCXX20_DEPRECATED_SUGGEST instead.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
17 months agolibstdc++: Enable building libstdc++.{a,so} when !HOSTED
Arsen Arsenović [Thu, 20 Oct 2022 15:49:50 +0000 (17:49 +0200)]
libstdc++: Enable building libstdc++.{a,so} when !HOSTED

This enables us to provide symbols for placeholders and numeric limits,
and allows users to mess about with linker flags less.

libstdc++-v3/ChangeLog:

* Makefile.am [!_GLIBCXX_HOSTED]: Enable src/ subdirectory.
* Makefile.in: Regenerate.
* src/Makefile.am [!_GLIBCXX_HOSTED]: Omit compatibility files.
There's no history to be compatible with.
* src/c++11/Makefile.am [!_GLIBCXX_HOSTED]: Omit hosted-only
source files from the build.
* src/c++17/Makefile.am [!_GLIBCXX_HOSTED]: Likewise.
* src/c++20/Makefile.am [!_GLIBCXX_HOSTED]: Likewise.
* src/c++98/Makefile.am [!_GLIBCXX_HOSTED]: Likewise.
* src/Makefile.in: Regenerate.
* src/c++11/Makefile.in: Regenerate.
* src/c++17/Makefile.in: Regenerate.
* src/c++20/Makefile.in: Regenerate.
* src/c++98/Makefile.in: Regenerate.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
17 months agolibstdc++: Disable building additional archives for freestanding
Jonathan Wakely [Sat, 4 Feb 2023 00:28:24 +0000 (00:28 +0000)]
libstdc++: Disable building additional archives for freestanding

This doesn't have any effect yet as we never build anything under
libstdc++-v3/src for freestanding, but that will change in the next
commit.

libstdc++-v3/ChangeLog:

* src/Makefile.am [GLIBCXX_HOSTED] (SUBDIRS): Do not add
filesystem, libbacktrace and experimental.
* src/Makefile.in: Regenerate.

17 months agoipa-sra: Fix a typo in a dump string.
Martin Jambor [Mon, 6 Feb 2023 14:16:49 +0000 (15:16 +0100)]
ipa-sra: Fix a typo in a dump string.

A fix to a typo spotted by Bernhard Reutner-Fischer.  Tested by
building the compiler with the fix.

gcc/ChangeLog:

2023-02-06  Martin Jambor  <mjambor@suse.cz>

* ipa-sra.cc (adjust_parameter_descriptions): Fix a typo in a dump.