- Jan 13, 2025
-
-
GCC Administrator authored
-
- Jan 12, 2025
-
-
Iain Buclaw authored
D front-end changes: - Import dmd v2.110.0-rc.1. - An error is now given for subtracting pointers of different types. D runtime changes: - Import druntime v2.110.0-rc.1. Phobos changes: - Import phobos v2.110.0-rc.1. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd c7902293d7. * dmd/VERSION: Bump version to v2.110.0-rc.1. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime c7902293d7. * libdruntime/Makefile.am (DRUNTIME_DSOURCES): Rename core/thread/fiber.d to core/thread/fiber/package.d. Add core/thread/fiber/base.d. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos 63fdb282f. gcc/testsuite/ChangeLog: * gdc.dg/asm3.d: Adjust test. * gdc.dg/torture/pr96435.d: Adjust test.
-
Thomas Koenig authored
gcc/fortran/ChangeLog: * dump-parse-tree.cc (show_attr): Dump all symbol attributes.
-
Iain Buclaw authored
D front-end changes: - Import latest fixes from dmd v2.110.0-beta.1. - The `align' attribute now allows to specify `default' explicitly. - Add primary expression of the form `__rvalue(expression)' which causes `expression' to be treated as an rvalue, even if it is an lvalue. - Shortened method syntax can now be used in constructors. D runtime changes: - Import latest fixes from druntime v2.110.0-beta.1. Phobos changes: - Import latest fixes from phobos v2.110.0-beta.1. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd c57da0cf59. * d-codegen.cc (can_elide_copy_p): New. (d_build_call): Use it. * d-lang.cc (d_post_options): Update for new front-end interface. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime c57da0cf59. * src/MERGE: Merge upstream phobos ad8ee5587. * testsuite/libphobos.init_fini/custom_gc.d: Adjust test. gcc/testsuite/ChangeLog: * gdc.dg/copy1.d: New test.
-
David Malcolm authored
Consider this case of a bad call to a callback function (perhaps due to C23 changing the meaning of () in function decls): struct p { int (*bar)(); }; void baz() { struct p q; q.bar(1); } Before this patch the C frontend emits: t.c: In function 'baz': t.c:7:5: error: too many arguments to function 'q.bar' 7 | q.bar(1); | ^ which doesn't give the user much help in terms of knowing what was expected, and where the relevant declaration is. With this patch the C frontend emits: t.c: In function 'baz': t.c:7:5: error: too many arguments to function 'q.bar'; expected 0, have 1 7 | q.bar(1); | ^ ~ t.c:2:15: note: declared here 2 | int (*bar)(); | ^~~ (showing the expected vs actual counts, the pertinent field decl, and underlining the first extraneous argument at the callsite) Similarly, the patch also updates the "too few arguments" case to also show expected vs actual counts. Doing so requires a tweak to the wording to say "at least" for the case of variadic fns where previously the C FE emitted e.g.: s.c: In function 'test': s.c:5:3: error: too few arguments to function 'callee' 5 | callee (); | ^~~~~~ s.c:1:6: note: declared here 1 | void callee (const char *, ...); | ^~~~~~ with this patch it emits: s.c: In function 'test': s.c:5:3: error: too few arguments to function 'callee'; expected at least 1, have 0 5 | callee (); | ^~~~~~ s.c:1:6: note: declared here 1 | void callee (const char *, ...); | ^~~~~~ gcc/c/ChangeLog: PR c/118112 * c-typeck.cc (inform_declaration): Add "function_expr" param and use it for cases where we couldn't show the function decl to show field decls for callbacks. (build_function_call_vec): Add missing auto_diagnostic_group. Update for new param of inform_declaration. (convert_arguments): Likewise. For the "too many arguments" case add the expected vs actual counts to the message, and if we have it, add the location_t of the first surplus param as a secondary location within the diagnostic. For the "too few arguments" case, determine the minimum number of arguments required and add the expected vs actual counts to the message, tweaking it to "at least" for variadic functions. gcc/testsuite/ChangeLog: PR c/118112 * gcc.dg/too-few-arguments.c: New test. * gcc.dg/too-many-arguments.c: New test. Signed-off-by:
David Malcolm <dmalcolm@redhat.com>
-
Harald Anlauf authored
Implementation of the Fortran 2018 standard intrinsic OUT_OF_RANGE, with the GNU Fortran extension to unsigned integers. Runtime code is fully inline expanded. PR fortran/115788 gcc/fortran/ChangeLog: * check.cc (gfc_check_out_of_range): Check arguments to intrinsic. * expr.cc (free_expr0): Fix a memleak with unsigned literals. * gfortran.h (enum gfc_isym_id): Define GFC_ISYM_OUT_OF_RANGE. * gfortran.texi: Add OUT_OF_RANGE to list of intrinsics supporting UNSIGNED. * intrinsic.cc (add_functions): Add Fortran prototype. Break some nearby lines with excessive length. * intrinsic.h (gfc_check_out_of_range): Add prototypes. * intrinsic.texi: Fortran documentation of OUT_OF_RANGE. * simplify.cc (gfc_simplify_out_of_range): Compile-time simplification of OUT_OF_RANGE. * trans-intrinsic.cc (gfc_conv_intrinsic_out_of_range): Generate inline expansion of runtime code for OUT_OF_RANGE. (gfc_conv_intrinsic_function): Use it. gcc/testsuite/ChangeLog: * gfortran.dg/ieee/out_of_range.f90: New test. * gfortran.dg/out_of_range_1.f90: New test. * gfortran.dg/out_of_range_2.f90: New test. * gfortran.dg/out_of_range_3.f90: New test.
-
Maciej W. Rozycki authored
For the BWX case we have a pessimisation in `alpha_expand_block_move' for HImode loads where we place the data loaded into a HImode register as well, therefore losing information that indeed the data loaded has already been zero-extended to the full DImode width of the register. Later on when we store this data in QImode quantities into an unaligned destination, we zero-extend it again for the purpose of right-shifting, such as with the test case included producing code at `-O2' as follows: ldah $2,unaligned_src_hi($29) !gprelhigh lda $1,unaligned_src_hi($2) !gprellow ldwu $6,unaligned_src_hi($2) !gprellow ldwu $5,2($1) ldwu $4,4($1) bis $31,$31,$31 zapnot $6,3,$3 # Redundant! ldbu $7,6($1) zapnot $5,3,$2 # Redundant! stb $6,0($16) zapnot $4,3,$1 # Redundant! stb $5,2($16) srl $3,8,$3 stb $4,4($16) srl $2,8,$2 stb $3,1($16) srl $1,8,$1 stb $2,3($16) stb $1,5($16) stb $7,6($16) The non-BWX case is unaffected, because there we use byte insertion, so we don't care that data is held in a HImode register. Address this by making the holding RTX a HImode subreg of the original DImode register, which the RTL passes can then see through and eliminate the zero-extension where otherwise required, resulting in this shortened code: ldah $2,unaligned_src_hi($29) !gprelhigh lda $1,unaligned_src_hi($2) !gprellow ldwu $4,unaligned_src_hi($2) !gprellow ldwu $3,2($1) ldwu $2,4($1) bis $31,$31,$31 srl $4,8,$6 ldbu $1,6($1) srl $3,8,$5 stb $4,0($16) stb $6,1($16) srl $2,8,$4 stb $3,2($16) stb $5,3($16) stb $2,4($16) stb $4,5($16) stb $1,6($16) While at it reformat the enclosing do-while statement according to the GNU Coding Standards, observing that in this case it does not obfuscate the change owing to the odd original indentation. gcc/ * config/alpha/alpha.cc (alpha_expand_block_move): Use a HImode subreg of a DImode register to hold data from an aligned HImode load.
-
Maciej W. Rozycki authored
Now that we have proper alignment determination for block moves in place the case of copying a block of longword-aligned data has become real, so implement the merging of loaded data from pairs of SImode registers into single DImode registers for the purpose of using with unaligned stores efficiently, as suggested by a comment in `alpha_expand_block_move' and discard the comment. Provide test cases accordingly. gcc/ * config/alpha/alpha.cc (alpha_expand_block_move): Merge loaded data from pairs of SImode registers into single DImode registers if to be used with unaligned stores. gcc/testsuite/ * gcc.target/alpha/memcpy-si-aligned.c: New file. * gcc.target/alpha/memcpy-si-unaligned.c: New file. * gcc.target/alpha/memcpy-si-unaligned-dst.c: New file. * gcc.target/alpha/memcpy-si-unaligned-src.c: New file. * gcc.target/alpha/memcpy-si-unaligned-src-bwx.c: New file.
-
Maciej W. Rozycki authored
Contrary to user documentation the `-mbwx', `-mcix', `-mfix', `-mmax' feature options and their inverse forms are ignored whenever `-mcpu=' option is in effect, either by having been given explicitly or where configured as the default such as with the `alphaev56-linux-gnu' target. In the latter case there is no way to change the settings these options are supposed to tweak other than with `-mcpu=' and the settings cannot be individually controlled, making all the feature options permanently inactive. It seems a regression from commit 7816bea0 ("config.gcc: Reorganize --with-cpu logic.") back in 2003, which replaced the setting of the default feature mask with the setting of the default CPU across a few targets, and the complementing logic in the Alpha backend wasn't updated accordingly. Fix this by making the individual feature options take precedence over `-mcpu='. Add test cases to verify this is the case, and to cover the defaults as well for the boundary cases. This has a drawback where the order of the options is ignored between `-mcpu=' and these individual options, so e.g. `-mno-bwx -mcpu=ev6' will keep the BWX feature disabled even though `-mcpu=ev6' comes later in the command line. This may affect some scenarios involving user overrides such as with CFLAGS passed to `configure' and `make' invocations. I do believe it has been our practice anyway for more finegrained options to override group options regardless of their relative order on the command line and in any case using `-mcpu=ev6 -mbwx' as the override will do the right thing if required, canceling any previous `-mno-bwx'. This has been spotted with `alphaev56-linux-gnu' target verification and a recently added test case: FAIL: gcc.target/alpha/stwx0.c -O1 scan-assembler-times \\sldq_u\\s 2 FAIL: gcc.target/alpha/stwx0.c -O1 scan-assembler-times \\smskwh\\s 1 FAIL: gcc.target/alpha/stwx0.c -O1 scan-assembler-times \\smskwl\\s 1 FAIL: gcc.target/alpha/stwx0.c -O1 scan-assembler-times \\sstq_u\\s 2 (and similarly for the remaining optimization levels covered) which this fix has addressed. gcc/ * config/alpha/alpha.cc (alpha_option_override): Ignore CPU flags corresponding to features the enabling or disabling of which has been requested with an individual feature option. gcc/testsuite/ * gcc.target/alpha/target-bwx-1.c: New file. * gcc.target/alpha/target-bwx-2.c: New file. * gcc.target/alpha/target-bwx-3.c: New file. * gcc.target/alpha/target-bwx-4.c: New file. * gcc.target/alpha/target-cix-1.c: New file. * gcc.target/alpha/target-cix-2.c: New file. * gcc.target/alpha/target-cix-3.c: New file. * gcc.target/alpha/target-cix-4.c: New file. * gcc.target/alpha/target-fix-1.c: New file. * gcc.target/alpha/target-fix-2.c: New file. * gcc.target/alpha/target-fix-3.c: New file. * gcc.target/alpha/target-fix-4.c: New file. * gcc.target/alpha/target-max-1.c: New file. * gcc.target/alpha/target-max-2.c: New file. * gcc.target/alpha/target-max-3.c: New file. * gcc.target/alpha/target-max-4.c: New file.
-
Maciej W. Rozycki authored
Add similar arrangements to `builtin_longjmp' for Alpha as with commit 71b14428 ("re PR middle-end/64242 (Longjmp expansion incorrect)") and commit 511ed59d ("Fix PR64242 - Longjmp expansion incorrect"), so as to restore the frame pointer last, so that accesses to a local buffer supplied can still be fulfilled with memory accesses via the original frame pointer, fixing: FAIL: gcc.c-torture/execute/pr64242.c -O0 execution test FAIL: gcc.c-torture/execute/pr64242.c -O1 execution test FAIL: gcc.c-torture/execute/pr64242.c -O2 execution test FAIL: gcc.c-torture/execute/pr64242.c -O3 -g execution test FAIL: gcc.c-torture/execute/pr64242.c -Os execution test FAIL: gcc.c-torture/execute/pr64242.c -O2 -flto -fno-use-linker-plugin -flto-partition=none execution test FAIL: gcc.c-torture/execute/pr64242.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test and adding no regressions in `alpha-linux-gnu' testing. gcc/ PR middle-end/64242 * config/alpha/alpha.md (`builtin_longjmp'): Restore frame pointer last. Add frame clobber and schedule blockage.
-
Maciej W. Rozycki authored
Add the same memory clobbers to `builtin_longjmp' for Alpha as with commit 41439bf6 ("builtins.c (expand_builtin_longjmp): Added two memory clobbers."), to prevent instructions that access memory via the frame or stack pointer from being moved across the write to the frame pointer. gcc/ * config/alpha/alpha.md (builtin_longjmp): Add memory clobbers.
-
Thomas Koenig authored
gcc/fortran/ChangeLog: PR fortran/118432 * frontend-passes.cc (doloop_code): Select correct member of co->ext.union for inquire.
-
Richard Biener authored
The following were found compiling SPEC CPU 2017 with valgrind. * tree-vect-slp.cc (vect_analyze_slp): Release saved_stmts vector. (vect_build_slp_tree_2): Release new_oprnds_info when not used. (vect_analyze_slp): Release root_stmts when gcond SLP build fails.
-
Torbjörn SVENSSON authored
When running tests using the "sim" config, the command is launched in non-readonly mode and the text retrieved from the expect command will then replace all LF with CRLF. (The problem can be found in sim_load where it calls remote_spawn without an input file). libstdc++-v3/ChangeLog: * testsuite/27_io/print/1.cc: Allow both LF and CRLF in test. * testsuite/27_io/print/3.cc: Likewise. Signed-off-by:
Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
-
Torbjörn SVENSSON authored
Test assumes libatomic.a is always available, but for some embedded targets, there is no libatomic.a and the test thus fail. libstdc++-v3/ChangeLog: * testsuite/29_atomics/atomic_float/compare_exchange_padding.cc: Use effective-target libatomic_available. Signed-off-by:
Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
-
Hans-Peter Nilsson authored
This is a part of PR118303. It fixes FAIL: gcc.dg/analyzer/CVE-2005-1689-minimal.c (test for excess errors) FAIL: gcc.dg/analyzer/CVE-2005-1689-minimal.c inbuf.data (test for warnings, line 62) for targets where the parameter on that line is subject to TARGET_CALLEE_COPIES being true. c-family: PR middle-end/118303 * c-pretty-print.cc (c_pretty_printer::primary_expression) <SSA_NAME>: Call primary_expression for all SSA_NAME_VAR nodes and instead move the DECL_ARTIFICIAL private name stripping to... (pp_c_tree_decl_identifier): ...here.
-
Andrew Pinski authored
The problem is for inline-asm goto, the outer rtl insn type is a jump_insn and get_attr_length does not handle ASM specially unlike if the outer rtl insn type was just insn. This fixes the issue by adding support for both CALL_INSN and JUMP_INSN with asm. OK? Bootstrapped and tested on x86_64-linux-gnu. PR middle-end/118411 gcc/ChangeLog: * final.cc (get_attr_length_1): Handle asm for CALL_INSN and JUMP_INSNs. Signed-off-by:
Andrew Pinski <quic_apinski@quicinc.com>
-
GCC Administrator authored
-
- Jan 11, 2025
-
-
Iain Buclaw authored
D front-end changes: - Import latest fixes from dmd v2.110.0-beta.1. - Added traits `getBitfieldOffset' and `getBitfieldWidth'. - Added trait `isCOMClass' to detect if a type is a COM class. - Added `-fpreview=safer` which enables safety checking on unattributed functions. D runtime changes: - Import latest fixes from druntime v2.110.0-beta.1. Phobos changes: - Import latest fixes from phobos v2.110.0-beta.1. - Added `fromHexString' and `fromHexStringAsRange' functions to `std.digest'. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 82a5d2a7c4. * d-lang.cc (d_handle_option): Handle new option `-fpreview=safer'. * expr.cc (ExprVisitor::NewExp): Remove gcc_unreachable for the generation of `_d_newThrowable'. * lang.opt: Add -fpreview=safer. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 82a5d2a7c4. * libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add core/internal/gc/blkcache.d, core/internal/gc/blockmeta.d. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos dbc09d823.
-
Iain Buclaw authored
Phobos changes: - `std.uni' has been upgraded from Unicode 15.1.0 to 16.0.0. libphobos/ChangeLog: * src/MERGE: Merge upstream phobos 2a730adc0.
-
Nathaniel Shead authored
In the linked testcase, an ICE occurs because when reading the (duplicate) function definition for _M_do_parse from module Y, the local type definitions have already been streamed from module X and setup as regular backreferences, rather than being found with find_duplicate, causing issues with managing DECL_CHAIN. It is tempting to just skip setting up the DECL_CHAIN for this case. However, for the future it would be best to ensure that the block vars for the duplicate definition are accurate, so that we could implement ODR checking on function definitions at some point. So to solve this, this patch creates a copy of the streamed-in local type and chains that; it will be discarded along with the rest of the duplicate function after we've finished processing. A couple of suggested implementations from the discussion on the PR that don't work: - Replacing the `DECL_CHAIN` assertion with `(*chain && *chain != decl)` doesn't handle the case where type definitions are followed by regular local variables, since those won't have been imported as separate backreferences and so the chains will diverge. - Correcting the purviewness of GMF template instantiations to force Y to emit copies of the local types rather than backreferences into X is insufficient, as it's still possible that the local types got streamed in a separate cluster to the function definition, and so will be again referred to via regular backreferences when importing. - Likewise, preventing the emission of function definitions where an import has already provided that same definition also is insufficient, for much the same reason. PR c++/114630 gcc/cp/ChangeLog: * module.cc (trees_in::core_vals) <BLOCK>: Chain a new node if DECL_CHAIN already is set. gcc/testsuite/ChangeLog: * g++.dg/modules/pr114630.h: New test. * g++.dg/modules/pr114630_a.C: New test. * g++.dg/modules/pr114630_b.C: New test. * g++.dg/modules/pr114630_c.C: New test. Signed-off-by:
Nathaniel Shead <nathanieloshead@gmail.com> Reviewed-by:
Jason Merrill <jason@redhat.com> Reviewed-by:
Patrick Palka <ppalka@redhat.com>
-
Tobias Burnus authored
The declaration created by gfc_get_extern_function_decl used input_location as DECL_SOURCE_LOCATION, which gave rather odd results with 'declared here' diagnostic. - It is much more useful to use the gfc_symbol's declated_at, which this commit now does. Additionally, it adds support for the 'interop' clause of OpenMP's 'dispatch' directive. As the argument order matters, gfc_match_omp_variable_list gained a 'reverse_order' flag to use the same order as the C/C++ parser. gcc/fortran/ChangeLog: * gfortran.h: Add OMP_LIST_INTEROP to the unnamed OMP_LIST_ enum. * openmp.cc (gfc_match_omp_variable_list): Add reverse_order boolean argument, defaulting to false. (enum omp_mask2, OMP_DISPATCH_CLAUSES): Add OMP_CLAUSE_INTEROP. (gfc_match_omp_clauses, resolve_omp_clauses): Handle dispatch's 'interop' clause. * trans-decl.cc (gfc_get_extern_function_decl): Use sym->declared_at instead input_location as DECL_SOURCE_LOCATION. * trans-openmp.cc (gfc_trans_omp_clauses): Handle OMP_LIST_INTEROP. gcc/testsuite/ChangeLog: * gfortran.dg/goacc/routine-external-level-of-parallelism-2.f: Update xfail'ed 'dg-bogus' for the better 'declared here' location. * gfortran.dg/gomp/dispatch-11.f90: New test. * gfortran.dg/gomp/dispatch-12.f90: New test.
-
Paul Thomas authored
2025-01-11 Paul Thomas <pault@gcc.gnu.org> gcc/fortran/ PR fortran/108434 * class.cc (generate_finalization_wrapper): To avoid memory leaks from callocs, return immediately if the derived type error flag is set. * decl.cc (build_struct): If the declaration of a derived type or class component does not have a deferred arrayspec, correct, set the error flag of the derived type and emit an immediate error. gcc/testsuite/ PR fortran/108434 * gfortran.dg/pr108434.f90 : Add tests from comment 1.
-
Jason Merrill authored
30_threads/stop_token/stop_source/109339.cc was failing because we weren't representing attribute access on the METHOD_TYPE for _Stop_state_ref. The modules code expected attributes to appear on tt_variant_type and not on tt_derived_type, but that's backwards since build_type_attribute_variant gives a type with attributes its own TYPE_MAIN_VARIANT. gcc/cp/ChangeLog: * module.cc (trees_out::type_node): Write attributes for tt_derived_type, not tt_variant_type. (trees_in::tree_node): Likewise for reading. gcc/testsuite/ChangeLog: * g++.dg/modules/attrib-2_a.C: New test. * g++.dg/modules/attrib-2_b.C: New test.
-
Jason Merrill authored
std/time/traits/is_clock.cc was getting a warning about applying the deprecated attribute to a variant of auto_ptr, which was wrong because it's on the primary type. This turned out to be because we were ignoring the attributes on the definition of auto_ptr because the forward declaration in unique_ptr.h has no attributes. We need to merge attributes as usual in a redeclaration. gcc/cp/ChangeLog: * module.cc (trees_in::decl_value): Merge attributes. gcc/testsuite/ChangeLog: * g++.dg/modules/attrib-1_a.C: New test. * g++.dg/modules/attrib-1_b.C: New test.
-
mengqinggang authored
Generate 0x1010 instead of 0x1010000>>12 for lu12i.w. lu32i.d and lu52i.d use the same processing. gcc/ChangeLog: * config/loongarch/lasx.md: Use new loongarch_output_move. * config/loongarch/loongarch-protos.h (loongarch_output_move): Change parameters from (rtx, rtx) to (rtx *). * config/loongarch/loongarch.cc (loongarch_output_move): Generate final immediate for lu12i.w and lu52i.d. * config/loongarch/loongarch.md: Generate final immediate for lu32i.d and lu52i.d. * config/loongarch/lsx.md: Use new loongarch_output_move. gcc/testsuite/ChangeLog: * gcc.target/loongarch/imm-load.c: Not generate ">>".
-
Iain Buclaw authored
D front-end changes: - Import latest fixes from dmd v2.110.0-beta.1. D runtime changes: - Import latest fixes from druntime v2.110.0-beta.1. Phobos changes: - Import latest fixes from phobos v2.110.0-beta.1. - Added `popGrapheme' function to `std.uni'. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 2b89c2909d. * Make-lang.in (D_FRONTEND_OBJS): Rename d/basicmangle.o to d/mangle-basic.o, d/cppmangle.o to d/mangle-cpp.o, and d/dmangle.o to d/mangle-package.o. (d/mangle-%.o): New rule. * d-builtins.cc (maybe_set_builtin_1): Update for new front-end interface. * d-diagnostic.cc (verrorReport): Likewise. (verrorReportSupplemental): Likewise. * d-frontend.cc (getTypeInfoType): Likewise. * d-lang.cc (d_init_options): Likewise. (d_handle_option): Likewise. (d_post_options): Likewise. * d-target.cc (TargetC::contributesToAggregateAlignment): New. * d-tree.h (create_typeinfo): Adjust prototype. * decl.cc (layout_struct_initializer): Update for new front-end interface. * typeinfo.cc (create_typeinfo): Remove generate parameter. * types.cc (layout_aggregate_members): Update for new front-end interface. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 2b89c2909d. * src/MERGE: Merge upstream phobos bdedad3bf.
-
Andrew MacLeod authored
Query for known relations between the operands, and pass that to fold_range to help simplify MIN and MAX relations. Make it type agnostic as well. Adapt testcases from DOM to EVRP (e suffix) and test floats (f suffix). PR tree-optimization/88575 gcc/ * vr-values.cc (simplify_using_ranges::fold_cond_with_ops): Query relation between op0 and op1 and utilize it. (simplify_using_ranges::simplify): Do not eliminate float checks. gcc/testsuite/ * gcc.dg/tree-ssa/minmax-27.c: Disable VRP. * gcc.dg/tree-ssa/minmax-27e.c: New. * gcc.dg/tree-ssa/minmax-27f.c: New. * gcc.dg/tree-ssa/minmax-28.c: Disable VRP. * gcc.dg/tree-ssa/minmax-28e.c: New. * gcc.dg/tree-ssa/minmax-28f.c: New.
-
GCC Administrator authored
-
- Jan 10, 2025
-
-
Iain Buclaw authored
D front-end changes: - Added pragma for ImportC to allow setting `nothrow', `@nogc' or `pure'. - Mixin templates can now use assignment syntax. D runtime changes: - Removed `ThreadBase.criticalRegionLock' from `core.thread'. - Added `expect', `[un]likely', `trap' to `core.builtins'. Phobos changes: - Import latest fixes from phobos v2.110.0-beta.1. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 4ccb01fde5. * Make-lang.in (D_FRONTEND_OBJS): Rename d/foreachvar.o to d/visitor-foreachvar.o, d/visitor.o to d/visitor-package.o, and d/statement_rewrite_walker.o to d/visitor-statement_rewrite_walker.o. (D_FRONTEND_OBJS): Rename d/{parsetime,permissive,postorder,transitive}visitor.o to d/visitor-{parsetime,permissive,postorder,transitive}.o. (D_FRONTEND_OBJS): Remove d/sapply.o. (d.tags): Add dmd/common/*.h. (d/visitor-%.o:): New rule. * d-codegen.cc (get_frameinfo): Update for new front-end interface. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 4ccb01fde5. * src/MERGE: Merge upstream phobos eab6595ad.
-
Iain Buclaw authored
D front-end changes: - It's now deprecated to declare `auto ref' parameters without putting those two keywords next to each other. - An error is now given for case fallthough for multivalued cases. - An error is now given for constructors with field destructors with stricter attributes. - An error is now issued for `in'/`out' contracts of `nothrow' functions that may throw. - `auto ref' can now be applied to local, static, extern, and global variables. D runtime changes: - Import latest fixes from druntime v2.110.0-beta.1. Phobos changes: - Import latest fixes from phobos v2.110.0-beta.1. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 6884b433d2. * d-builtins.cc (build_frontend_type): Update for new front-end interface. (d_build_builtins_module): Likewise. (matches_builtin_type): Likewise. (covariant_with_builtin_type_p): Likewise. * d-codegen.cc (lower_struct_comparison): Likewise. (call_side_effect_free_p): Likewise. * d-compiler.cc (Compiler::paintAsType): Likewise. * d-convert.cc (convert_expr): Likewise. (convert_for_assignment): Likewise. * d-target.cc (Target::isVectorTypeSupported): Likewise. (Target::isVectorOpSupported): Likewise. (Target::isReturnOnStack): Likewise. * decl.cc (get_symbol_decl): Likewise. * expr.cc (build_return_dtor): Likewise. * imports.cc (class ImportVisitor): Likewise. * toir.cc (class IRVisitor): Likewise. * types.cc (class TypeVisitor): Likewise. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 6884b433d2. * src/MERGE: Merge upstream phobos 48d581a1f.
-
Alex Coplan authored
Currently we only cost gconds for the vector loop while we omit costing them when analyzing the scalar loop; this unfairly penalizes the vector loop in the case of loops with early exits. This (together with the previous patches) enables us to vectorize std::find with 64-bit element sizes. gcc/ChangeLog: PR tree-optimization/118211 PR tree-optimization/116126 * tree-vect-loop.cc (vect_compute_single_scalar_iteration_cost): Don't skip over gconds.
-
Alex Coplan authored
This fixes a latent wrong code issue whereby vect_do_peeling determined the wrong condition for inserting the vector skip guard. Specifically in the case where the loop niters are unknown at compile time we used to check: !LOOP_REQUIRES_VERSIONING (loop_vinfo) but LOOP_REQUIRES_VERSIONING is true for loops which we have versioned for aliasing, and that has nothing to do with prolog peeling. I think this condition should instead be checking specifically if we aren't versioning for alignment. As it stands, when we version for alignment, we don't peel, so the vector skip guard is indeed redundant in that case. With the testcase added (reduced from the Fortran frontend) we would version for aliasing, omit the vector skip guard, and then at runtime we would peel sufficient iterations for alignment that there wasn't a full vector iteration left when we entered the vector body, thus overflowing the output buffer. gcc/ChangeLog: PR tree-optimization/118211 PR tree-optimization/116126 * tree-vect-loop-manip.cc (vect_do_peeling): Adjust skip_vector condition to only omit the edge if we're versioning for alignment. gcc/testsuite/ChangeLog: PR tree-optimization/118211 PR tree-optimization/116126 * gcc.dg/vect/vect-early-break_130.c: New test.
-
Tamar Christina authored
The alignment peeling changes exposed a latent missing dominator update with early break vectorization, specifically when inserting the vector skip edge, since the new edge bypasses the prolog skip block and thus has the potential to subvert its dominance. This patch fixes that. gcc/ChangeLog: PR tree-optimization/118211 PR tree-optimization/116126 * tree-vect-loop-manip.cc (vect_do_peeling): Update immediate dominators of nodes that were dominated by the prolog skip block after inserting vector skip edge. Initialize prolog variable to NULL to avoid bogus -Wmaybe-uninitialized during bootstrap. gcc/testsuite/ChangeLog: PR tree-optimization/118211 PR tree-optimization/116126 * g++.dg/vect/vect-early-break_6.cc: New test. Co-Authored-By:
Alex Coplan <alex.coplan@arm.com>
-
Alex Coplan authored
For loops with LOOP_VINFO_EARLY_BREAKS_VECT_PEELED we should always enter the scalar epilogue, so avoid emitting a guard on entry to the epilogue. gcc/ChangeLog: PR tree-optimization/118211 PR tree-optimization/116126 * tree-vect-loop-manip.cc (vect_do_peeling): Avoid emitting an epilogue guard for inverted early-exit loops.
-
Alex Coplan authored
This allows us to vectorize more loops with early exits by forcing peeling for alignment to make sure that we're guaranteed to be able to safely read an entire vector iteration without crossing a page boundary. To make this work for VLA architectures we have to allow compile-time non-constant target alignments. We also have to override the result of the target's preferred_vector_alignment hook if it isn't a power-of-two multiple of the TYPE_SIZE of the chosen vector type. gcc/ChangeLog: PR tree-optimization/118211 PR tree-optimization/116126 * tree-vect-data-refs.cc (vect_analyze_early_break_dependences): Set need_peeling_for_alignment flag on read DRs instead of failing vectorization. Punt on gathers. (dr_misalignment): Handle non-constant target alignments. (vect_compute_data_ref_alignment): If need_peeling_for_alignment flag is set on the DR, then override the target alignment chosen by the preferred_vector_alignment hook to choose a safe alignment. (vect_supportable_dr_alignment): Override support_vector_misalignment hook if need_peeling_for_alignment is set on the DR: in this case we must return dr_unaligned_unsupported in order to force peeling. * tree-vect-loop-manip.cc (vect_do_peeling): Allow prolog peeling by a compile-time non-constant amount. * tree-vectorizer.h (dr_vec_info): Add new flag need_peeling_for_alignment. gcc/testsuite/ChangeLog: PR tree-optimization/118211 PR tree-optimization/116126 * gcc.dg/tree-ssa/cunroll-13.c: Don't vectorize. * gcc.dg/tree-ssa/cunroll-14.c: Likewise. * gcc.dg/unroll-6.c: Likewise. * gcc.dg/tree-ssa/gen-vect-28.c: Likewise. * gcc.dg/vect/vect-104.c: Expect to vectorize. * gcc.dg/vect/vect-early-break_108-pr113588.c: Likewise. * gcc.dg/vect/vect-early-break_109-pr113588.c: Likewise. * gcc.dg/vect/vect-early-break_110-pr113467.c: Likewise. * gcc.dg/vect/vect-early-break_3.c: Likewise. * gcc.dg/vect/vect-early-break_65.c: Likewise. * gcc.dg/vect/vect-early-break_8.c: Likewise. * gfortran.dg/vect/vect-5.f90: Likewise. * gfortran.dg/vect/vect-8.f90: Likewise. * gcc.dg/vect/vect-switch-search-line-fast.c: Co-Authored-By:
Tamar Christina <tamar.christina@arm.com>
-
Tamar Christina authored
The Parts Num field for the MIDR for Cortex-X4 is wrong. It's currently the parts number for a Cortex-A720 (which does have the right number). The correct number can be found in the Cortex-X4 Technical Reference Manual [1] on page 382 in Issue Number 5. [1] https://developer.arm.com/documentation/102484/latest/ gcc/ChangeLog: * config/aarch64/aarch64-cores.def (AARCH64_CORE): Fix cortex-x4 parts num.
-
Iain Buclaw authored
D front-end changes: - Import dmd v2.110.0-beta.1. - `ref' can now be applied to local, static, extern, and global variables. D runtime changes: - Import druntime v2.110.0-beta.1. Phobos changes: - Import phobos v2.110.0-beta.1. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 34875cd6e1. * dmd/VERSION: Bump version to v2.110.0-beta.1. * Make-lang.in (D_FRONTEND_OBJS): Add d/deps.o, d/timetrace.o. * decl.cc (class DeclVisitor): Update for new front-end interface. * expr.cc (class ExprVisitor): Likewise * typeinfo.cc (check_typeinfo_type): Likewise. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 34875cd6e1. * src/MERGE: Merge upstream phobos ebd24da8a.
-
Jonathan Wakely authored
This fixes warnings like the following during bootstrap: sparc-sun-solaris2.11/libstdc++-v3/include/bits/atomic_futex.h:324:53: warning: unused parameter ‘__mo’ [-Wunused-parameter] 324 | _M_load_when_equal(unsigned __val, memory_order __mo) | ~~~~~~~~~~~~~^~~~ libstdc++-v3/ChangeLog: * include/bits/atomic_futex.h (__atomic_futex_unsigned): Remove names of unused parameters in non-futex implementation.
-
Marek Polacek authored
Fixed by r15-6740. PR c++/118391 gcc/testsuite/ChangeLog: * g++.dg/cpp2a/lambda-uneval20.C: New test.
-