aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-09-28libstdc++: Remove unused Python importsTom Tromey2-3/+0
flake8 pointed out some unused imports. libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py: Don't import 'os'. * python/libstdcxx/v6/__init__.py: Don't import 'gdb'.
2023-09-28libstdc++: Use gdb.ValuePrinter base classTom Tromey1-597/+606
GDB 14 will add a new ValuePrinter tag class that will be used to signal that pretty-printers will agree to the "extension protocol" -- essentially that they will follow some simple namespace rules, so that GDB can add new methods over time. A couple new methods have already been added to GDB, to support DAP. While I haven't implemented these for any libstdc++ printers yet, this patch makes the basic conversion: printers derive from gdb.ValuePrinter if it is available, and all "non-standard" (that is, not specified by GDB) members of the various value-printing classes are renamed to have a leading underscore. libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py: Use gdb.ValuePrinter everywhere. Rename members to start with "_".
2023-09-28libstdc++: Show full Python stack on errorTom Tromey1-0/+2
This changes the libstdc++ test suite to arrange for gdb to show the full Python stack if any sort of Python exception occurs. This makes debugging the printers a little simpler. libstdc++-v3/ChangeLog: * testsuite/lib/gdb-test.exp (gdb-test): Enable Python stack traces from gdb.
2023-09-28libstdc++: Refactor Python Xmethods to use is_specialization_ofJonathan Wakely1-12/+24
This copies the is_specialization_of function from printers.py (with slight modification for versioned namespace handling) and reuses it in xmethods.py to replace repetitive re.match calls in every class. This fixes the problem that the regular expressions used \d without escaping the backslash properly. libstdc++-v3/ChangeLog: * python/libstdcxx/v6/xmethods.py (is_specialization_of): Define new function. (ArrayMethodsMatcher, DequeMethodsMatcher) (ForwardListMethodsMatcher, ListMethodsMatcher) (VectorMethodsMatcher, AssociativeContainerMethodsMatcher) (UniquePtrGetWorker, UniquePtrMethodsMatcher) (SharedPtrSubscriptWorker, SharedPtrMethodsMatcher): Use is_specialization_of instead of re.match.
2023-09-28libstdc++: Reformat Python codeJonathan Wakely1-47/+75
Some of these changes were suggested by autopep8's --aggressive option, others are for readability. Break long lines by splitting strings across multiple lines, or introducing local variables to hold results. Use raw strings for regular expressions, so that backslashes don't need to be escaped. libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py: Break long lines. Use raw strings for regular expressions. Add whitespace around operators. (is_member_of_namespace): Use isinstance to check type. (is_specialization_of): Likewise. Adjust template_name for versioned namespace instead of duplicating the re.match call. (StdExpAnyPrinter._string_types): New static method. (StdExpAnyPrinter.to_string): Use _string_types.
2023-09-28libstdc++: Format Python docstrings according to PEP 357Jonathan Wakely2-97/+112
libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py: Format docstrings according to PEP 257. * python/libstdcxx/v6/xmethods.py: Likewise.
2023-09-28modula2: Increase linking test timeouts for slower targetsGaius Mulley5-6/+20
This patch introduces missing timeout handling for pimlib-base-run-pass.exp and increases the timeout value for larger projects which link (necessary for slower targets). gcc/testsuite/ChangeLog: * gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp: Add load_lib timeout-dg.exp and increase timeout to 60 seconds. * gm2/pimlib/base/run/pass/pimlib-base-run-pass.exp: Add load_lib timeout-dg.exp and increase timeout to 60 seconds. * gm2/projects/iso/run/pass/halma/projects-iso-run-pass-halma.exp: Increase timeout to 45 seconds. * gm2/switches/whole-program/pass/run/switches-whole-program-pass-run.exp: Add load_lib timeout-dg.exp and increase timeout to 120 seconds. Remove unnecessary compile of mystrlib.mod. * gm2/iso/run/pass/iso-run-pass.exp: Add load_lib timeout-dg.exp and set timeout to 60 seconds. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-09-28libstdc++: Force _Hash_node_value_base methods inline to fix abi (PR111050)Tim Song1-0/+4
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=1b6f0476837205932613ddb2b3429a55c26c409d changed _Hash_node_value_base to no longer derive from _Hash_node_base, which means that its member functions expect _M_storage to be at a different offset. So explosions result if an out-of-line definition is emitted for any of the member functions (say, in a non-optimized build) and the resulting object file is then linked with code built using older version of GCC/libstdc++. libstdc++-v3/ChangeLog: PR libstdc++/111050 * include/bits/hashtable_policy.h (_Hash_node_value_base<>::_M_valptr(), _Hash_node_value_base<>::_M_v()) Add [[__gnu__::__always_inline__]].
2023-09-28Revert "[RA]: Improve cost calculation of pseudos with equivalences"Vladimir N. Makarov1-2/+9
This reverts commit 3c834d85f2ec42c60995c2b678196a06cb744959. Although the patch improves x86-64 specfp2007, it also results in performance and code size regression on different targets and new GCC testsuite failures on tests expecting a specific output.
2023-09-28AArch64: Fix memmove operand corruption [PR111121]Wilco Dijkstra4-18/+77
A MOPS memmove may corrupt registers since there is no copy of the input operands to temporary registers. Fix this by calling aarch64_expand_cpymem_mops. Reviewed-by: Richard Sandiford <richard.sandiford@arm.com> gcc/ChangeLog/ PR target/111121 * config/aarch64/aarch64.md (aarch64_movmemdi): Add new expander. (movmemdi): Call aarch64_expand_cpymem_mops for correct expansion. * config/aarch64/aarch64.cc (aarch64_expand_cpymem_mops): Add support for memmove. * config/aarch64/aarch64-protos.h (aarch64_expand_cpymem_mops): Add new function. gcc/testsuite/ChangeLog/ PR target/111121 * gcc.target/aarch64/mops_4.c: Add memmove testcases.
2023-09-28RISC-V: Support {U}INT64 to FP16 auto-vectorizationPan Li5-0/+152
Update in v2: * Add math trap check. * Adjust some test cases. Original logs: This patch would like to support the auto-vectorization from the INT64 to FP16. We take below steps for the conversion. * INT64 to FP32. * FP32 to FP16. Given sample code as below: void test_func (int64_t * __restrict a, _Float16 *b, unsigned n) { for (unsigned i = 0; i < n; i++) b[i] = (_Float16) (a[i]); } Before this patch: test.c:6:26: missed: couldn't vectorize loop test.c:6:26: missed: not vectorized: unsupported data-type ld a0,0(s0) call __floatdihf fsh fa0,0(s1) addi s0,s0,8 addi s1,s1,2 bne s2,s0,.L3 ld ra,24(sp) ld s0,16(sp) ld s1,8(sp) ld s2,0(sp) addi sp,sp,32 After this patch: vsetvli a5,a2,e8,mf8,ta,ma vle64.v v1,0(a0) vsetvli a4,zero,e32,mf2,ta,ma vfncvt.f.x.w v1,v1 vsetvli zero,zero,e16,mf4,ta,ma vfncvt.f.f.w v1,v1 vsetvli zero,a2,e16,mf4,ta,ma vse16.v v1,0(a1) Please note VLS mode is also involved in this patch and covered by the test cases. PR target/111506 gcc/ChangeLog: * config/riscv/autovec.md (<float_cvt><mode><vnnconvert>2): New pattern. * config/riscv/vector-iterators.md: New iterator. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/unop/cvt-0.c: New test. * gcc.target/riscv/rvv/autovec/unop/cvt-1.c: New test. * gcc.target/riscv/rvv/autovec/vls/cvt-0.c: New test. Signed-off-by: Pan Li <pan2.li@intel.com>
2023-09-28[RA]: Add flag for checking IRA in progressVladimir N. Makarov4-8/+16
RISCV target developers need a flag to prevent creating insns in IRA which can not be split after RA as they will need a temporary reg. The patch introduces such flag. gcc/ChangeLog: * rtl.h (lra_in_progress): Change type to bool. (ira_in_progress): Add new extern. * ira.cc (ira_in_progress): New global. (pass_ira::execute): Set up ira_in_progress. * lra.cc: (lra_in_progress): Change type to bool and initialize. (lra): Use bool values for lra_in_progress. * lra-eliminations.cc (init_elim_table): Ditto.
2023-09-28target/111600 - avoid deep recursion in access diagnosticsRichard Biener1-19/+32
pass_waccess::check_dangling_stores uses recursion to traverse the CFG. The following changes this to use a heap allocated worklist to avoid blowing the stack. Instead of using a better iteration order it tries hard to preserve the current iteration order to avoid new false positives to pop up since the set of stores we keep track isn't properly modeling flow, so what is diagnosed and what not is quite random. We are also lacking the ideal RPO compute on the inverted graph that would just ignore reverse unreachable code (as the current iteration scheme does). PR target/111600 * gimple-ssa-warn-access.cc (pass_waccess::check_dangling_stores): Use a heap allocated worklist for CFG traversal instead of recursion.
2023-09-28libgfortran: Use __builtin_unreachable() not -Wno-stringop-overflow to ↵Tobias Burnus1-8/+9
silence warning The only caller of write_z is formatted_transfer_scalar_write that passes kind to 'len'; in turn, write_z is the only caller of xtoa_big, passing on its 'len'. The kind is passed as is, except for GFC_REAL_17 for which len = 16 is used. libgfortran/ * io/write.c (xtoa_big): Change a 'GCC diagnostic ignored "-Wstringop-overflow"' to an assumption (via __builtin_unreachable).t
2023-09-28vec.h: Make some ops work with non-trivially copy constructible and/or ↵Jakub Jelinek4-56/+133
destructible types We have some very limited support for non-POD types in vec.h (in particular grow_cleared will invoke default ctors on the cleared elements and vector copying invokes copy ctors. My pending work on wide_int/widest_int which makes those two non-trivially default constructible, copyable and destructible shows this isn't enough though. In particular the uses of it in irange shows that quick_push still uses just assignment operator rather than copy construction and we never invoke destructors on anything. The following patch does that for quick_push (copy construction using placement new rather than assignment, for trivially copy constructible types I think it should be the same) and invokes destructors (only if non-trivially destructible) in pop, release and truncate. Now as discussed last night on IRC, the pop case is problematic, because our pop actually does two things, it decreases length (so the previous last element should be destructed) but also returns a reference to it. We have some 300+ uses of this and the reference rather than returning it by value is useful at least for the elements which are (larger) POD structures, so I'm not prepared to change that. Though obviously for types with non-trivial destructors returning a reference to just destructed element is not a good idea. So, this patch for that case only makes pop return void instead and any users wishing to get the last element need to use last () and pop () separately (currently there are none). Note, a lot of vec.h operations is still not friendly for non-POD types, and the patch tries to enforce that through static asserts. Some operations are now only allowed on trivially copyable types, sorting operations as an extension on trivially copyable types or std::pair of 2 trivially copyable types, quick_grow/safe_grow (but not _cleared variants) for now have a commented out assert on trivially default constructible types - this needs some further work before the assert can be enabled - and finally all va_gc/va_gc_atomic vectors require trivially destructible types. 2023-09-28 Jakub Jelinek <jakub@redhat.com> Jonathan Wakely <jwakely@redhat.com> * vec.h: Mention in file comment limited support for non-POD types in some operations. (vec_destruct): New function template. (release): Use it for non-trivially destructible T. (truncate): Likewise. (quick_push): Perform a placement new into slot instead of assignment. (pop): For non-trivially destructible T return void rather than T & and destruct the popped element. (quick_insert, ordered_remove): Note that they aren't suitable for non-trivially copyable types. Add static_asserts for that. (block_remove): Assert T is trivially copyable. (vec_detail::is_trivially_copyable_or_pair): New trait. (qsort, sort, stablesort): Assert T is trivially copyable or std::pair with both trivally copyable types. (quick_grow): Add assert T is trivially default constructible, for now commented out. (quick_grow_cleared): Don't call quick_grow, instead inline it by hand except for the new static_assert. (gt_ggc_mx): Assert T is trivially destructable. (auto_vec::operator=): Formatting fixes. (auto_vec::auto_vec): Likewise. (vec_safe_grow_cleared): Don't call vec_safe_grow, instead inline it manually and call quick_grow_cleared method rather than quick_grow. (safe_grow_cleared): Likewise. * edit-context.cc (class line_event): Move definition earlier. * tree-ssa-loop-im.cc (seq_entry::seq_entry): Make default ctor defaulted. * ipa-fnsummary.cc (evaluate_properties_for_edge): Use safe_grow_cleared instead of safe_grow followed by placement new constructing the elements.
2023-09-28Remove some unused poly_int variablesRichard Sandiford4-4/+0
Switching to default constructors for poly_int exposed some unused variables that weren't previously diagnosed. gcc/ * dwarf2out.cc (mem_loc_descriptor): Remove unused variables. * tree-affine.cc (expr_to_aff_combination): Likewise. gcc/cp/ * constexpr.cc (cxx_fold_indirect_ref): Remove unused variables. gcc/rust/ * backend/rust-constexpr.cc (rs_fold_indirect_ref): Remove unused variables.
2023-09-28Daily bump.GCC Administrator7-1/+967
2023-09-28tree-optimization/111614 - missing convert in undistribute_bitref_for_vectorRichard Biener2-12/+38
The following adjusts a flawed guard for converting the first vector of the sum we create in undistribute_bitref_for_vector. PR tree-optimization/111614 * tree-ssa-reassoc.cc (undistribute_bitref_for_vector): Properly convert the first vector when required. * gcc.dg/torture/pr111614.c: New testcase.
2023-09-28Replace riscv_vector with riscv_v in target selector clauses.Joern Rennecke434-453/+441
$ grep -rl '[^"<]riscv_vector\>[^.]' > file-list $ cat edcmds g/riscv_vector[^.]/s/\([^"<]riscv_v\)ector\>\([^.]\)/\1\2/g w q $ sed 's/.*/ed & < edcmds/' < file-list > tmp $ source tmp $ git checkout gcc.target/riscv/predef-19.c $ git checkout gcc.target/riscv/predef-18.c gcc.target/riscv/predef-20.c gcc/testsuite/ * lib/target-supports.exp (check_effective_target_riscv_vector): Delete. Changed all users to use *riscv_v instead. * g++.target/riscv/rvv/base/bug-10.C: Use riscv_v target selector. * g++.target/riscv/rvv/base/bug-11.C: Likewise. * g++.target/riscv/rvv/base/bug-13.C: Likewise. * g++.target/riscv/rvv/base/bug-15.C: Likewise. * g++.target/riscv/rvv/base/bug-16.C: Likewise. * g++.target/riscv/rvv/base/bug-17.C: Likewise. * g++.target/riscv/rvv/base/bug-2.C: Likewise. * g++.target/riscv/rvv/base/bug-4.C: Likewise. * g++.target/riscv/rvv/base/bug-5.C: Likewise. * g++.target/riscv/rvv/base/bug-6.C: Likewise. * g++.target/riscv/rvv/base/bug-7.C: Likewise. * g++.target/riscv/rvv/base/bug-9.C: Likewise. * g++.target/riscv/rvv/base/bug-12.C: Likewise. * g++.target/riscv/rvv/base/bug-14.C: Likewise. * g++.target/riscv/rvv/base/bug-18.C: Likewise. * g++.target/riscv/rvv/base/bug-19.C: Likewise. * g++.target/riscv/rvv/base/bug-20.C: Likewise. * g++.target/riscv/rvv/base/bug-21.C: Likewise. * g++.target/riscv/rvv/base/bug-22.C: Likewise. * g++.target/riscv/rvv/base/bug-23.C: Likewise. * g++.target/riscv/rvv/base/bug-3.C: Likewise. * g++.target/riscv/rvv/base/bug-8.C: Likewise. * gcc.dg/vect/pr88598-1.c: Likewise. * gcc.dg/vect/pr88598-2.c: Likewise. * gcc.dg/vect/pr88598-3.c: Likewise. * gcc.dg/vect/slp-26.c: Likewise. * gcc.dg/vect/slp-reduc-7.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/copysign-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/copysign-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/narrow_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/narrow_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/narrow_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/shift-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/shift-scalar-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vadd-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vadd-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vand-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vdiv-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vdiv-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vmax-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vmax-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vmin-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vmin-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vmul-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vmul-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vor-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vrem-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vsub-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vsub-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vxor-run.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/mulh_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/mulh_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vadd-run-nofm.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vdiv-run-nofm.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vmul-run-nofm.c: Likewise. * gcc.target/riscv/rvv/autovec/binop/vsub-run-nofm.c: Likewise. * gcc.target/riscv/rvv/autovec/cmp/vcond_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cmp/vcond_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cmp/vcond_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/cmp/vcond_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfcvt-itof-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfcvt-itof-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfcvt_rtz-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfcvt_rtz-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfncvt-ftoi-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfncvt-itof-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfncvt-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfncvt-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfwcvt-ftoi-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfwcvt-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfwcvt-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vncvt-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vsext-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vzext-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfncvt-ftoi-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfncvt-itof-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfwcvt-ftoi-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfwcvt-itof-run.c: Likewise. * gcc.target/riscv/rvv/autovec/conversions/vfwcvt-itof-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/multiple_rgroup_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/multiple_rgroup_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/multiple_rgroup_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/multiple_rgroup_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/single_rgroup_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/single_rgroup_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/single_rgroup_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-10.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-11.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-12.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-13.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-14.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-15.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-16.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-17.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-18.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-19.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/slp_run-9.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/live_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/partial/live_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/series_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run-10.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run-11.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run-12.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run-9.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run_zvfh-1.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run_zvfh-10.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run_zvfh-11.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run_zvfh-12.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run_zvfh-2.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run_zvfh-3.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run_zvfh-4.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run_zvfh-5.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run_zvfh-6.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run_zvfh-7.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run_zvfh-8.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_run_zvfh-9.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_nofm_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_nofm_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_nofm_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_nofm_run-10.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_nofm_run-11.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_nofm_run-12.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_nofm_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_nofm_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_nofm_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_nofm_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_nofm_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/ternop/ternop_nofm_run-9.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/abs-run.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/vfsqrt-run.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/vneg-run.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/vnot-run.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/math-ceil-run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/math-ceil-run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/math-floor-run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/math-floor-run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/math-nearbyint-run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/math-nearbyint-run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/math-rint-run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/math-rint-run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/math-round-run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/math-round-run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/math-trunc-run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/unop/math-trunc-run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-1.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-10.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-11.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-12.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-13.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-14.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-2.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-3.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-4.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-5.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-6.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-7.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-8.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-9.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/compress_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/compress_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/compress_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/compress_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/compress_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/compress_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/init-repeat-sequence-run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/init-repeat-sequence-run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/init-repeat-sequence-run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/insert_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/insert_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/merge_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/merge_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/merge_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/merge_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/merge_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/merge_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/merge_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/perm_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/perm_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/perm_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/perm_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/perm_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/perm_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/perm_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/repeat_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/repeat_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/repeat_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/repeat_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/repeat_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/repeat_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-run.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/vec_set-run.c: Likewise. * gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-runu.c: Likewise. * gcc.target/riscv/rvv/autovec/vmv-imm-run.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run-10.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run-11.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run-12.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run-9.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run_zvfh-1.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run_zvfh-10.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run_zvfh-11.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run_zvfh-12.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run_zvfh-2.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run_zvfh-3.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run_zvfh-5.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run_zvfh-6.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run_zvfh-7.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_run_zvfh-8.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/vec-avg-run.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_reduc_order_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_reduc_order_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/widen/widen_reduc_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_run-10.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_run-11.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_run-9.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_gather_load_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_gather_load_run-10.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_gather_load_run-11.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_gather_load_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_gather_load_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_gather_load_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_gather_load_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_gather_load_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_gather_load_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_gather_load_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_gather_load_run-9.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_scatter_store_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_scatter_store_run-10.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_scatter_store_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_scatter_store_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_scatter_store_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_scatter_store_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_scatter_store_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_scatter_store_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_scatter_store_run-9.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/scatter_store_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/scatter_store_run-10.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/scatter_store_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/scatter_store_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/scatter_store_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/scatter_store_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/scatter_store_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/scatter_store_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/scatter_store_run-9.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/strided_load_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/strided_store_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/strided_store_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/mask_scatter_store_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/scatter_store_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/gather_load_run-12.c: Likewise. * gcc.target/riscv/rvv/autovec/gather-scatter/strided_load_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/reduc_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/reduc_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/reduc_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/reduc_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/reduc_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/reduc_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/reduc_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/reduc_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/reduc_run-9.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/reduc_strict_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/extract_last_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/extract_last_run-10.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/extract_last_run-11.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/extract_last_run-12.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/extract_last_run-13.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/extract_last_run-14.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/extract_last_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/extract_last_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/extract_last_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/extract_last_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/extract_last_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/extract_last_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/extract_last_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/extract_last_run-9.c: Likewise. * gcc.target/riscv/rvv/autovec/reduc/reduc_strict_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_arith_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_arith_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_arith_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_arith_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_arith_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_arith_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_arith_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_arith_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_arith_run-9.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fadd_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fadd_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fadd_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fadd_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fma_fnma_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fma_fnma_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fma_fnma_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fma_fnma_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fma_fnma_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fma_fnma_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fma_fnma_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fma_fnma_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fmax_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fmax_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fmax_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fmax_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fmin_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fmin_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fmin_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fmin_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fms_fnms_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fms_fnms_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fms_fnms_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fms_fnms_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fms_fnms_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fms_fnms_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fmul_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fmul_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fmul_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_fmul_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_shift_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_shift_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_shift_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_shift_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_shift_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_shift_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_shift_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_shift_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_shift_run-9.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_convert_float2float_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_convert_float2float_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_convert_float2int_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_convert_float2int_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_convert_int2float_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_convert_int2float_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_convert_int2int_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_convert_int2int_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_copysign-run.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_copysign-zvfh-run.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_logical_min_max_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_logical_min_max_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_logical_min_max_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_logical_min_max_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_logical_min_max_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_mulh_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_mulh_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_narrow_shift_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_narrow_shift_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_narrow_shift_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_sqrt_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_sqrt_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_unary_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_unary_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_unary_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_unary_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_unary_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_unary_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_unary_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_unary_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_widen_reduc_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/cond/cond_widen_reduc_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/mask_struct_load_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/mask_struct_load_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/mask_struct_load_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/mask_struct_load_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/mask_struct_load_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/mask_struct_load_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/mask_struct_load_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/mask_struct_store_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/mask_struct_store_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/mask_struct_store_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/mask_struct_store_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/mask_struct_store_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/mask_struct_store_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/mask_struct_store_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-1.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-10.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-11.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-12.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-13.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-14.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-15.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-16.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-17.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-18.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-2.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-3.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-4.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-5.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-6.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-7.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-8.c: Likewise. * gcc.target/riscv/rvv/autovec/struct/struct_vect_run-9.c: Likewise. * gcc.target/riscv/rvv/base/bug-3.c: Likewise. * gcc.target/riscv/rvv/base/bug-4.c: Likewise. * gcc.target/riscv/rvv/base/bug-5.c: Likewise. * gcc.target/riscv/rvv/base/float-point-frm-run-1.c: Likewise. * gcc.target/riscv/rvv/base/float-point-frm-run-2.c: Likewise. * gcc.target/riscv/rvv/base/float-point-frm-run-3.c: Likewise. * gcc.target/riscv/rvv/base/float-point-frm-run-4.c: Likewise. * gcc.target/riscv/rvv/base/float-point-frm-run-5.c: Likewise. * gcc.target/riscv/rvv/base/abi-call-args-1-run.c: Likewise. * gcc.target/riscv/rvv/base/abi-call-args-2-run.c: Likewise. * gcc.target/riscv/rvv/base/abi-call-args-3-run.c: Likewise. * gcc.target/riscv/rvv/base/abi-call-args-4-run.c: Likewise. * gcc.target/riscv/rvv/base/abi-call-return-run.c: Likewise. * gcc.target/riscv/rvv/base/scalar-move-merged-run-1.c: Likewise.
2023-09-28RISC-V: Bugfix for RTL check[PR111533]xuli4-4/+48
Consider the flowing situation: BB5: local_dem(RVV Insn 1, AVL(reg zero)) RVV Insn 1: vmv.s.x, AVL (const_int 1) RVV Insn 2: vredsum.vs, AVL(reg zero) vmv.s.x has vl operand, the following code will get avl (cosnt_int) from RVV Insn 1. rtx avl = has_vl_op (insn->rtl ()) ? get_vl (insn->rtl ()) : dem.get_avl (); If use REGNO for const_int, the compiler will crash: during RTL pass: vsetvl res_debug.c: In function '__dn_count_labels': res_debug.c:1050:1: internal compiler error: RTL check: expected code 'reg', have 'const_int' in rhs_regno, at rtl.h:1934 1050 | } | ^ 0x8fb169 rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int, char const*) ../.././gcc/gcc/rtl.cc:770 0x1399818 rhs_regno(rtx_def const*) ../.././gcc/gcc/rtl.h:1934 0x1399818 anticipatable_occurrence_p ../.././gcc/gcc/config/riscv/riscv-vsetvl.cc:348 So in this case avl should be obtained from dem. Another issue is caused by the following code: HOST_WIDE_INT diff = INTVAL (builder.elt (i)) - i; during RTL pass: expand ../../.././gcc/libgfortran/generated/matmul_c4.c: In function 'matmul_c4': ../../.././gcc/libgfortran/generated/matmul_c4.c:2906:39: internal compiler error: RTL check: expected code 'const_int', have 'const_poly_int' in expand_const_vector, at config/riscv/riscv-v.cc:1149 The builder.elt (i) can be either const_int or const_poly_int. PR target/111533 gcc/ChangeLog: * config/riscv/riscv-v.cc (expand_const_vector): Fix bug. * config/riscv/riscv-vsetvl.cc (anticipatable_occurrence_p): Fix bug. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/pr111533-1.c: New test. * gcc.target/riscv/rvv/base/pr111533-2.c: New test.
2023-09-27libstdc++: Fix format string in StdChronoTimeZoneRulePrinterJonathan Wakely1-1/+1
libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py (StdChronoTimeZoneRulePrinter): Fix incorrect number of replacement fields.
2023-09-27OpenMP: GIMPLE_OMP_STRUCTURED_BLOCK bug fixSandra Loosemore1-0/+1
This is a bug fix for commit a62c8324e7e31ae6614f549bdf9d8a653233f8fc, which added GIMPLE_OMP_STRUCTURED_BLOCK. I found a big switch statement over gimple codes that needs to know about this new node, but didn't. gcc/ChangeLog * gimple.cc (gimple_copy): Add case GIMPLE_OMP_STRUCTURED_BLOCK.
2023-09-27Darwin, configure: Allow for an unrecognisable dsymutil [PR111610].Iain Sandoe2-2/+2
We had a catch-all configuration case for missing or unrecognised dsymutil but it was setting the dsymutil source to "UNKNOWN" which is not usable in this context (since it clashes with an existing enum). We rename this to DET_UNKNOWN (for Darwin External Toolchain). PR target/111610 gcc/ChangeLog: * configure: Regenerate. * configure.ac: Rename the missing dsymutil case to "DET_UNKNOWN". Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2023-09-27aarch64: Fine-grained policies to control ldp-stp formationManos Anagnostakis13-76/+632
This patch implements the following TODO in gcc/config/aarch64/aarch64.cc to provide the requested behaviour for handling ldp and stp: /* Allow the tuning structure to disable LDP instruction formation from combining instructions (e.g., in peephole2). TODO: Implement fine-grained tuning control for LDP and STP: 1. control policies for load and store separately; 2. support the following policies: - default (use what is in the tuning structure) - always - never - aligned (only if the compiler can prove that the load will be aligned to 2 * element_size) */ It provides two new and concrete target-specific command-line parameters --param=aarch64-ldp-policy= and --param=aarch64-stp-policy= to give the ability to control load and store policies seperately as stated in part 1 of the TODO. The accepted values for both parameters are: * default: Use the policy of the tuning structure (default). * always: Emit ldp/stp regardless of alignment. * never: Do not emit ldp/stp. * aligned: In order to emit ldp/stp, first check if the load/store will be aligned to 2 * element_size. Bootstrapped and regtested aarch64-linux. gcc/ChangeLog: * config/aarch64/aarch64-opts.h (enum aarch64_ldp_policy): New enum type. (enum aarch64_stp_policy): New enum type. * config/aarch64/aarch64-protos.h (struct tune_params): Add appropriate enums for the policies. (aarch64_mem_ok_with_ldpstp_policy_model): New declaration. * config/aarch64/aarch64-tuning-flags.def (AARCH64_EXTRA_TUNING_OPTION): Remove superseded tuning options. * config/aarch64/aarch64.cc (aarch64_parse_ldp_policy): New function to parse ldp-policy parameter. (aarch64_parse_stp_policy): New function to parse stp-policy parameter. (aarch64_override_options_internal): Call parsing functions. (aarch64_mem_ok_with_ldpstp_policy_model): New function. (aarch64_operands_ok_for_ldpstp): Add call to aarch64_mem_ok_with_ldpstp_policy_model for parameter-value check and alignment check and remove superseded ones. (aarch64_operands_adjust_ok_for_ldpstp): Add call to aarch64_mem_ok_with_ldpstp_policy_model for parameter-value check and alignment check and remove superseded ones. * config/aarch64/aarch64.opt (aarch64-ldp-policy): New param. (aarch64-stp-policy): New param. * doc/invoke.texi: Document the parameters accordingly. gcc/testsuite/ChangeLog: * gcc.target/aarch64/ampere1-no_ldp_combine.c: Removed. * gcc.target/aarch64/ldp_aligned.c: New test. * gcc.target/aarch64/ldp_always.c: New test. * gcc.target/aarch64/ldp_never.c: New test. * gcc.target/aarch64/stp_aligned.c: New test. * gcc.target/aarch64/stp_always.c: New test. * gcc.target/aarch64/stp_never.c: New test. Signed-off-by: Manos Anagnostakis <manos.anagnostakis@vrull.eu> Co-Authored-By: Philipp Tomsich <philipp.tomsich@vrull.eu> Co-Authored-By: Manolis Tsamis <manolis.tsamis@vrull.eu>
2023-09-27vect, omp: inbranch simdclone dropping constAndre Vieira2-2/+37
The const attribute is ignored when simdclone's are used inbranch. This is due to the fact that when analyzing a MASK_CALL we were not looking at the targeted function for flags, but instead only at the internal function call itself. This patch adds code to make sure we look at the target function to check for the const attribute and enables the autovectorization of inbranch const simdclones without needing the loop to be adorned the 'openmp simd' pragma. gcc/ChangeLog: * tree-data-ref.cc (include calls.h): Add new include. (get_references_in_stmt): Correctly handle IFN_MASK_CALL. gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-simd-clone-19.c: New test.
2023-09-27Simplify abs (copysign (x, y))Richard Biener2-0/+14
The following adds simplification of abs (copysign (x, y)) to abs (x). * match.pd (abs (copysign (x, y)) -> abs (x)): New pattern. * gcc.dg/fold-abs-6.c: New testcase.
2023-09-27Harden scan patterns with a bit of scripting:Joern Rennecke111-211/+211
$ egrep -r 'scan-assembler(|-not|-times) "[[:alnum:].]{1,7}"' riscv $ egrep -rl 'scan-assembler(|-not|-times) "[[:alnum:].]{1,7}"' riscv > files $ cat edcmds g/\(scan-assembler\(\|-not\|-times\) \+\)"\([[:alnum:]]\{1,5\}\)\.\([[:alpha:].]\{1,3\}\)"/s//\1{\\m\3\\.\4\\M}/ g/\(scan-assembler\(\|-not\|-times\) \+\)"\([[:alnum:]]\{1,7\}\)"/s//\1{\\m\3}/ w q $ sed 's/.*/ed & < edcmds/' < files > tmp $ source tmp gcc/testsuite/ * gcc.target/riscv/shift-shift-1.c: Avoid spurious pattern matches. * gcc.target/riscv/shift-shift-3.c: Likewise. * gcc.target/riscv/zba-shNadd-01.c: Likewise. * gcc.target/riscv/zba-shNadd-02.c: Likewise. * gcc.target/riscv/zbb-andn-orn-xnor-01.c: Likewise. * gcc.target/riscv/zbb-andn-orn-xnor-02.c: Likewise. * gcc.target/riscv/zbb-min-max.c: Likewise. * gcc.target/riscv/zero-extend-1.c: Likewise. * gcc.target/riscv/zero-extend-2.c: Likewise. * gcc.target/riscv/zero-extend-3.c: Likewise. * gcc.target/riscv/zero-extend-4.c: Likewise. * gcc.target/riscv/zero-extend-5.c: Likewise. * gcc.target/riscv/_Float16-soft-2.c: Likewise. * gcc.target/riscv/_Float16-soft-3.c: Likewise. * gcc.target/riscv/_Float16-zfh-1.c: Likewise. * gcc.target/riscv/_Float16-zfh-2.c: Likewise. * gcc.target/riscv/_Float16-zfh-3.c: Likewise. * gcc.target/riscv/and-extend-1.c: Likewise. * gcc.target/riscv/and-extend-2.c: Likewise. * gcc.target/riscv/pr108987.c: Likewise. * gcc.target/riscv/ret-1.c: Likewise. * gcc.target/riscv/rvv/autovec/align-1.c: Likewise. * gcc.target/riscv/rvv/autovec/align-2.c: Likewise. * gcc.target/riscv/zba-shNadd-04.c: Likewise. * gcc.target/riscv/zba-shNadd-07.c: Likewise. * gcc.target/riscv/zbb-rol-ror-02.c: Likewise. * gcc.target/riscv/zbbw.c: Likewise. * gcc.target/riscv/zbc32.c: Likewise. * gcc.target/riscv/zbc64.c: Likewise. * gcc.target/riscv/zbkb32.c: Likewise. * gcc.target/riscv/zbkb64.c: Likewise. * gcc.target/riscv/zbkc32.c: Likewise. * gcc.target/riscv/zbkc64.c: Likewise. * gcc.target/riscv/zbkx32.c: Likewise. * gcc.target/riscv/zbkx64.c: Likewise. * gcc.target/riscv/zfa-fleq-fltq.c: Likewise. * gcc.target/riscv/zfa-fli-zfh.c: Likewise. * gcc.target/riscv/zfa-fli.c: Likewise. * gcc.target/riscv/zknd64.c: Likewise. * gcc.target/riscv/zksed32.c: Likewise. * gcc.target/riscv/zksed64.c: Likewise. * gcc.target/riscv/zksh32.c: Likewise. * gcc.target/riscv/zksh64.c: Likewise. * gcc.target/riscv/_Float16-soft-1.c: Likewise. * gcc.target/riscv/_Float16-zfhmin-1.c: Likewise. * gcc.target/riscv/_Float16-zfhmin-2.c: Likewise. * gcc.target/riscv/_Float16-zfhmin-3.c: Likewise. * gcc.target/riscv/_Float16-zhinxmin-1.c: Likewise. * gcc.target/riscv/_Float16-zhinxmin-2.c: Likewise. * gcc.target/riscv/_Float16-zhinxmin-3.c: Likewise. * gcc.target/riscv/fle-ieee.c: Likewise. * gcc.target/riscv/fle-snan.c: Likewise. * gcc.target/riscv/flef-ieee.c: Likewise. * gcc.target/riscv/flef-snan.c: Likewise. * gcc.target/riscv/flt-ieee.c: Likewise. * gcc.target/riscv/flt-snan.c: Likewise. * gcc.target/riscv/fltf-ieee.c: Likewise. * gcc.target/riscv/fltf-snan.c: Likewise. * gcc.target/riscv/interrupt-1.c: Likewise. * gcc.target/riscv/interrupt-mmode.c: Likewise. * gcc.target/riscv/interrupt-smode.c: Likewise. * gcc.target/riscv/interrupt-umode.c: Likewise. * gcc.target/riscv/pr106888.c: Likewise. * gcc.target/riscv/pr89835.c: Likewise. * gcc.target/riscv/shift-and-1.c: Likewise. * gcc.target/riscv/shift-and-2.c: Likewise. * gcc.target/riscv/shift-shift-2.c: Likewise. * gcc.target/riscv/shift-shift-4.c: Likewise. * gcc.target/riscv/shift-shift-5.c: Likewise. * gcc.target/riscv/shorten-memrefs-7.c: Likewise. * gcc.target/riscv/sign-extend.c: Likewise. * gcc.target/riscv/switch-qi.c: Likewise. * gcc.target/riscv/switch-si.c: Likewise. * gcc.target/riscv/xtheadbb-ext-1.c: Likewise. * gcc.target/riscv/xtheadbb-ext.c: Likewise. * gcc.target/riscv/xtheadbb-extu-1.c: Likewise. * gcc.target/riscv/xtheadbb-extu.c: Likewise. * gcc.target/riscv/xtheadbb-strlen.c: Likewise. * gcc.target/riscv/xtheadbs-tst.c: Likewise. * gcc.target/riscv/xtheadfmv-fmv.c: Likewise. * gcc.target/riscv/xventanacondops-primitiveSemantics.c: Likewise. * gcc.target/riscv/zba-adduw.c: Likewise. * gcc.target/riscv/zba-shadd.c: Likewise. * gcc.target/riscv/zba-slliuw.c: Likewise. * gcc.target/riscv/zba-zextw.c: Likewise. * gcc.target/riscv/zbb-min-max-02.c: Likewise. * gcc.target/riscv/zbb-min-max-03.c: Likewise. * gcc.target/riscv/zbb-rol-ror-01.c: Likewise. * gcc.target/riscv/zbb-rol-ror-03.c: Likewise. * gcc.target/riscv/zbb-rol-ror-04.c: Likewise. * gcc.target/riscv/zbb-rol-ror-05.c: Likewise. * gcc.target/riscv/zbb-rol-ror-06.c: Likewise. * gcc.target/riscv/zbb-rol-ror-07.c: Likewise. * gcc.target/riscv/zbb-rol-ror-08.c: Likewise. * gcc.target/riscv/zbb-rol-ror-09.c: Likewise. * gcc.target/riscv/zbb-strlen.c: Likewise. * gcc.target/riscv/zbb_32_bswap-1.c: Likewise. * gcc.target/riscv/zbb_32_bswap-2.c: Likewise. * gcc.target/riscv/zbb_bswap-1.c: Likewise. * gcc.target/riscv/zbb_bswap-2.c: Likewise. * gcc.target/riscv/zbs-bclr.c: Likewise. * gcc.target/riscv/zbs-bext-02.c: Likewise. * gcc.target/riscv/zbs-bext.c: Likewise. * gcc.target/riscv/zbs-binv.c: Likewise. * gcc.target/riscv/zbs-bset.c: Likewise. * gcc.target/riscv/zero-scratch-regs-2.c: Likewise. * gcc.target/riscv/zicond-primitiveSemantics.c: Likewise. * gcc.target/riscv/zicond-primitiveSemantics_return_0_imm.c: Likewise. * gcc.target/riscv/zicond-primitiveSemantics_return_imm_imm.c: Likewise. * gcc.target/riscv/zicond-primitiveSemantics_return_imm_reg.c: Likewise. * gcc.target/riscv/zicond-primitiveSemantics_return_reg_reg.c: Likewise.
2023-09-27remove workaround for GCC 4.1-4.3 [PR105606]Jakub Jelinek3-29/+0
While looking into vec.h, I've noticed we still have a workaround for GCC 4.1-4.3 bugs. As we now use C++11 and thus need to be built by GCC 4.8 or later, I think this is now never used. 2023-09-27 Jakub Jelinek <jakub@redhat.com> PR c++/105606 * system.h (BROKEN_VALUE_INITIALIZATION): Don't define. * vec.h (vec_default_construct): Remove BROKEN_VALUE_INITIALIZATION workaround. * function.cc (assign_parm_find_data_types): Likewise.
2023-09-27RISC-V: Support FP roundeven auto-vectorizationPan Li8-0/+189
This patch would like to support auto-vectorization for the roundeven API in math.h. It depends on the -ffast-math option. When we would like to call roundeven like v2 = roundeven (v1), we will convert it into below insns (reference the implementation of llvm). * vfcvt.x.f v3, v1, RNE * vfcvt.f.x v2, v3 However, the floating point value may not need the cvt as above if its mantissa is zero. For example single precision floating point below. +-----------+---------------+-----------------+ | raw float | binary layout | after roundeven | +-----------+---------------+-----------------+ | 8388607.5 | 0x4affffff | 8388608.0 | | 8388608.0 | 0x4b000000 | 8388608.0 | | 8388609.0 | 0x4b000001 | 8388609.0 | +-----------+---------------+-----------------+ All single floating point glte 8388608.0 will have all zero mantisaa. We leverage vmflt and mask to filter them out in vector and only do the cvt on mask. Befor this patch: math-roundeven-1.c:21:1: missed: couldn't vectorize loop ... .L3: flw fa0,0(s0) addi s0,s0,4 addi s1,s1,4 call roundeven fsw fa0,-4(s1) bne s0,s2,.L3 After this patch: ... fsrmi 0 // Rounding to nearest, ties to even .L4: vfabs.v v1,v2 vmflt.vf v0,v1,fa5 vfcvt.x.f.v v3,v2,v0.t vfcvt.f.x.v v1,v3,v0.t vfsgnj.vv v1,v1,v2 bne .L4 .L14: fsrm a6 ret Please note VLS mode is also involved in this patch and covered by the test cases. We will add more run test with zfa support later. gcc/ChangeLog: * config/riscv/autovec.md (roundeven<mode>2): New pattern. * config/riscv/riscv-protos.h (enum insn_flags): New enum type. (enum insn_type): Ditto. (expand_vec_roundeven): New func decl. * config/riscv/riscv-v.cc (expand_vec_roundeven): New func impl. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/unop/math-roundeven-0.c: New test. * gcc.target/riscv/rvv/autovec/unop/math-roundeven-1.c: New test. * gcc.target/riscv/rvv/autovec/unop/math-roundeven-2.c: New test. * gcc.target/riscv/rvv/autovec/unop/math-roundeven-3.c: New test. * gcc.target/riscv/rvv/autovec/vls/math-roundeven-1.c: New test. Signed-off-by: Pan Li <pan2.li@intel.com>
2023-09-27DSE: Fix ICE when the mode with access_size don't exist on the target[PR111590]Juzhe-Zhong1-1/+2
hen doing fortran test with 'V' extension enabled on RISC-V port. I saw multiple ICE: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111590 The root cause is on DSE: internal compiler error: in smallest_mode_for_size, at stor-layout.cc:356 0x1918f70 smallest_mode_for_size(poly_int<2u, unsigned long>, mode_class) ../../../../gcc/gcc/stor-layout.cc:356 0x11f75bb smallest_int_mode_for_size(poly_int<2u, unsigned long>) ../../../../gcc/gcc/machmode.h:916 0x3304141 find_shift_sequence ../../../../gcc/gcc/dse.cc:1738 0x3304f1a get_stored_val ../../../../gcc/gcc/dse.cc:1906 0x3305377 replace_read ../../../../gcc/gcc/dse.cc:2010 0x3306226 check_mem_read_rtx ../../../../gcc/gcc/dse.cc:2310 0x330667b check_mem_read_use ../../../../gcc/gcc/dse.cc:2415 After investigations, DSE is trying to do optimization like this following codes: (insn 86 85 87 9 (set (reg:V4DI 168) (mem/u/c:V4DI (reg/f:DI 171) [0 S32 A128])) "bug.f90":6:18 discrim 6 1167 {*movv4di} (expr_list:REG_EQUAL (const_vector:V4DI [ (const_int 4 [0x4]) (const_int 1 [0x1]) repeated x2 (const_int 3 [0x3]) ]) (nil))) (set (mem) (reg:V4DI 168)) Then it ICE on: auto new_mode = smallest_int_mode_for_size (access_size * BITS_PER_UNIT); The access_size may be 24 or 32. We don't have such integer modes with these size so it ICE. TODO: The better way maybe make DSE use native_encode_rtx/native_decode_rtx but I don't know how to do that. So let's quickly fix this issue, we can improve the fix later. PR target/111590 gcc/ChangeLog: * dse.cc (find_shift_sequence): Check the mode with access_size exist on the target.
2023-09-27ifcvt: Fix commentsJuzhe-Zhong1-3/+3
Fix comments since original comment is confusing. gcc/ChangeLog: * tree-if-conv.cc (is_cond_scalar_reduction): Fix comments.
2023-09-27RISCV test infrastructure for d / v / zfh extensionsJoern Rennecke1-0/+161
gcc/testsuite/ * lib/target-supports.exp (check_effective_target_rv_float_abi_soft): New proc. (check_effective_target_riscv_d): Likewise. (check_effective_target_riscv_v): Likewise. (check_effective_target_riscv_zfh): Likewise. (check_effective_target_riscv_v_ok): likewise. (check_effective_target_riscv_zfh_ok): Likewise. (riscv_get_arch, add_options_for_riscv_v): Likewise. (add_options_for_riscv_zfh): Likewise. (add_options_for_riscv_d): Likewise.
2023-09-27RISC-V: Support FP trunc auto-vectorizationPan Li10-0/+251
This patch would like to support auto-vectorization for the trunc API in math.h. It depends on the -ffast-math option. When we would like to call trunc/truncf like v2 = trunc (v1), we will convert it into below insns (reference the implementation of llvm). * vfcvt.rtz.x.f v3, v1 * vfcvt.f.x v2, v3 However, the floating point value may not need the cvt as above if its mantissa is zero. Take single precision floating point as example: +------------+---------------+-----------------+ | raw float | binary layout | after trunc | +------------+---------------+-----------------+ | -8388607.5 | 0xcaffffff | -8388607.0 | | 8388607.5 | 0x4affffff | 8388607.0 | | 8388608.0 | 0x4b000000 | 8388608.0 | | 8388609.0 | 0x4b000001 | 8388609.0 | +------------+---------------+-----------------+ All single floating point >= 8388608.0 will have all zero mantisaa. We leverage vmflt and mask to filter them out in vector and only do the cvt on mask. Befor this patch: math-trunc-1.c:21:1: missed: couldn't vectorize loop ... .L3: flw fa0,0(s0) addi s0,s0,4 addi s1,s1,4 call trunc fsw fa0,-4(s1) bne s0,s2,.L3 After this patch: vfabs.v v2,v1 vmflt.vf v0,v2,fa5 vfcvt.rtz.x.f.v v4,v1,v0.t vfcvt.f.x.v v2,v4,v0.t vfsgnj.vv v2,v2,v1 bne .L4 Please note VLS mode is also involved in this patch and covered by the test cases. gcc/ChangeLog: * config/riscv/autovec.md (btrunc<mode>2): New pattern. * config/riscv/riscv-protos.h (expand_vec_trunc): New func decl. * config/riscv/riscv-v.cc (emit_vec_cvt_x_f_rtz): New func impl. (expand_vec_trunc): Ditto. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/unop/math-trunc-0.c: New test. * gcc.target/riscv/rvv/autovec/unop/math-trunc-1.c: New test. * gcc.target/riscv/rvv/autovec/unop/math-trunc-2.c: New test. * gcc.target/riscv/rvv/autovec/unop/math-trunc-3.c: New test. * gcc.target/riscv/rvv/autovec/unop/math-trunc-run-1.c: New test. * gcc.target/riscv/rvv/autovec/unop/math-trunc-run-2.c: New test. * gcc.target/riscv/rvv/autovec/vls/math-trunc-1.c: New test. Signed-off-by: Pan Li <pan2.li@intel.com>
2023-09-26Fix pr111456-1.c for targets that use unsigned char by defaultAndrew Pinski1-3/+3
This fixes the testcase to use an explicit `signed char` instead of plain `char`. Committed as obvious after a test with a cross to powerpc64-linux-gnu and x86_64-linux-gnu. gcc/testsuite/ChangeLog: PR testsuite/111603 * gcc.dg/tree-ssa/pr111456-1.c: Use `signed char` instead of plain `char`.
2023-09-26__atomic_test_and_set: Fall back to library, not non-atomic codeHans-Peter Nilsson2-16/+11
Make __atomic_test_and_set consistent with other __atomic_ and __sync_ builtins: call a matching library function instead of emitting non-atomic code when the target has no direct insn support. There's special-case code handling targetm.atomic_test_and_set_trueval != 1 trying a modified maybe_emit_sync_lock_test_and_set. Previously, if that worked but its matching emit_store_flag_force returned NULL, we'd segfault later on. Now that the caller handles NULL, gcc_assert here instead. While the referenced PR:s are ARM-specific, the issue is general. PR target/107567 PR target/109166 * builtins.cc (expand_builtin) <case BUILT_IN_ATOMIC_TEST_AND_SET>: Handle failure from expand_builtin_atomic_test_and_set. * optabs.cc (expand_atomic_test_and_set): When all attempts fail to generate atomic code through target support, return NULL instead of emitting non-atomic code. Also, for code handling targetm.atomic_test_and_set_trueval != 1, gcc_assert result from calling emit_store_flag_force instead of returning NULL.
2023-09-26testsuite: Require thread-fence for 29_atomics/atomic_flag/cons/value_init.ccHans-Peter Nilsson1-0/+1
A recent patch made __atomic_test_and_set no longer fall back to emitting non-atomic code, but instead will then emit a call to __atomic_test_and_set, thereby exposing the need to gate also this test on support for atomics, similar to r14-3980-g62b29347c38394. libstdc++-v3: * testsuite/29_atomics/atomic_flag/cons/value_init.cc: Add dg-require-thread-fence.
2023-09-26RISC-V: Add zicond testsXiao Zeng4-0/+268
These are tests from patch 3/5 of Ziao Zeng's zicond submission. gcc/testsuite/ChangeLog: * gcc.target/riscv/zicond-primitiveSemantics_return_0_imm.c: New test. * gcc.target/riscv/zicond-primitiveSemantics_return_imm_imm.c: New test. * gcc.target/riscv/zicond-primitiveSemantics_return_imm_reg.c: New test. * gcc.target/riscv/zicond-primitiveSemantics_return_reg_reg.c: New test. Co-Authored-By: Jeff Law <jlaw@ventanamicro.com>
2023-09-26Ensure ssa_name is still valid.Andrew MacLeod2-3/+22
When the IL changes, an equivalence set may contain ssa_names that no longer exist. Ensure names are still valid and not in the free list. PR tree-optimization/111599 gcc/ * value-relation.cc (relation_oracle::valid_equivs): Ensure ssa_name is valid. gcc/testsuite/ * gcc.dg/pr111599.c: New.
2023-09-26PR modula2/111510 runtime ICE findChildAndParent has caused internal runtime ↵Gaius Mulley3-19/+23
error This patch fixes the runtime bug above. The full runtime message is: findChildAndParent has caused internal runtime error, RTentity is either corrupt or the module storage has not been initialized yet. The bug is due to a non nul terminated string determining the module initialization order. This results in modules being uninitialized and the above crash. The bug manifests itself on 32 bit systems - but obviously is latent on all targets and the fix should be applied to both gcc-14 and gcc-13. gcc/m2/ChangeLog: PR modula2/111510 * gm2-compiler/M2GenGCC.mod (IsExportedGcc): Minor spacing changes. (BuildTrashTreeFromInterface): Minor spacing changes. * gm2-compiler/M2Options.mod (GetRuntimeModuleOverride): Call string to generate a nul terminated C style string. * gm2-compiler/M2Quads.mod (BuildStringAdrParam): New procedure. (BuildM2InitFunction): Replace inline parameter generation with calls to BuildStringAdrParam. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-09-26AArch64: Remove BTI from outline atomicsWilco Dijkstra1-3/+3
The outline atomic functions have hidden visibility and can only be called directly. Therefore we can remove the BTI at function entry. This improves security by reducing the number of indirect entry points in a binary. The BTI markings on the objects are still emitted. libgcc/ChangeLog: * config/aarch64/lse.S (BTI_C): Remove define.
2023-09-26MATCH: Simplify `(A ==/!= B) &/| (((cast)A) CMP C)`Andrew Pinski4-30/+139
This patch adds support to the pattern for `(A == B) &/| (A CMP C)` where the second A could be casted to a different type. Some were handled correctly if using seperate `if` statements but not if combined with BIT_AND/BIT_IOR. In the case of pr111456-1.c, the testcase would pass if `--param=logical-op-non-short-circuit=0` was used but now can be optimized always. OK? Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/106164 PR tree-optimization/111456 gcc/ChangeLog: * match.pd (`(A ==/!= B) & (A CMP C)`): Support an optional cast on the second A. (`(A ==/!= B) | (A CMP C)`): Likewise. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/cmpbit-6.c: New test. * gcc.dg/tree-ssa/cmpbit-7.c: New test. * gcc.dg/tree-ssa/pr111456-1.c: New test.
2023-09-26PHIOPT: Fix minmax_replacement for three wayAndrew Pinski2-2/+45
So when diamond bb support was added to minmax_replacement in r13-1950-g9bb19e143cfe, the code was not expecting the alt_middle_bb not to exist if it was empty (for threeway_p). So when factor_out_conditional_conversion was used to factor out conversions, it turns out the assumption for alt_middle_bb to be wrong and we ended up with threeway_p being true but having middle_bb being empty but alt_middle_bb not being empty which causes wrong code in many cases. This patch fixes the issue by adding a test for the 2 cases where the assumption on threeway_p case having the other bb being empty. Changes made: v2: Fix test for `(a <= u) b = MAX(a, d) else b = u`. Note my plan for GCC 15 is remove minmax_replacement as match.pd will catch all cases at that point. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/111469 gcc/ChangeLog: * tree-ssa-phiopt.cc (minmax_replacement): Fix the assumption for the `non-diamond` handling cases of diamond code. gcc/testsuite/ChangeLog: * gcc.c-torture/execute/pr111469-1.c: New test.
2023-09-26MATCH: Optimize COND_ADD reduction patternJuzhe-Zhong1-2/+5
Current COND_ADD reduction pattern can't optimize floating-point vector. As Richard suggested: https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631336.html Allow COND_ADD reduction pattern to optimize floating-point vector. Bootstrap and Regression is running. Ok for trunk if tests pass ? gcc/ChangeLog: * match.pd: Optimize COND_ADD reduction pattern.
2023-09-26MATCH: Optimize COND_ADD_LEN reduction patternJuzhe-Zhong3-0/+66
This patch leverage this commit: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=62b505a4d5fc89 to optimize COND_LEN_ADD reduction pattern. We are doing optimization of VEC_COND_EXPR + COND_LEN_ADD -> COND_LEN_ADD. Consider thsi following case: void pr11594 (uint64_t *restrict a, uint64_t *restrict b, int loop_size) { uint64_t result = 0; for (int i = 0; i < loop_size; i++) { if (b[i] <= a[i]) { result += a[i]; } } a[0] = result; } Before this patch: vsetvli a7,zero,e64,m1,ta,ma vmv.v.i v2,0 vmv1r.v v3,v2 --- redundant .L3: vsetvli a5,a2,e64,m1,ta,ma vle64.v v1,0(a3) vle64.v v0,0(a1) slli a6,a5,3 vsetvli a7,zero,e64,m1,ta,ma sub a2,a2,a5 vmsleu.vv v0,v0,v1 add a1,a1,a6 vmerge.vvm v1,v3,v1,v0 ---- redundant. add a3,a3,a6 vsetvli zero,a5,e64,m1,tu,ma vadd.vv v2,v2,v1 bne a2,zero,.L3 li a5,0 vsetvli a4,zero,e64,m1,ta,ma vmv.s.x v1,a5 vredsum.vs v2,v2,v1 vmv.x.s a5,v2 sd a5,0(a0) ret After this patch: vsetvli a6,zero,e64,m1,ta,ma vmv.v.i v1,0 .L3: vsetvli a5,a2,e64,m1,ta,ma vle64.v v2,0(a4) vle64.v v0,0(a1) slli a3,a5,3 vsetvli a6,zero,e64,m1,ta,ma sub a2,a2,a5 vmsleu.vv v0,v0,v2 add a1,a1,a3 vsetvli zero,a5,e64,m1,tu,mu add a4,a4,a3 vadd.vv v1,v1,v2,v0.t bne a2,zero,.L3 li a5,0 vsetivli zero,1,e64,m1,ta,ma vmv.s.x v2,a5 vsetvli a5,zero,e64,m1,ta,ma vredsum.vs v1,v1,v2 vmv.x.s a5,v1 sd a5,0(a0) ret Bootstrap && Regression is running. Ok for trunk when testing passes ? PR tree-optimization/111594 PR tree-optimization/110660 gcc/ChangeLog: * match.pd: Optimize COND_LEN_ADD reduction. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/cond/cond_reduc-1.c: New test. * gcc.target/riscv/rvv/autovec/cond/pr111594.c: New test.
2023-09-26ada: Fix missing call to Finalize_Protection for simple protected objectsEric Botcazou2-11/+40
There is a glitch in Exp_Ch7.Build_Finalizer causing the finalizer to do nothing for simple protected objects. The change also removes redundant calls to the Is_Simple_Protected_Type predicate and fixes a minor inconsistency between Requires_Cleanup_Actions and Build_Finalizer for this case. gcc/ada/ * exp_ch7.adb (Build_Finalizer.Process_Declarations): Remove call to Is_Simple_Protected_Type as redundant. (Build_Finalizer.Process_Object_Declaration): Do not retrieve the corresponding record type for simple protected objects. Make the flow of control more explicit in their specific processing. * exp_util.adb (Requires_Cleanup_Actions): Return false for simple protected objects present in library-level package bodies for the sake of consistency with Build_Finalizer and remove call to Is_Simple_Protected_Type as redundant.
2023-09-26ada: Fix deferred constant wrongly rejectedEric Botcazou1-2/+4
This recent regression occurs when the nominal subtype of the constant is a discriminated record type with default discriminants. gcc/ada/ PR ada/110488 * sem_ch3.adb (Analyze_Object_Declaration): Do not build a default subtype for a deferred constant in the definite case too.
2023-09-26ada: Fix unnesting generated loops with nested finalization procedureMarc Poulhiès2-10/+85
The compiler can generate loops for creating array aggregates, for example used during the initialization of variable. If the component type of the array element requires finalization, the compiler also creates a block and a nested procedure that need to be correctly unnested if unnesting is enabled. During the unnesting transformation, the scopes for these inner blocks need to be fixed and set to the enclosing loop entity. gcc/ada/ * exp_ch7.adb (Contains_Subprogram): Recursively search for subp in loop's statements. (Unnest_Loop)<Fixup_Inner_Scopes>: New. (Unnest_Loop): Rename local variable for more clarity. * exp_unst.ads: Refresh comment.
2023-09-26ada: Crash processing the accessibility level of an actual parameterJavier Miranda1-7/+17
gcc/ada/ * exp_ch6.adb (Expand_Call_Helper): When computing the accessibility level of an actual parameter based on the expresssion of a constant declaration, add missing support for deferred constants
2023-09-26ada: Fix missing finalization of extended return object on abnormal completionEric Botcazou4-12/+12
This happens in the case of a nonlimited return type and is a fallout of the optimization recently implemented for them. gcc/ada/ * einfo.ads (Status_Flag_Or_Transient_Decl): Remove ??? comment. * exp_ch6.adb (Expand_N_Extended_Return_Statement): Extend the handling of finalizable return objects to the non-BIP case. * exp_ch7.adb (Build_Finalizer.Process_Declarations): Adjust the comment accordingly. * exp_util.adb (Requires_Cleanup_Actions): Likewise.
2023-09-26ada: Update personality function for CHERI purecapDaniel King1-3/+36
This makes two changes to the GNAT personality function to reflect differences for pure capability CHERI/Morello. The first is to use __builtin_code_address_from_pointer to drop the LSB from Morello code pointers when searching through call-site tables (without this we would never find the right landing pad when unwinding). The second change is to reflect the change in the exception table format for pure-capability Morello where the landing pad is a capability indirected by an offset in the call-site table. gcc/ada/ * raise-gcc.c (get_ip_from_context): Adapt for CHERI purecap (get_call_site_action_for): Adapt for CHERI purecap