- 21 Feb, 2020 14 commits
-
-
The commit r10-6721-g8d1a1cb1 has changed the name of the type that is used for the return value of the Fortran acc_get_property function without adapting the test acc_get_property.f90. 2020-02-21 Frederik Harwath <frederik@codesourcery.com> * testsuite/libgomp.oacc-fortran/acc_get_property.f90: Adapt to changes from 2020-02-19, i.e. use integer(c_size_t) instead of integer(acc_device_property) for the type of the return value of acc_get_property.
Frederik Harwath committed -
nonoverlapping_array_refs_p is not supposed to give meaningful results when bases of ref1 and ref2 are not same or completely disjoint and here it is called on c[0][j_2][0] and c[0][1] so bases in sence of this functions are "c[0][j_2]" and "c[0]" which do partially overlap. nonoverlapping_array_refs however walks pair of array references and in this case it misses to note the fact that if it walked across first mismatched pair it is no longer safe to compare rest. The reason why it continues matching is because it hopes it will eventually get pair of COMPONENT_REFs from types of same size and use TBAA to conclude that their addresses must be either same or completely disjoint. This patch makes the loop to terminate early but popping all the remaining pairs so walking can continue. We could re-synchronize on arrays of same size with TBAA but this is bit fishy (because we try to support some sort of partial array overlaps) and hard to implement (because of zero sized arrays and VLAs) so I think it is not worth the effort. In addition I notied that the function is not !flag_strict_aliasing safe and added early exits on places we set seen_unmatched_ref_p since later we do not check that in: /* If we skipped array refs on type of different sizes, we can no longer be sure that there are not partial overlaps. */ if (seen_unmatched_ref_p && !operand_equal_p (TYPE_SIZE (type1), TYPE_SIZE (type2), 0)) { ++alias_stats .nonoverlapping_refs_since_match_p_may_alias; } PR tree-optimization/93586 * tree-ssa-alias.c (nonoverlapping_array_refs_p): Finish array walk after mismatched array refs; do not sure type size information to recover from unmatched referneces with !flag_strict_aliasing_p. * gcc.dg/torture/pr93586.c: New testcase.
Jan Hubicka committed -
The scatter/gather pattern names changed for GCC 10, but I hadn't noticed. This switches the patterns to the new offset mode scheme. 2020-02-21 Andrew Stubbs <ams@codesourcery.com> gcc/ * config/gcn/gcn-valu.md (gather_load<mode>): Rename to ... (gather_load<mode>v64si): ... this and set operand 2 to V64SI. (scatter_store<mode>): Rename to ... (scatter_store<mode>v64si): ... this and set operand 1 to V64SI. (scatter<mode>_exec): Delete. Move contents ... (mask_scatter_store<mode>): ... here, and rename that to ... (mask_gather_load<mode>v64si): ... this. Set operand 2 to V64SI. Remove mode conversion. (mask_gather_load<mode>): Rename to ... (mask_scatter_store<mode>v64si): ... this. Set operand 1 to V64SI. Remove mode conversion. * config/gcn/gcn.c (gcn_expand_scaled_offsets): Remove mode conversion.
Andrew Stubbs committed -
the testcase is another example - in addition to recent PR 93516 - where the SRA access verifier is confused by the fact that get_ref_base_extent can return different sizes for the same type, depending whether they are COMPONENT_REF or not. In the previous bug I decided to keep the verifier check for aggregate type even though it is not really important and instead avoid easily detectable type-within-the-same-type situation. This testcase is however a result of a fairly random looking type cast and so cannot be handled in the same way. Because the check is not really important for aggregates, this patch simply disables it for non-register types. 2020-02-21 Martin Jambor <mjambor@suse.cz> PR tree-optimization/93845 * tree-sra.c (verify_sra_access_forest): Only test access size of scalar types. testsuite/ * g++.dg/tree-ssa/pr93845.C: New test.
Martin Jambor committed -
Aligning the registers is not needed by the architecture, but doing so allows us to remove the requirement for bug-prone early-clobber constraints from many split patterns (and avoid adding more in future). 2020-02-21 Andrew Stubbs <ams@codesourcery.com> gcc/ * config/gcn/gcn.c (gcn_hard_regno_mode_ok): Align VGPR pairs. * config/gcn/gcn-valu.md (addv64di3): Remove early-clobber. (addv64di3_exec): Likewise. (subv64di3): Likewise. (subv64di3_exec): Likewise. (addv64di3_zext): Likewise. (addv64di3_zext_exec): Likewise. (addv64di3_zext_dup): Likewise. (addv64di3_zext_dup_exec): Likewise. (addv64di3_zext_dup2): Likewise. (addv64di3_zext_dup2_exec): Likewise. (addv64di3_sext_dup2): Likewise. (addv64di3_sext_dup2_exec): Likewise. (<expander>v64di3): Likewise. (<expander>v64di3_exec): Likewise. (*<reduc_op>_dpp_shr_v64di): Likewise. (*plus_carry_dpp_shr_v64di): Likewise. * config/gcn/gcn.md (adddi3): Likewise. (addptrdi3): Likewise. (<expander>di3): Likewise.
Andrew Stubbs committed -
2020-02-21 Andrew Stubbs <ams@codesourcery.com> gcc/ * config/gcn/gcn-valu.md (vec_seriesv64di): Use gen_vec_duplicatev64di.
Andrew Stubbs committed -
SVE was missing support for -mlow-precision-sqrt, which meant that -march=armv8.2-a+sve -mlow-precision-sqrt could cause a performance regression compared to -march=armv8.2-a -mlow-precision-sqrt. 2020-02-21 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Add SVE support. Use aarch64_emit_mult instead of emitting multiplication instructions directly. * config/aarch64/aarch64-sve.md (sqrt<mode>2, rsqrt<mode>2) (@aarch64_rsqrte<mode>, @aarch64_rsqrts<mode>): New expanders. gcc/testsuite/ * gcc.target/aarch64/sve/rsqrt_1.c: New test. * gcc.target/aarch64/sve/rsqrt_1_run.c: Likewise. * gcc.target/aarch64/sve/sqrt_1.c: Likewise. * gcc.target/aarch64/sve/sqrt_1_run.c: Likewise.
Richard Sandiford committed -
SVE was missing support for -mlow-precision-div, which meant that -march=armv8.2-a+sve -mlow-precision-div could cause a performance regression compared to -march=armv8.2-a -mlow-precision-div. I ended up doing this much later than originally intended, sorry... 2020-02-21 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64.c (aarch64_emit_mult): New function. (aarch64_emit_approx_div): Add SVE support. Use aarch64_emit_mult instead of emitting multiplication instructions directly. * config/aarch64/iterators.md (SVE_COND_FP_BINARY_OPTAB): New iterator. * config/aarch64/aarch64-sve.md (div<mode>3, @aarch64_frecpe<mode>) (@aarch64_frecps<mode>): New expanders. gcc/testsuite/ * gcc.target/aarch64/sve/recip_1.c: New test. * gcc.target/aarch64/sve/recip_1_run.c: Likewise. * gcc.target/aarch64/sve/recip_2.c: Likewise. * gcc.target/aarch64/sve/recip_2_run.c: Likewise.
Richard Sandiford committed -
We now have more than 32 scalar and vector float modes, so the 32-bit AARCH64_APPROX_MODE would invoke UB for some of them. Bumping to a 64-bit mask fixes that... for now. Ideally we'd have a static assert to trap this, but logically it would go at file scope. I think it would be better to wait until the switch to C++11, so that we can use static_assert directly. 2020-02-21 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64-protos.h (AARCH64_APPROX_MODE): Operate on and produce uint64_ts rather than ints. (AARCH64_APPROX_NONE, AARCH64_APPROX_ALL): Change to uint64_ts. (cpu_approx_modes): Change the fields from unsigned int to uint64_t.
Richard Sandiford committed -
The rsqrt path of aarch64_emit_approx_sqrt created a pseudo register that it never used. 2020-02-21 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Don't create an unused xmsk register when handling approximate rsqrt.
Richard Sandiford committed -
The fix for PR80530 included an accidental flipping of the flag_finite_math_only check, so that -ffinite-math-only (and thus -ffast-math) disabled approximate sqrt rather than enabling it. This is tested by later patches but seemed worth splitting out. 2020-02-21 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Fix inverted flag_finite_math_only condition.
Richard Sandiford committed -
I left SiFive a bit more than three months ago, and while I sent out a message saying I was going to updated my email address I neclected to actually do so. I'm moving to my personal email address to avoid the need to do this again. gcc/ChangeLog 2020-02-20 Palmer Dabbelt <palmer@sifive.com> * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
Palmer Dabbelt committed -
mkheaders.in uses substitutions of @SHELL@ to run fixinc.sh and mkinstalldirs. Problem is, SHELL comes from CONFIG_SHELL for the build system, and it needs not match whatever is available at an unrelated host system after installation, when mkheaders is supposed to be run. I considered ditching the hardcoding altogether, but decided to retain it, but allowing CONFIG_SHELL and SHELL to override it, if any of them can successfully run mkinstalldirs, and if those and the substituted @SHELL@ fail, fallback to /bin/sh and to plain execution of the script, which appears to enable at least one shell on a system that doesn't typicall have a shell to recognize a script by #!/bin/sh and reinvoke itself to run it. If all of these fail, we fail, but only after telling the user to retry after setting CONFIG_SHELL, that fixincl itself also uses. for fixincludes/ChangeLog * mkheaders.in: Don't require build-time shell on host.
Alexandre Oliva committed -
GCC Administrator committed
-
- 20 Feb, 2020 20 commits
-
-
gcc/cp/ChangeLog: PR c++/93801 * parser.c (cp_parser_check_class_key): Only handle true C++ class-keys. gcc/testsuite/ChangeLog: PR c++/93801 * g++.dg/warn/Wredundant-tags-3.C: New test.
Martin Sebor committed -
Uros Bizjak committed
-
shufps moves two of the four packed single-precision floating-point values from *destination* operand (first operand) into the low quadword of the destination operand. Match source operand to the destination. PR target/93828 * config/i386/mmx.md (*vec_extractv2sf_1): Match source operand to destination operand for shufps alternative. (*vec_extractv2si_1): Ditto. testsuite/ChangeLog: PR target/93828 * g++.target/i386/pr93828.C: New test.
Uros Bizjak committed -
shufps moves two of the four packed single-precision floating-point values from *destination* operand (first operand) into the low quadword of the destination operand. Match source operand to the destination. PR target/93828 * config/i386/mmx.md (*vec_extractv2sf_1): Match source operand to destination operand for shufps alternative. (*vec_extractv2si_1): Ditto. testsuite/ChangeLog: PR target/93828 * g++.target/i386/pr93828.C: New test.
Uros Bizjak committed -
This fixes a dangling-reference issue with views::split and other multi-argument adaptors that may take its extra arguments by reference. When creating the _RangeAdaptorClosure in _RangeAdaptor::operator(), we currently capture all provided arguments by value. When we then use the _RangeAdaptorClosure and call it with a range, as in e.g. v = views::split(p)(range), we forward the range and the captures to the underlying adaptor routine. But then when the temporary _RangeAdaptorClosure goes out of scope, the by-value captures get destroyed and the references to these captures in the resulting view become dangling. This patch fixes this problem by capturing lvalue references by reference in _RangeAdaptorClosure::operator(), and then forwarding the captures appropriately to the underlying adaptor routine. libstdc++-v3/ChangeLog: * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility function. (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use __maybe_refwrap to capture lvalue references by reference, and then use unwrap_reference_t to forward the by-reference captures as references. * testsuite/std/ranges/adaptors/split.cc: Augment test. * testsuite/std/ranges/adaptors/split_neg.cc: New test.
Patrick Palka committed -
We are forwarding the second argument of views::iota using the wrong type, causing compile errors when calling views::iota with a value and bound of different types, like in the test case below. libstdc++-v3/ChangeLog: * include/std/ranges (iota_view): Forward declare _Sentinel. (iota_view::_Iterator): Befriend _Sentinel. (iota_view::_Sentinel::_M_equal): New member function. (iota_view::_Sentinel::operator==): Use it. (views::_Iota::operator()): Forward __f using the correct type. * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota with integers of different signedness, to appease iota_view's deduction guide. * testsuite/std/ranges/iota/iota_view.cc: Augment test.
Patrick Palka committed -
Previous push didn't get the ChangeLog entries or the actual fix. Push those now. gcc/ PR target/93658 * config/rs6000/rs6000.c (rs6000_legitimate_address_p): Handle VSX vector modes. gcc/testsuite/ PR target/93658 * gcc.target/powerpc/pr93658.c: New test.
Peter Bergner committed -
2020-02-20 Tobias Burnus <tobias@codesourcery.com> PR fortran/93825 * openmp.c (resolve_oacc_loop_blocks): Move call to resolve_oacc_nested_loops from here ... (resolve_oacc_loop): ... to here. PR fortran/93825 * gfortran.dg/goacc/tile-3.f90: New.
Tobias Burnus committed -
Fix rs6000_legitimate_address_p(), which erroneously marks a valid Altivec address as being invalid, which causes LRA's process_address() to go into an infinite loop spilling the same address over and over again. gcc/ PR target/93658 * config/rs6000/rs6000.c (rs6000_legitimate_address_p): Handle VSX vector modes. gcc/testsuite/ PR target/93658 * gcc.target/powerpc/pr93658.c: New test.
Peter Bergner committed -
This changes how arrays of unknown bound and/or incomplete element type are handled. * include/bits/range_access.h (ranges::begin): Reject array of incomplete type. (ranges::end, ranges::size): Require arrays to be bounded. (ranges::data): Require lvalue or borrowed_range. (ranges::iterator_t): Remove constraint. * testsuite/std/ranges/access/begin.cc: Do not check array of incomplete type. * testsuite/std/ranges/access/begin_neg.cc: New test. * testsuite/std/ranges/access/end_neg.cc: Adjust expected error. * testsuite/std/ranges/access/size_neg.cc: Adjust expected error. * testsuite/std/ranges/access/ssize.cc: Do not check array of incomplete type.
Jonathan Wakely committed -
Another piece of P1614R2 for C++20. This also adds tests for operator< in C++11, which was present but untested. * include/std/system_error (error_category::operator<=>) (operator<=>(const error_code&, const error_code&)) (operator<=>(const error_condition&, const error_condition&)): Define for C++20. * testsuite/19_diagnostics/error_category/operators/less.cc: New test. * testsuite/19_diagnostics/error_category/operators/three_way.cc: New test. * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove incorrect comment. * testsuite/19_diagnostics/error_code/operators/less.cc: New test. * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove incorrect comment. * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test. * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove incorrect comment. * testsuite/19_diagnostics/error_condition/operators/less.cc: New test. * testsuite/19_diagnostics/error_condition/operators/not_equal.cc: Remove incorrect comment. * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New test.
Jonathan Wakely committed -
This function can be synthesized by the compiler now. * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
Jonathan Wakely committed -
* include/std/thread (thread::id::operator<=>): Define for C++20. * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of functions in namespace std. * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
Jonathan Wakely committed -
PR translation/93841 * config/or1k/or1k.opt: Remove superfluous word. * doc/invoke.texi: Likewise.
Martin Liska committed -
PR translation/93838 * parser.c (cp_parser_decl_specifier_seq): Remove trailing space.
Martin Liska committed -
PR translation/93831 * config/darwin.c (darwin_override_options): Change 64b to 64-bit mode.
Martin Liska committed -
PR translation/93830 * common/config/avr/avr-common.c: Remote trailing "|".
Martin Liska committed -
* de.po: Update.
Joseph Myers committed -
GCC Administrator committed
-
In order to detect modifying constant objects in constexpr evaluation, which is UB, in r10-2655 I added code that sets TREE_READONLY on CONSTRUCTORs of const-qualified objects after they have been fully constructed. But I never made sure that what we're setting the flag on actually is a CONSTRUCTOR. Consequently, as this test case shows, we could set TREE_READONLY on a VAR_DECL that in fact wasn't constant, causing problems later. Fixed by setting the flag on CONSTRUCTORs only, and only when the evaluation produced something constant. 2020-02-19 Marek Polacek <polacek@redhat.com> PR c++/93169 - wrong-code with a non-constexpr constructor. * constexpr.c (cxx_eval_call_expression): Only set TREE_READONLY on constant CONSTRUCTORs. * g++.dg/cpp0x/constexpr-93169.C: New test.
Marek Polacek committed
-
- 19 Feb, 2020 6 commits
-
-
gcc/testsuite/ChangeLog: * gcc.dg/strlenopt-81.c: Align arrays to let strictly aligned targets optimize away calls as expected.
Martin Sebor committed -
libstdc++-v3/ChangeLog: * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the null terminator of the underlying string as part of the test_range. (main): Call test03.
Patrick Palka committed -
* include/bits/stl_iterator.h (common_iterator): Add copyable<I> requirement (LWG 3385). * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust expected declaration.
Jonathan Wakely committed -
* include/std/ranges (take_while_view, drop_view, drop_while_view) (elements_view:_Iterator): Initialize data members (LWG 3364).
Jonathan Wakely committed -
This also removes a useless condition that was supposed to be removed by the P1959R0 changes, but left in when that was implemented. * libsupc++/compare (three_way_comparable): Remove always-false check that should have been removed with weak_equality (P1959R0). (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
Jonathan Wakely committed -
* include/std/concepts (__detail::__partially_ordered_with): Move here from <compare>. (totally_ordered, totally_ordered_with): Use __partially_ordered_with to simplify definition (LWG 3331). * libsupc++/compare (__detail::__partially_ordered_with): Move to <concepts>.
Jonathan Wakely committed
-