| Age | Commit message (Collapse) | Author | Files | Lines |
|
devel/gfortran-test
|
|
There are some single PHI groups that can benefit from an initial
value. Also improve the iteration calculation by bounding each
iteration with the known global value.
PR tree-optimization/121345
gcc/
* gimple-range-phi.cc (phi_group::phi_group): Add modifier name.
(phi_group::is_modifier_p): Set modifier stmt operand name.
(phi_group::calculate_using_modifier): Bound the iteration range
by known global range.
(phi_analyzer::process_phi): Allow single PHIS if they meet certain
criteria.
* gimple-range-phi.h (m_modifier_name): New member.
(is_modifier_p): Adjust prototype.
gcc/testsuite/
* g++.dg/pr121345.C: New.
|
|
Rather than having a dynamic analyzer around that is handcuffed by
only global values, invoke it as a prepass in VRP and put all values it finds
in the query's global cache via update_range_info.
gcc/
* gimple-range-fold.cc (fold_using_range::range_of_phi): Remove
the PHI analysis query.
* gimple-range-phi.cc (phi_analysis_object): Delete.
(phi_analysis_initialize): Delete.
(phi_analysis_finalize): Delete.
(phi_analysis_available_p): Delete.
(phi_analysis): Invoke a phi analyzer.
(phi_analyzer::phi_analyzer): Preprocess all phi nodes and set
global values for them in a query.
(phi_analyzer::process_phi): Use query, and export any inital
values found to the query.
* gimple-range-phi.h (m_global): Delete.
(phi_analysis_initialize): Delete.
(phi_analysis_finalize): Delete.
(phi_analysis_available_p): Delete.
(phi_analysis): Change prototype.
* tree-vrp.cc (execute_ranger_vrp): Call phi_analysis.
gcc/testsuite/
* gcc.dg/pr102983.c: Adjust final check.
|
|
Whena relation is registered between 2 ssa-names, update their timestamps.
Any calculations using those names will be stale and forced to recalculate.
* gimple-range-cache.cc (ranger_cache::update_consumers): New.
* gimple-range-cache.h (update_consumers): New prototype.
* gimple-range-fold.cc (fur_depend::fur_depend): Add cache ptr.
(fur_depend::register_relation): call update_consumers.
* gimple-range-fold.h (fur_depend): Add a cache pointer.
* gimple-range.cc (gimple_ranger::fold_range_internal): Add cache ptr.
|
|
This ensures a the current range_query's internal tracking of a global value
matches anything another entity sets.
* gimple-range.cc (gimple_ranger::update_range_info): New.
* gimple-range.h (update_range_info): New prototype.
* tree-ssanames.cc (set_range_info): Update the range info for
the current range query.
* value-query.h (update_range_info): New prototype.
* value-query.cc (update_range_info): New default stub.
|
|
I had messed up the check in r16-5258-g1d8e2d51e5c5cb for preheaders
where return to remvoe the forwarder preheader block even if LOOPS_HAVE_PREHEADERS
was set. I am not sure how often this happens because most of the time the pre-header
will have an incoming phi block anyways but it is safer not to remove it in this case.
Bootstrapped and tested on x86_64-linux-gnu.
gcc/ChangeLog:
* tree-cfgcleanup.cc (tree_forwarder_block_p): Restore check on
LOOPS_HAVE_PREHEADERS.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
|
|
For most configurations bits/std_mutex.h would already be included by
<syncstream>, but not if configured with _GLIBCXX_USE_CXX11_ABI=0 as the
default, because syncbuf is disabled in that case.
libstdc++-v3/ChangeLog:
PR libstdc++/122698
* src/c++20/syncbuf.cc (__syncbuf_get_mutex): Include <mutex>.
Fix indentation of function body.
|
|
/usr/ccs/bin has been replaced by a symlink to /usr/bin since at least
Solaris 11.3, so there's no reason to use that path any longer.
This patch removes all references to it.
Tested on i386-pc-solaris2.11.
2025-11-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (md_exec_prefix): Don't set on Solaris.
* configure: Regenerate.
contrib:
* make_sunver.pl ($elfdump): Remove ccs from path.
gcc:
* config/sol2.h (MD_EXEC_PREFIX): Remove.
libstdc++-v3:
* scripts/extract_symvers.pl: Remove ccs from elfdump path.
|
|
[PR122625]
r16-4930-gfd5c057c2d01 ensured that we noted all class-scope variables.
But I also added a clause to 'read_var_def' to skip all class-scope
instantiations, under the mistaken belief that this would be handled in
read_class_def.
But as the testcase shows, read_class_def cannot (and should not)
register instantiations of member variable templates, as when reading
the class it just sees the template declaration. So this patch
re-enables tracking instantiations of class-scope variable templates.
PR c++/122625
gcc/cp/ChangeLog:
* module.cc (trees_in::read_var_def): Also track class-scope
primary template specialisations.
gcc/testsuite/ChangeLog:
* g++.dg/modules/inst-7_a.C: New test.
* g++.dg/modules/inst-7_b.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jason Merrill <jason@redhat.com>
|
|
The following makes us always start with LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P
as true and only makes vect_determine_partial_vectors_and_peeling
honor --param vect-partial-vector-usage or explicit requests from the
target for epilog vectorization. This exposes whether we could have
used partial vectors to the target at costing time as even when the
main loop is never supposed to get masked the value is useful to
determine possible epilog loop masking.
* tree-vect-loop.cc (_loop_vec_info::_loop_vec_info):
Initialize can_use_partial_vectors_p to true.
(vect_determine_partial_vectors_and_peeling): Add masked_p
parameter and honor it.
(vect_analyze_loop_2): Pass through masked_p.
(vect_analyze_loop_1): Pass down masked_p.
(vect_analyze_loop): Simplify check on possible masking of
the epilog when there's no .WHILE_ULT.
|
|
The following makes us decide on partial vectors first so we can
use LOOP_VINFO_USING_PARTIAL_VECTORS_P to decide on a decrementing IV
and LOOP_VINFO_USING_SELECT_VL_P as followup.
* tree-vect-loop.cc (vect_determine_partial_vectors_and_peeling):
Remove resetting of LOOP_VINFO_USING_SELECT_VL_P.
(vect_analyze_loop_2): Decide on partial vectors before
deciding on decrementing IV or .SELECT_VL usage.
|
|
It gets more difficult to maintain this doesn't do any changes late
(see followups), so kill it. We do have to retain re-setting of
LOOP_VINFO_PEELING_FOR_NITER though, since
vect_need_peeling_or_partial_vectors_p is incorrect for epilogues
when done during analysis. We should fix this of course.
* tree-vectorizer.h (vect_determine_partial_vectors_and_peeling):
Remove.
(vect_need_peeling_or_partial_vectors_p): Declare.
* tree-vect-loop.cc (vect_determine_partial_vectors_and_peeling):
Make static.
(vect_need_peeling_or_partial_vectors_p): Export.
* tree-vect-loop-manip.cc (vect_do_peeling): Do not call
vect_determine_partial_vectors_and_peeling but instead
re-compute LOOP_VINFO_PEELING_FOR_NITER using
vect_need_peeling_or_partial_vectors_p.
|
|
This is a write-only parameter, it cannot be relied upon either.
So remove it.
* tree-vectorizer.h (_loop_vec_info::epil_using_partial_vectors_p):
Remove.
(LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P): Likewise.
* tree-vect-loop.cc (_loop_vec_info::_loop_vec_info):
Do not initialize epil_using_partial_vectors_p.
(vect_determine_partial_vectors_and_peeling): Do not set it.
|
|
When adding support for 64-bit location_t in GCC 15, I missed a couple
changes needed for the internal debugging tool -fdump-internal-locations to
work properly. This would previously ICE on a location_t large enough to
overflow a signed 32-bit int.
gcc/ChangeLog:
* diagnostics/context.cc (num_digits): Change argument type from
`int' to `uint64_t'.
(test_num_digits): Add test for 64-bit argument.
* diagnostic.h (num_digits): Adjust prototype.
* input.cc (write_digit): Accept argument in range 0-9 instead of
an arbitrary int.
(write_digit_row): Adjust to change in write_digit().
gcc/testsuite/ChangeLog:
* gcc.dg/plugin/location-overflow-test-3.c: New test.
* gcc.dg/plugin/plugin.exp: Add the new test.
|
|
This testcase now passes for aarch64 after r16-5258-1d8e2d51e5c5.
The keeping around the loop pre-header helped to better thread the jumps
and fix the issue at hand.
Pushed as obvious.
gcc/testsuite/ChangeLog:
* g++.dg/tree-ssa/pr117123.C: un-xfail.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
|
|
Fixed the iteration number in crc-crc32-data16.c test from 8 to 16 to
match the test name, just like in r15-9038-gdf55a933cfc675.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/crc-crc32-data16.c: Fix iteration
count to match testname.
|
|
|
|
libstdc++-v3/ChangeLog:
* include/bits/atomic_base.h: Tweak grammar of static assert
messages for unsupported atomic wait on volatile.
|
|
libstdc++-v3/ChangeLog:
* src/c++20/atomic.cc (__wait_impl): Fix outdated comment.
(__wait_until_impl): Simplify return statements.
|
|
Wrapped stdint.h for AArch64 MinGW32 is useful for bare-matal PE
target e.g. UEFI, as those platform does not provide a system
stdint.h, this would align with x86_64 mingw32 target which provides a
wrapped stdint.h
I have tested this by compiling a AArch64 UEFI Application using gcc's
stdint.h, with -ffreestanding flag, and execute the application with
AAVMF(edk2) inside QEMU.
gcc/ChangeLog:
* config.gcc (aarch64-*-mingw*): Set use_gcc_stdint to wrap.
|
|
The extern template __shared_ptr<filesystem::_Dir> in bits/fs_dir.h was
leading to an ICE in import_export_decl in 29_atomics/atomic_ref/address.cc
because we had the nonsensical combination of DECL_REALLY_EXTERN and
!DECL_INTERFACE_KNOWN. This turned out to be because mark_decl_instantiated
was exiting early if TREE_ASM_WRITTEN since way back in the pre-cgraph days,
and expand_or_defer_fn_1 sets TREE_ASM_WRITTEN on maybe-in-charge ctors.
The mark_decl_instantiated code is long-obsolete, so let's just remove it.
gcc/cp/ChangeLog:
* module.cc (trees_out::write_function_def): Check flag consistency.
* pt.cc (mark_decl_instantiated): Ignore TREE_ASM_WRITTEN.
|
|
Yet more infrastructure on our way to eliminating some define_insn_and_split
constructs.
The RISC-V port is using gen_extend_insn to directly generate a SIGN or ZERO
extend insn. This is undesirable because we don't actually have a full set of
extension instructions, particularly zero extension for the base architecture.
We've gotten away with this because we've had a define_insn_and_splits which
claim to support the full set of zero/sign extensions. We very much want to
eliminate that little white lie. So we need to fix those pesky calls to
gen_extend_insn.
Similar to a patch from earlier this week convert_modes comes to the rescue.
It'll run through the expander path allowing us to generate the desired code.
In most cases it's a trivial replacement.
One case is left in the tree. For that case the source operand is known to be
a MEM and we can always extend a load from a MEM. Converting this one would
result in infinite recursion through riscv_legitimize_move.
One case is perhaps nontrivial. convert_move will emit the code to perform the
conversion into a fresh pseudo register. In one case we need to make sure that
value is copied into the output register for an insn. So a trivial
emit_move_insn is needed.
Built and regression tested on riscv32-elf and riscv64-elf. It's also
bootstrapped on the Pioneer. Regression testing is in progress, but won't
finish for many hours. The BPI is spinning this change right now, but won't
have results until tomorrow night.
gcc/
* config/riscv/riscv.cc (risc_legitimize_move): Use convert_modes
rather than gen_extend_insn for most cases.
* config/riscv/riscv.md (addv<mode>4): Likewise.
(uaddv<mode>4, subv<mode>4, usubv<mode>4): Likewise.
(mulv<mode>4, umulv<mode>4): Likewise.
* config/riscv/sync.md (atomic_compare_and_swap<mode>): Likewise.
|
|
Here is a fix for the test I've talked about today in the libsanitizer
update mail.
The test relied on a coming before b coming before c, all with 32 byte
distances, but gcc can actually emit them in the exact opposite order
or some other one.
2025-11-15 Jakub Jelinek <jakub@redhat.com>
* c-c++-common/asan/asan-stack-small.c (pa, pb, pc): Make these
vars volatile.
(uintptr_t): New typedef.
(main): Use access of b using pa pointer with offset depending on
how exactly the 3 variables are laid out in the frame.
|
|
Andrew's recent r16-5258 change broke bootstrap on x86_64-linux with
cobol enabled, the error is
../../gcc/cobol/lexio.cc: In function ‘std::pair<std::__cxx11::list<replace_t>,
char*> parse_replace_pairs(const char*, const char*, bool)’:
../../gcc/cobol/lexio.cc:907:76: error: ‘%.*s’ directive argument is null
[-Werror=format-overflow=]
907 | dbgmsg( "%s:%d: %s: " HOST_SIZE_T_PRINT_UNSIGNED " pairs parsed from '%.*s'",
| ^~~~
The problem is that some jump threading is happening now that didn't happen
before and a dbgmsg call is duplicated, once with 0, NULL as the last two
arguments, once with some size and pointer.
The following patch makes sure we never call it with NULL pointer, even when
the size is 0, to silence the warning.
2025-11-15 Jakub Jelinek <jakub@redhat.com>
PR cobol/122691
* lexio.cc (parse_replace_pairs): Replace parsed.stmt.p with
parsed.stmt.size() ? parsed.stmt.p : "" in the last argument to
dbgmsg.
|
|
If a user wrote #include and the .gcm we found won't work, instead of
failing the compile let's do the #include that the source code called for.
This case also prints a note about the failure, like those from
-flang-info-include-translate{,-not} but unconditional.
gcc/cp/ChangeLog:
* module.cc (module_state::read_config): Add complain parm.
(module_state::open_slurp): Split out...
(module_state::do_import): ...from here.
(module_state::read_initial): Move begin call to open_slurp.
(module_state::check_importable): New.
(maybe_translate_include): Call it.
|
|
Building std.compat.cc was crashing for me because we would first get a
pointer into imported_temploid_friends, then insert a new entry, causing the
hash_map to expand, and then dereference the pointer into the former
location of the hash table. Fixed by dereferencing the pointer before
inserting rather than after.
gcc/cp/ChangeLog:
* module.cc (transfer_defining_module): Dereference
pointer into hash_map before possible insertion.
|
|
Here, when we try to bring "memset" back into the global namespace, we find
the built-in, see that it's the same declaration (because the module brought
it into the other namespace with a using-declaration), and decide that we
don't need to do anything. But we still need a non-hidden overload.
gcc/cp/ChangeLog:
* name-lookup.cc (do_nonmember_using_decl): Handle hidden better.
gcc/testsuite/ChangeLog:
* g++.dg/modules/using-33_a.C: New test.
* g++.dg/modules/using-33_b.C: New test.
|
|
23_containers/mdspan/layouts/padded.cc was failing because on load we were
wrongly treating the __get_static_stride friends as equivalent between
layout_left_padded and layout_right_padded. This happened because we were
wrongly pushing these declarations into namespace scope even though we don't
yet know what template they instantiate. Fixed by using the same
MK_local_friend mechanism as template friends.
gcc/cp/ChangeLog:
* decl.cc (grokfndecl): Set DECL_CHAIN of a friend f<>.
* module.cc (trees_out::get_merge_kind): Give it MK_local_friend.
(trees_out::decl_container): Its container is the befriender.
(trees_out::key_mergeable): Expand comment.
* cp-tree.h (decl_specialization_friend_p): New.
* friend.cc (do_friend): Use it.
* pt.cc (tsubst_friend_function): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/modules/friend-11_a.C: New test.
* g++.dg/modules/friend-11_b.C: New test.
|
|
The `mov<GPF:mode><GPI:mode>cc` expander was not used anywhere. Delete
it.
gcc/ChangeLog:
* config/aarch64/aarch64.md (mov<GPF:mode><GPI:mode>cc): Delete.
|
|
Deduplicate the checks against `ccmode` by extracting to a new
predicate.
gcc/ChangeLog:
* config/aarch64/aarch64.md(mov<ALLI_GPF:mode>cc): Use new predicate.
(mov<GPF:mode><GPI:mode>cc): Likewise.
(<neg_not_op><mode>cc): Likewise.
* config/aarch64/predicates.md (aarch64_comparison_operator_cc):
New predicate.
|
|
The checks for `code == UNEQ || code == LTGT` are unecessary, because
they are already excluded by `aarch64_comparison_operator`
gcc/ChangeLog:
* config/aarch64/aarch64.md (mov<ALLI_GPF:mode>): Delete
redundant check.
(mov<GPF:mode><GPI:mode>cc): Likewise.
(<neg_not_op><mode>cc): Likewise.
|
|
The bodies of `mov<ALLI>cc` and `mov<GPF>cc` are identical, so merge
them by using a new mode iterator that combines `ALLI` and `GPF`.
gcc/ChangeLog:
* config/aarch64/aarch64.md (mov<ALLI>cc): Merge with ...
(mov<ALLI>cc): ... this.
* config/aarch64/iterators.md(ALLI_GPF): New mode iterator.
|
|
Apply the same fix from bc11cbff9e648fdda2798bfa2d7151d5cd164b87
("aarch64: Fix condition accepted by mov<ALLI>cc") to `MOV<GPF>cc`.
Fixes ICEs when compiling code such as `cmpbr-4.c` and `cmpbr-5.c` with `+cmpbr`.
gcc/ChangeLog:
* config/aarch64/aarch64.md(mov<GPF>cc): Accept MODE_CC
conditions directly; reject QI/HImode conditions.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/cmpbr-4.c: New test.
* gcc.target/aarch64/cmpbr-5.c: New test.
|
|
|
|
gcc/testsuite
* gcc.target/riscv/rvv/vsetvl/avl_single-37.c: Drop unnecessary output
test(s).
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-1.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-2.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-3.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-4.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-5.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-6.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-7.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-8.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-9.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-10.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-11.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-12.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-13.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-14.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-15.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-16.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-17.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-18.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-19.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-20.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-21.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-22.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-23.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-24.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-25.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-26.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-27.c: Likewise.
* gcc.target/riscv/rvv/vsetvl/vlmax_phi-28.c: Likewise.
|
|
gcc/ChangeLog:
* config/riscv/riscv.cc (andes_25_tune_info): Add prefer-agnostic.
|
|
Implement sqrshr, sqshl, srshr, uqrshl, uqshl and urshr using the new
MVE builtins framework.
The patch fixes a probable copy/paste typo in mve_sqshl_si and
mve_srshr_si: operand 1 should have mode SI, and not DI.
gcc/ChangeLog:
* config/arm/arm-mve-builtins-base.cc (enum which_scalar_shift):
Add ss_SQRSHR, ss_SQSHL, ss_SRSHR, ss_UQRSHL, ss_UQSHL, and
ss_URSHR.
(mve_function_scalar_shift): Add support for ss_SQRSHR, ss_SQSHL,
ss_SRSHR, ss_UQRSHL, ss_UQSHL, and ss_URSHR.
(sqrshr, sqshl, srshr, uqrshl, uqshl, urshr): New.
* config/arm/arm-mve-builtins-base.def (sqrshr, sqshl, srshr)
(uqrshl, uqshl, urshr): New.
* config/arm/arm-mve-builtins-base.h (sqrshr, sqshl, srshr)
(uqrshl, uqshl, urshr): New.
* config/arm/arm-mve-builtins-shapes.cc (scalar_s32_shift): New.
(scalar_s32_shift_imm): New.
(scalar_u32_shift): New.
(scalar_u32_shift_imm): New.
* config/arm/arm-mve-builtins-shapes.h (scalar_s32_shift): New.
(scalar_s32_shift_imm): New.
(scalar_u32_shift): New.
(scalar_u32_shift_imm): New.
* config/arm/arm_mve.h (sqrshr): Delete.
(sqshl): Delete.
(srshr): Delete.
(uqrshl): Delete.
(uqshl): Delete.
(urshr): Delete.
(__arm_uqrshl): Delete.
(__arm_sqrshr): Delete.
(__arm_uqshl): Delete.
(__arm_urshr): Delete.
(__arm_sqshl): Delete.
(__arm_srshr): Delete.
* config/arm/mve.md (mve_sqshl_si, mve_srshr_si): Fix operand 1
mode.
gcc/testsuite/ChangeLog:
* gcc.target/arm/mve/intrinsics/sqshl_check_shift.c: New test.
* gcc.target/arm/mve/intrinsics/srshr_check_shift.c: New test.
* gcc.target/arm/mve/intrinsics/uqshl_check_shift.c: New test.
* gcc.target/arm/mve/intrinsics/urshr_check_shift.c: New test.
|
|
Implement sqshll, srshrl, uqshll and urshrl using the new MVE builtins
framework.
gcc/ChangeLog:
* config/arm/arm-mve-builtins-base.cc (enum which_scalar_shift):
Add ss_SQSHLL, ss_SRSHRL, ss_UQSHLL, ss_URSHRL.
(mve_function_scalar_shift): Add support for ss_SQSHLL, ss_SRSHRL,
ss_UQSHLL, ss_URSHRL.
* config/arm/arm-mve-builtins-base.def (sqshll, srshrl, uqshll)
(urshrl): New.
* config/arm/arm-mve-builtins-base.h (sqshll, srshrl, uqshll)
(urshrl): New.
* config/arm/arm-mve-builtins-shapes.cc (scalar_s64_shift_imm)
(scalar_u64_shift_imm): New.
* config/arm/arm-mve-builtins-shapes.h (scalar_s64_shift_imm)
(scalar_u64_shift_imm): New.
* config/arm/arm_mve.h (sqshll): Delete.
(srshrl): Delete.
(uqshll): Delete.
(urshrl): Delete.
(__arm_uqshll): Delete.
(__arm_urshrl): Delete.
(__arm_srshrl): Delete.
(__arm_sqshll): Delete.
gcc/testsuite/ChangeLog:
* gcc.target/arm/mve/intrinsics/sqshll_check_shift.c: New test.
* gcc.target/arm/mve/intrinsics/srshrl_check_shift.c: New test.
* gcc.target/arm/mve/intrinsics/uqshll_check_shift.c: New test.
* gcc.target/arm/mve/intrinsics/urshrl_check_shift.c: New test.
|
|
Implement sqrshrl and sqrshrl_sat48 using the new MVE builtins
framework.
gcc/ChangeLog:
* config/arm/arm-mve-builtins-base.cc (enum which_scalar_shift):
Add ss_SQRSHRL, ss_SQRSHRL_SAT48.
(mve_function_scalar_shift): Add support for ss_SQRSHRL,
ss_SQRSHRL_SAT48.
(sqrshrl, sqrshrl_sat48): New.
* config/arm/arm-mve-builtins-base.def (sqrshrl, sqrshrl_sat48): New.
* config/arm/arm-mve-builtins-base.h (sqrshrl, sqrshrl_sat48): New.
* config/arm/arm_mve.h (sqrshrl): Delete.
(sqrshrl_sat48): Delete.
(__arm_sqrshrl): Delete.
(__arm_sqrshrl_sat48): Delete.
* config/arm/mve.md (mve_sqrshrl_sat<supf>_di): Add '@' prefix.
|
|
Implement uqrshll and uqrshll_sat48 using the new MVE builtins
framework.
gcc/ChangeLog:
* config/arm/arm-mve-builtins-base.cc (enum which_scalar_shift):
Add ss_UQRSHLL, ss_UQRSHLL_SAT48.
(mve_function_scalar_shift): Add support for ss_UQRSHLL,
ss_UQRSHLL_SAT48.
* config/arm/arm-mve-builtins-base.def (uqrshll, uqrshll_sat48):
New.
* config/arm/arm-mve-builtins-base.h (uqrshll, uqrshll_sat48):
New.
* config/arm/arm_mve.h (uqrshll): Delete.
(uqrshll_sat48): Delete.
(__arm_uqrshll): Delete.
(__arm_uqrshll_sat48): Delete.
* config/arm/mve.md (mve_uqrshll_sat<supf>_di): Add '@' prefix.
|
|
Implement vpnot using the new MVE builtins framework.
gcc/ChangeLog:
* config/arm/arm-mve-builtins-base.cc (class mve_function_vpnot): New.
(vpnot): New.
* config/arm/arm-mve-builtins-base.def (vpnot): New.
* config/arm/arm-mve-builtins-base.h (vpnot): New.
* config/arm/arm-mve-builtins-shapes.cc (struct vpnot): New.
* config/arm/arm-mve-builtins-shapes.h (vpnot): New.
* config/arm/arm_mve.h (vpnot): Delete.
(__arm_vpnot): Delete.
|
|
A user pointed out that, in DAP mode, gdb would hang while trying to
display a certain vector. See
https://sourceware.org/bugzilla/show_bug.cgi?id=33594
This is caused by a combination of things: the vector is
uninitialized, DAP requires a count of the number of children of a
variable, and libstdc++ printers don't implement the 'num_children'
method, so gdb tries to count children by iterating.
In this case, the vector has a nonsensical size:
(gdb) p myVector
$1 = std::vector of length -34979931, capacity -33992726
This patch adds a 'num_children' method to a subset of the
pretty-printers, in particular ones where I thought the length might
be arbitrarily large and susceptible to being garbage when the object
isn't initialized.
I've also specifically added a check to the vector printer for the
case where the length is negative.
These container printers could be further improved by adding the
'child' method, allowing random access to child objects. However I
haven't done that here.
libstdc++-v3/ChangeLog
* python/libstdcxx/v6/printers.py (StdVectorPrinter._bounds):
New method.
(StdVectorPrinter.to_string): Use it.
(StdVectorPrinter.num_children): New method.
(StdStackOrQueuePrinter.num_children): New method.
(StdMapPrinter.num_children): New method.
(StdSetPrinter.num_children): New method.
(StdDequePrinter._size): New method.
(StdDequePrinter.to_string): Use it.
(StdDequePrinter.num_children): New method.
(Tr1UnorderedSetPrinter.num_children): New method.
(Tr1UnorderedMapPrinter.num_children): New method.
(StdSpanPrinter.num_children): New method.
|
|
Previously, _Utf_view accepted any input_range, including reference-to-array
types like char(&)[2], and stored it as the _M_base member. In such cases,
_Utf_view was not assignable, failing the requirements of view concept.
This patch addresses the issue by adding the ranges::view constraint to the
second template parameter of _Utf_view, and for clarity renaming it from
_Range to _View. The constructor is also adjusted to accept its argument
by value (views must be O(1) move-constructible). This prevents implicitly
generated CTAD from deducing a reference type.
This makes _Utf_view consistent with both other standard views and the
wording from P2728R8: Unicode in the Library, Part 1: UTF Transcoding [1].
The explicit CTAD from viewable_range is not defined for _Utf_view because
it depends on views::all_t, views::ref_view, and views::owning_view,
which are declared in <ranges>. Consequently, users must explicitly cast
the argument to a view or specify it as a template parameter.
[1] https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2728r8.html
libstdc++-v3/ChangeLog:
* include/bits/unicode.h (_Utf_view): Rename the template parameter
from _Range to _View and constrain it with ranges::view.
(_Utf_view::_Utf_view): Accept by value instead of rvalue reference.
* include/std/format (__format::__write_padded): Replace _Utf_view
over const char32_t(&)[1] with span<const char32_t, 1>.
* testsuite/ext/unicode/view.cc: Add checks if specialization
of _Utf_view satisfy view. Wrap arrays into std::span before
constructing _Utf_view.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
|
|
This patch fixes a regression introduced in r14-8400-g186ae6d2cb93ad.
gcc/fortran/ChangeLog:
* trans-expr.cc (conv_dummy_value): Add check for NULL allocatable.
gcc/testsuite/ChangeLog:
* gfortran.dg/value_optional_3.f90: New test.
|
|
libstdc++-v3/ChangeLog:
* include/std/bitset: Add comment to feature test macro test.
|
|
According to the standard the first n characters of a bitset constructor
string need to be checked instead of only N.
libstdc++-v3/ChangeLog:
PR libstdc++/121054
* include/std/bitset: Add string check to constructor.
* testsuite/20_util/bitset/121054.cc: New test.
* testsuite/20_util/bitset/cons/constexpr_c++23.cc: Fix.
Co-authored-by: Jonathan Wakely <jwakely@redhat.com>
|
|
I removed the only use of this param in r16-348-gc14560907a9586. Remove
the param.
gcc/ChangeLog:
* doc/invoke.texi: Remove mention of switch-lower-slow-alg-max-cases.
* params.opt: Remove switch-lower-slow-alg-max-cases.
Signed-off-by: Filip Kastl <fkastl@suse.cz>
|
|
It is not possible to use 'i' as output operand constraint.
gcc/ChangeLog:
* config/i386/i386.md (*sub<mode>_3):
Remove 'i' from operand 0 constraint.
|
|
We currently remove stmts inside of a FOR_EACH_IMM_USE_STMT iteration
which can be problematical. The following adjusts purge_all_uses
to gather all stmts to remove and remove them in reverse order
afterwards which also better deals with debug stmt generation.
PR ipa/122663
* ipa-param-manipulation.cc (purge_all_uses): Collect
stmts to remove and process that list in reverse.
* g++.dg/torture/pr122663.C: New testcase.
|
|
[PR122032]
This patch changes the implementation of bind_front<f> and bind_back<f> to
return a _Bind_front_t<_Bind_fn_t<f>, ...> and _Bind_back_t<_Bind_fn_t<f>, ...>
respectively, replacing the previous lambda-based implementation. The prior use
of a lambda caused non-conforming behavior with respect to C++23 [func.require]
p8, which requires that bind_front<f>(s), bind_front<f>(move(s)), and
bind_front<f>(as_const(s)) produce the same type.
Additionally, using specialized structs reduces the size of the resulting functor
in certain scenarios (see PR).
For the zero-argument case, the function still returns a _Bind_fn_t<f>. Since this
type is already a perfect forwarding call wrapper, it yields the same result as
_Bind_front_t<_Bind_fn_t<f>>.
A consequence of this change is that the types returned by bind_front<f>(args...)
and bind_back<f>(args...) are no longer structural - they are not required to be
structural by the standard.
PR libstdc++/122032
libstdc++-v3/ChangeLog:
* include/std/functional (std::bind_front<f>, std::bind_back<f>):
Define in terms of _Bind_front_t/_Bind_back_t.
* testsuite/20_util/function_objects/bind_back/nttp.cc: New tests.
* testsuite/20_util/function_objects/bind_front/nttp.cc: New tests.
Reviewed-by: Patrick Palka <ppalka@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
|