[COMMITTED] tree-optimization/96542 - Add wi_fold_in_parts.

2021-07-16 Thread Andrew MacLeod via Gcc-patches
Range-ops uses wi_fold (implemented by each opcode)  to individually fold subranges one at a time and then combines them. This patch first calls wi_fold_in_parts which checks if one of the subranges is small, and if so, further splits that subrange into constants. Currently, if a subrange is

[PATCH, Fortran] [PR libfortran/101317] Bind(c): Improve error checking in CFI_* functions

2021-07-16 Thread Sandra Loosemore
This patch is for PR101317, one of the bugs uncovered by the TS29113 testsuite. Here I'd observed that CFI_establish, etc was not diagnosing some invalid-argument situations documented in the standard, although it was properly catching others. After fixing those I discovered a couple small

[PATCH] Add QI vector mode support to by-pieces for memset

2021-07-16 Thread H.J. Lu via Gcc-patches
On Fri, Jul 16, 2021 at 7:15 AM H.J. Lu wrote: > > On Fri, Jul 16, 2021 at 6:24 AM Richard Sandiford > wrote: > > > > "H.J. Lu via Gcc-patches" writes: > > > On Fri, Jul 16, 2021 at 4:38 AM Richard Sandiford > > > wrote: > > >> > > >> "H.J. Lu via Gcc-patches" writes: > > >> > 1. Rewrite

Re: [PATCH] [wwwdocs] Update description of GM2 and document branch

2021-07-16 Thread Gaius Mulley via Gcc-patches
Gerald Pfeifer writes: >> +is fully operational with the GCC 10 and GCC 11 (on > > Here I'd omit "the", though I cannot (linguistically) explain why > and have to refer to established practice. thanks for catching the unnecessary "the" - all committed and pushed now, regards, Gaius

Re: [PATCH] c++: Reject ordered comparison of null pointers [PR99701]

2021-07-16 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 16, 2021 at 05:36:13PM -0400, Marek Polacek via Gcc-patches wrote: > When implementing DR 1512 in r11-467 I neglected to reject ordered > comparison of two null pointers, like nullptr < nullptr. This patch > fixes that omission. > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok

[committed] libstdc++: Improve diagnostics for std::get with invalid tuple index

2021-07-16 Thread Jonathan Wakely via Gcc-patches
The recent fix for std::get uses a deleted overload to give better diagnostics for out-of-range indices. This does something similar for std::get. Tested powerpc64le-linux. Committed to trunk. This adds a deleted overload of std::get(const tuple&). Invalid calls with an out of range index will

PING Re: [PATCH] gcc-changelog: show correct line when complaining about unclosed paren

2021-07-16 Thread David Malcolm via Gcc-patches
Ping re: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/574057.html On Wed, 2021-06-30 at 11:03 -0400, David Malcolm wrote: Successfully tested via:   pytest contrib/gcc-changelog/ contrib/ChangeLog: * gcc-changelog/git_commit.py (ChangeLogEntry.__init__): Convert

[PATCH] c++: Reject ordered comparison of null pointers [PR99701]

2021-07-16 Thread Marek Polacek via Gcc-patches
When implementing DR 1512 in r11-467 I neglected to reject ordered comparison of two null pointers, like nullptr < nullptr. This patch fixes that omission. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? DR 1512 PR c++/99701 gcc/cp/ChangeLog: *

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Noah Goldstein via Gcc-patches
On Fri, Jul 16, 2021 at 3:37 PM Matthias Kretz wrote: > On Friday, 16 July 2021 19:20:29 CEST Noah Goldstein wrote: > > On Fri, Jul 16, 2021 at 11:12 AM Matthias Kretz wrote: > > > I don't understand how this feature would lead to false sharing. But > maybe > > > I > > > misunderstand the

Re: [PATCH libatomic/arm] avoid warning on constant addresses (PR 101379)

2021-07-16 Thread Martin Sebor via Gcc-patches
On 7/16/21 11:42 AM, Thomas Schwinge wrote: Hi Martin! On 2021-07-09T17:11:25-0600, Martin Sebor via Gcc-patches wrote: The attached tweak avoids the new -Warray-bounds instances when building libatomic for arm. Christophe confirms it resolves the problem (thank you!) As Abid has just

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-16 Thread Hafiz Abid Qadeer
On 15/07/2021 13:09, Richard Biener wrote: > On Thu, Jul 15, 2021 at 12:35 PM Hafiz Abid Qadeer > wrote: >> >> On 15/07/2021 11:33, Thomas Schwinge wrote: >>> Note that the "parent" should be abstract but I don't think dwarf has a way to express a fully abstract parent of a concrete

Re: [PATCH v3 2/2] rs6000: Add test for _mm_minpos_epu16

2021-07-16 Thread Bill Schmidt via Gcc-patches
Hi Paul, Thanks for the cleanups, LGTM!  Recommend maintainers approve. Bill On 7/15/21 6:29 PM, Paul A. Clarke wrote: Copy the test for _mm_minpos_epu16 from gcc/testsuite/gcc.target/i386/sse4_1-phminposuw.c, with a few adjustments: - Adjust the dejagnu directives for powerpc platform. -

Re: [PATCH v3 1/2] rs6000: Add support for _mm_minpos_epu16

2021-07-16 Thread Bill Schmidt via Gcc-patches
Hi Paul, LGTM.  Recommend maintainers approve. Thanks for the cleanups, Bill On 7/15/21 6:29 PM, Paul A. Clarke wrote: Add a naive implementation of the subject x86 intrinsic to ease porting. 2021-07-15 Paul A. Clarke gcc * config/rs6000/smmintrin.h (_mm_minpos_epu16): New. ---

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Jonathan Wakely via Gcc-patches
On Fri, 16 Jul 2021 at 20:26, Matthias Kretz wrote: > > On Friday, 16 July 2021 18:54:30 CEST Jonathan Wakely wrote: > > On Fri, 16 Jul 2021 at 16:33, Jason Merrill wrote: > > > Adjusting them based on tuning would certainly simplify a significant use > > > case, perhaps the only reasonable use.

[committed] analyzer: add region_model::check_region_access

2021-07-16 Thread David Malcolm via Gcc-patches
I've been experimenting with various new diagnostics that require a common place for the analyzer to check the validity of reads or writes to memory (e.g. buffer overflow). As preliminary work, this patch adds new region_model::check_region_for_{read|write} functions which are called anywhere

[committed] analyzer: add __analyzer_dump_state

2021-07-16 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as 9ea10c480565fa42b1804fb436f7e26ca77b71a3. gcc/analyzer/ChangeLog: * engine.cc (exploded_node::on_stmt_pre): Handle __analyzer_dump_state. * program-state.cc

[committed] analyzer: add svalue::maybe_get_region

2021-07-16 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as 5932dd35eaa816e8d9b6406c6c433395ff5b6162. gcc/analyzer/ChangeLog: * program-state.cc (program_state::detect_leaks): Simplify using svalue::maybe_get_region. * region-model-impl-calls.cc

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Matthias Kretz
On Friday, 16 July 2021 19:20:29 CEST Noah Goldstein wrote: > On Fri, Jul 16, 2021 at 11:12 AM Matthias Kretz wrote: > > I don't understand how this feature would lead to false sharing. But maybe > > I > > misunderstand the spatial prefetcher. The first access to one of the two > > cache > >

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Matthias Kretz
On Friday, 16 July 2021 18:54:30 CEST Jonathan Wakely wrote: > On Fri, 16 Jul 2021 at 16:33, Jason Merrill wrote: > > Adjusting them based on tuning would certainly simplify a significant use > > case, perhaps the only reasonable use. Cases more concerned with ABI > > stability probably shouldn't

Re: [PATCH] Fix PR 101453: ICE with optimize and large integer constant

2021-07-16 Thread Richard Biener via Gcc-patches
On July 16, 2021 8:35:25 PM GMT+02:00, apinski--- via Gcc-patches wrote: >From: Andrew Pinski > >The problem is the buffer is too small to hold "-O" and >the interger. This fixes the problem by use the correct size >instead. > >Changes since v1: >* v2: Use HOST_BITS_PER_LONG and just divide by

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Jason Merrill via Gcc-patches
On Fri, Jul 16, 2021, 12:54 PM Jonathan Wakely wrote: > On Fri, 16 Jul 2021 at 16:33, Jason Merrill wrote: > > Adjusting them based on tuning would certainly simplify a significant use > > case, perhaps the only reasonable use. Cases more concerned with ABI > > stability probably shouldn't use

[PATCH] Fix PR 101453: ICE with optimize and large integer constant

2021-07-16 Thread apinski--- via Gcc-patches
From: Andrew Pinski The problem is the buffer is too small to hold "-O" and the interger. This fixes the problem by use the correct size instead. Changes since v1: * v2: Use HOST_BITS_PER_LONG and just divide by 3 instead of 3.32. OK? Bootstrapped and tested on x86_64-linux with no

Re: [PATCH v2 6/6] rs6000: Add tests for SSE4.1 "floor" intrinsics

2021-07-16 Thread Bill Schmidt via Gcc-patches
Hi Paul, LGTM!  Recommend maintainers approve. Bill On 7/16/21 8:50 AM, Paul A. Clarke wrote: Add the tests for _mm_floor_pd, _mm_floor_ps, _mm_floor_sd, _mm_floor_ss. These are modelled after (and depend upon parts of) the tests for _mm_ceil intrinsics, recently posted. Copy a test for

Re: [PATCH v2 5/6] rs6000: Add support for SSE4.1 "floor" intrinsics

2021-07-16 Thread Bill Schmidt via Gcc-patches
Hi Paul, LGTM!  Recommend maintainers approve. Bill On 7/16/21 8:50 AM, Paul A. Clarke wrote: 2021-07-16 Paul A. Clarke gcc * config/rs6000/smmintrin.h (_mm_floor_pd, _mm_floor_ps, _mm_floor_sd, _mm_floor_ss): New. --- v2: Improve formatting per review from Bill.

Re: [PATCH v2 4/6] rs6000: Add tests for SSE4.1 "ceil" intrinsics

2021-07-16 Thread Bill Schmidt via Gcc-patches
Hi Paul, Thanks for the cleanup, LGTM!  Recommend maintainers approve. Bill On 7/16/21 8:50 AM, Paul A. Clarke wrote: Add the tests for _mm_ceil_pd, _mm_ceil_ps, _mm_ceil_sd, _mm_ceil_ss. Copy a test for _mm_ceil_pd and _mm_ceil_ps from gcc/testsuite/gcc.target/i386. Define __VSX_SSE2__ to

Re: Pushing XFAILed test cases

2021-07-16 Thread Sandra Loosemore
On 7/16/21 9:32 AM, Thomas Schwinge wrote: [much snipped] Of course, we shall assume a certain level of quality in the XFAILed test cases: I'm certainly not suggesting we put any random junk into the testsuite, coarsely XFAILed. (I have not reviewed Sandra's test cases to that effect, but

Re: [PATCH v2 3/6] rs6000: Add support for SSE4.1 "ceil" intrinsics

2021-07-16 Thread Bill Schmidt via Gcc-patches
Hi Paul, Thanks for the cleanup, LGTM!  Recommend maintainers approve. Bill On 7/16/21 8:50 AM, Paul A. Clarke wrote: 2021-07-16 Paul A. Clarke gcc * config/rs6000/smmintrin.h (_mm_ceil_pd, _mm_ceil_ps, _mm_ceil_sd, _mm_ceil_ss): New. --- v2: Improve formatting per review

Re: [PATCH v2 2/6] rs6000: Add tests for SSE4.1 "blend" intrinsics

2021-07-16 Thread Bill Schmidt via Gcc-patches
Hi Paul, Thanks for the cleanup, LGTM!  Recommend maintainers approve. Bill On 7/16/21 8:50 AM, Paul A. Clarke wrote: Copy the tests for _mm_blend_pd, _mm_blendv_pd, _mm_blend_ps, _mm_blendv_ps from gcc/testsuite/gcc.target/i386. 2021-07-16 Paul A. Clarke gcc/testsuite *

Re: [PATCH v2 1/6] rs6000: Add support for SSE4.1 "blend" intrinsics

2021-07-16 Thread Bill Schmidt via Gcc-patches
Hi Paul, Thanks!  LGTM.  Recommend that maintainers approve. Bill On 7/16/21 8:50 AM, Paul A. Clarke wrote: _mm_blend_epi16 and _mm_blendv_epi8 were added earlier. Add these four to complete the set. 2021-07-16 Paul A. Clarke gcc * config/rs6000/smmintrin.h (_mm_blend_pd,

Need Help: Initialize paddings for -ftrivial-auto-var-init

2021-07-16 Thread Qing Zhao via Gcc-patches
Hi, After some more study on __builtin_clear_padding and the corresponding testing cases. And also considered both Richard Biener and Richard Sandiford’s previous suggestion to use __builtin_clear_padding. I have the following thought on the paddings initialization: ** We can insert a

Re: [PATCH] c++: Allow constexpr references to non-static vars [PR100976]

2021-07-16 Thread Marek Polacek via Gcc-patches
On Fri, Jul 16, 2021 at 12:53:05PM -0400, Jason Merrill wrote: > On 7/15/21 5:14 PM, Marek Polacek wrote: > > The combination of DR 2481 and DR 2126 should allow us to do > > > >void f() > >{ > > constexpr const int = 42; > > static_assert(r == 42); > >} > > > > because

Re: [PATCH libatomic/arm] avoid warning on constant addresses (PR 101379)

2021-07-16 Thread Thomas Schwinge
Hi Martin! On 2021-07-09T17:11:25-0600, Martin Sebor via Gcc-patches wrote: > The attached tweak avoids the new -Warray-bounds instances when > building libatomic for arm. Christophe confirms it resolves > the problem (thank you!) As Abid has just reported in

[committed] fix a few target-dependent test failures (PR 101468)

2021-07-16 Thread Martin Sebor via Gcc-patches
A number of newly added tests were reported failing on a few targets in PR testsuite/101468. I have committed r12-2372 with fixes for those tests: https://gcc.gnu.org/g:94ba897be8b59ef5926eed4c77fd53812fb20add Martin

Re: Pushing XFAILed test cases

2021-07-16 Thread Martin Sebor via Gcc-patches
On 7/16/21 9:32 AM, Thomas Schwinge wrote: [Also including for guidance.] Hi! (I'm not involved in or familiar with Sandra's Fortran TS29113 work, just commenting generally here.) On 2021-07-16T09:52:28+0200, Thomas Koenig via Gcc-patches wrote: It is my understanding that it is not gcc

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Noah Goldstein via Gcc-patches
On Fri, Jul 16, 2021 at 11:12 AM Matthias Kretz wrote: > On Friday, 16 July 2021 04:41:17 CEST Jason Merrill via Gcc-patches wrote: > > > Currently the patch does not adjust the values based on -march, as in > JF's > > > proposal. I'll need more guidance from the ARM/AArch64 maintainers > about

Re: [PATCH] c++: alias CTAD inside decltype [PR101233]

2021-07-16 Thread Jason Merrill via Gcc-patches
On 7/15/21 12:37 PM, Patrick Palka wrote: This is the alias CTAD version of the CTAD bug PR93248, and the fix is the same: clear cp_unevaluated_operand so that the entire chain of DECL_ARGUMENTS gets substituted. Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk/11?

Re: [PATCH] c++: covariant reference return type [PR99664]

2021-07-16 Thread Jason Merrill via Gcc-patches
On 7/15/21 12:37 PM, Patrick Palka wrote: This implements the wording changes of DR 960 which clarifies that two reference types are covariant only if they're both lvalue references or both rvalue references. Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? OK.

Re: [PATCH] c++: argument pack expansion inside constraint [PR100138]

2021-07-16 Thread Jason Merrill via Gcc-patches
On 7/15/21 12:56 PM, Patrick Palka wrote: On Sat, May 8, 2021 at 8:42 AM Jason Merrill wrote: On 5/7/21 12:33 PM, Patrick Palka wrote: This PR is about CTAD but the underlying problems are more general; CTAD is a good trigger for them because of the necessary substitution into constraints

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Jonathan Wakely via Gcc-patches
On Fri, 16 Jul 2021 at 16:33, Jason Merrill wrote: > Adjusting them based on tuning would certainly simplify a significant use > case, perhaps the only reasonable use. Cases more concerned with ABI > stability probably shouldn't use them at all. And that would mean not > needing to worry about

Re: [PATCH] c++: Allow constexpr references to non-static vars [PR100976]

2021-07-16 Thread Jason Merrill via Gcc-patches
On 7/15/21 5:14 PM, Marek Polacek wrote: The combination of DR 2481 and DR 2126 should allow us to do void f() { constexpr const int = 42; static_assert(r == 42); } because [expr.const]/4.7 now says that "a temporary object of non-volatile const-qualified literal type whose

Re: [PATCH] libstdc++: Skip atomic instructions in _Sp_counted_base::_M_release when both counts are 1

2021-07-16 Thread Maged Michael via Gcc-patches
Thank you, Jonathan, for the detailed comments! I'll update the patch accordingly. On Fri, Jul 16, 2021 at 9:55 AM Jonathan Wakely wrote: > On Thu, 17 Dec 2020 at 20:51, Maged Michael wrote: > > > > Please find a proposed patch for _Sp_counted_base::_M_release to skip the > > two atomic

Pushing XFAILed test cases (was: [PATCH, Fortran] Bind(c): CFI_signed_char is not a Fortran character type)

2021-07-16 Thread Thomas Schwinge
[Also including for guidance.] Hi! (I'm not involved in or familiar with Sandra's Fortran TS29113 work, just commenting generally here.) On 2021-07-16T09:52:28+0200, Thomas Koenig via Gcc-patches wrote: > It is my understanding that it is not gcc policy to add xfailed test > cases for

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Jason Merrill via Gcc-patches
On Fri, Jul 16, 2021, 11:12 AM Matthias Kretz wrote: > On Friday, 16 July 2021 04:41:17 CEST Jason Merrill via Gcc-patches wrote: > > > Currently the patch does not adjust the values based on -march, as in > JF's > > > proposal. I'll need more guidance from the ARM/AArch64 maintainers > about >

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Matthias Kretz
On Friday, 16 July 2021 04:41:17 CEST Jason Merrill via Gcc-patches wrote: > > Currently the patch does not adjust the values based on -march, as in JF's > > proposal. I'll need more guidance from the ARM/AArch64 maintainers about > > how to go about that. --param l1-cache-line-size is set based

[PATCH][committed] testsuite: fix IL32 issues with usdot tests.

2021-07-16 Thread Tamar Christina via Gcc-patches
Hi All, Fix tests when int == long by using long long instead. Regtested on aarch64-none-linux-gnu and no issues. Committed under the obvious rule. Thanks, Tamar gcc/testsuite/ChangeLog: PR middle-end/101457 * gcc.dg/vect/vect-reduc-dot-19.c: Use long long. *

Re: [PATCH] libstdc++: Use __extension__ instead of diagnostic pragmas (was: Suppress pedantic warnings about __int128)

2021-07-16 Thread Jonathan Wakely via Gcc-patches
On Fri, 16 Jul 2021 at 14:02, Jonathan Wakely wrote: > > On Fri, 16 Jul 2021 at 12:29, Jonathan Wakely wrote: > > Hmm, in fact it seems that we can just use the __uint128_t typedef > > instead, which doesn't give a pedwarn: > > > > using __rep = __uint128_t; > > > > Is that typedef always

Re: [committed] libstdc++: Add noexcept to __replacement_assert [PR101429]

2021-07-16 Thread Jonathan Wakely via Gcc-patches
On Thu, 15 Jul 2021 at 19:47, Jonathan Wakely wrote: > > > > On Thu, 15 Jul 2021, 18:21 François Dumont via Libstdc++, > wrote: >> >> On 15/07/21 5:26 pm, Jonathan Wakely via Libstdc++ wrote: >> > This results in slightly smaller code when assertions are enabled when >> > either using Clang

[committed] libstdc++: Simplify numeric_limits<__max_size_type>

2021-07-16 Thread Jonathan Wakely via Gcc-patches
If __int128 is supported then __int_traits<__int128> is guaranteed to be specialized, so we can remove the preprocessor condition inside the std::numeric_traits<__detail::__max_size_type> specialization. Simply using __int_traits<_Sp::__rep> gives the right answer. Signed-off-by: Jonathan Wakely

[committed] libstdc++: Modernize helpers

2021-07-16 Thread Jonathan Wakely via Gcc-patches
Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/random.h (_Shift::__value): Use constexpr. (_Select_uint_least_t::type): Use using-declaration. (_Mod): Likewise. * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line

Re: [PATCH 1/2] arm: Fix vcond_mask expander for MVE (PR target/100757)

2021-07-16 Thread Christophe LYON via Gcc-patches
On 16/07/2021 16:06, Richard Sandiford via Gcc-patches wrote: Hi, Sorry for the slow review. I'd initially held off from reviewing because it sounded like you were trying to treat predicates as MODE_VECTOR_BOOL instead. Is that right? If so, how did that go? Yes, that's part of PR

Re: [PATCH] Rewrite memset expanders with vec_duplicate

2021-07-16 Thread H.J. Lu via Gcc-patches
On Fri, Jul 16, 2021 at 6:24 AM Richard Sandiford wrote: > > "H.J. Lu via Gcc-patches" writes: > > On Fri, Jul 16, 2021 at 4:38 AM Richard Sandiford > > wrote: > >> > >> "H.J. Lu via Gcc-patches" writes: > >> > 1. Rewrite builtin_memset_read_str and builtin_memset_gen_str with > >> >

Re: [PATCH 1/2] arm: Fix vcond_mask expander for MVE (PR target/100757)

2021-07-16 Thread Richard Sandiford via Gcc-patches
Hi, Sorry for the slow review. I'd initially held off from reviewing because it sounded like you were trying to treat predicates as MODE_VECTOR_BOOL instead. Is that right? If so, how did that go? It does feel like the right long-term direction. Treating masks as integers for AVX seems to

Re: [PATCH 1/3] Remove gimple_expr_type uses from value-range code

2021-07-16 Thread Andrew MacLeod via Gcc-patches
On 7/16/21 9:02 AM, Richard Biener wrote: This removes the last uses from value-range code. Bootstrap & regtest running on x86_64-unknown-linux-gnu, OK? absolutely.

Re: [PATCH] libstdc++: Skip atomic instructions in _Sp_counted_base::_M_release when both counts are 1

2021-07-16 Thread Jonathan Wakely via Gcc-patches
On Thu, 17 Dec 2020 at 20:51, Maged Michael wrote: > > Please find a proposed patch for _Sp_counted_base::_M_release to skip the > two atomic instructions that decrement each of the use count and the weak > count when both are 1. I proposed the general idea in an earlier thread ( >

[PATCH v2 6/6] rs6000: Add tests for SSE4.1 "floor" intrinsics

2021-07-16 Thread Paul A. Clarke via Gcc-patches
Add the tests for _mm_floor_pd, _mm_floor_ps, _mm_floor_sd, _mm_floor_ss. These are modelled after (and depend upon parts of) the tests for _mm_ceil intrinsics, recently posted. Copy a test for _mm_floor_sd from gcc/testsuite/gcc.target/i386. 2021-07-16 Paul A. Clarke gcc/testsuite *

[PATCH v2 4/6] rs6000: Add tests for SSE4.1 "ceil" intrinsics

2021-07-16 Thread Paul A. Clarke via Gcc-patches
Add the tests for _mm_ceil_pd, _mm_ceil_ps, _mm_ceil_sd, _mm_ceil_ss. Copy a test for _mm_ceil_pd and _mm_ceil_ps from gcc/testsuite/gcc.target/i386. Define __VSX_SSE2__ to pick up some union definitions in m128-check.h. 2021-07-16 Paul A. Clarke gcc/testsuite *

[PATCH v2 5/6] rs6000: Add support for SSE4.1 "floor" intrinsics

2021-07-16 Thread Paul A. Clarke via Gcc-patches
2021-07-16 Paul A. Clarke gcc * config/rs6000/smmintrin.h (_mm_floor_pd, _mm_floor_ps, _mm_floor_sd, _mm_floor_ss): New. --- v2: Improve formatting per review from Bill. gcc/config/rs6000/smmintrin.h | 32 1 file changed, 32 insertions(+)

[PATCH v2 3/6] rs6000: Add support for SSE4.1 "ceil" intrinsics

2021-07-16 Thread Paul A. Clarke via Gcc-patches
2021-07-16 Paul A. Clarke gcc * config/rs6000/smmintrin.h (_mm_ceil_pd, _mm_ceil_ps, _mm_ceil_sd, _mm_ceil_ss): New. --- v2: Improve formatting per review from Bill. gcc/config/rs6000/smmintrin.h | 32 1 file changed, 32 insertions(+) diff

[PATCH v2 2/6] rs6000: Add tests for SSE4.1 "blend" intrinsics

2021-07-16 Thread Paul A. Clarke via Gcc-patches
Copy the tests for _mm_blend_pd, _mm_blendv_pd, _mm_blend_ps, _mm_blendv_ps from gcc/testsuite/gcc.target/i386. 2021-07-16 Paul A. Clarke gcc/testsuite * gcc.target/powerpc/sse4_1-blendpd.c: Copy from gcc.target/i386. * gcc.target/powerpc/sse4_1-blendps-2.c: Likewise.

[PATCH v2 1/6] rs6000: Add support for SSE4.1 "blend" intrinsics

2021-07-16 Thread Paul A. Clarke via Gcc-patches
_mm_blend_epi16 and _mm_blendv_epi8 were added earlier. Add these four to complete the set. 2021-07-16 Paul A. Clarke gcc * config/rs6000/smmintrin.h (_mm_blend_pd, _mm_blendv_pd, _mm_blend_ps, _mm_blendv_ps): New. --- v2: - Per review from Bill, rewrote _mm_blend_pd and

[PATCH v2 0/6] rs6000: Add SSE4.1 "blend", "ceil", "floor"

2021-07-16 Thread Paul A. Clarke via Gcc-patches
I have combined three independent "v1" patchsets into this set, and the "blend" patches were originally combined with "test", which has now been merged. Instead of copying some tests from gcc/testsuite/gcc.target/i386, I created new tests. The i386 tests in question used rand() to generate the

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Richard Earnshaw via Gcc-patches
On 16/07/2021 12:17, Jonathan Wakely via Gcc-patches wrote: On Fri, 16 Jul 2021 at 03:51, Noah Goldstein wrote: On intel x86 systems with a private L2 cache the spatial prefetcher can cause destructive interference along 128 byte aligned boundaries.

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Jonathan Wakely via Gcc-patches
On Fri, 16 Jul 2021 at 03:42, Jason Merrill via Libstdc++ wrote: > > diff --git a/libstdc++-v3/include/std/version > > b/libstdc++-v3/include/std/version > > index 27bcd32cb60..d5e155db48b 100644 > > --- a/libstdc++-v3/include/std/version > > +++ b/libstdc++-v3/include/std/version > > @@ -140,6

Re: [PATCH] Rewrite memset expanders with vec_duplicate

2021-07-16 Thread Richard Sandiford via Gcc-patches
"H.J. Lu via Gcc-patches" writes: > On Fri, Jul 16, 2021 at 4:38 AM Richard Sandiford > wrote: >> >> "H.J. Lu via Gcc-patches" writes: >> > 1. Rewrite builtin_memset_read_str and builtin_memset_gen_str with >> > vec_duplicate_optab to duplicate QI value to TI/OI/XI value. >> > 2. Add

Re: contracts library support (was Re: [PATCH] PING implement pre-c++20 contracts)

2021-07-16 Thread Andrew Sutton via Gcc-patches
> Is just using std::terminate as the handler viable? Or if we're sure > contracts in some form will go into the IS eventually, and the > signature won't change, we could just add it in __cxxabiv1:: as you > suggested earlier. No, the handler needs to be configurable (at least quietly) in order

[PATCH 3/3] Remove gimple_expr_type

2021-07-16 Thread Richard Biener
This removes the transitional gimple_expr_type API. Bootstrap & regtest running on x86_64-unknown-linux-gnu. 2021-07-16 Richard Biener * gimple.h (gimple_expr_type): Remove. * gcc/doc/gimple.texi: Remove gimple_expr_type documentation. --- gcc/doc/gimple.texi | 8

[PATCH] libstdc++: Use __extension__ instead of diagnostic pragmas (was: Suppress pedantic warnings about __int128)

2021-07-16 Thread Jonathan Wakely via Gcc-patches
On Fri, 16 Jul 2021 at 12:29, Jonathan Wakely wrote: > Hmm, in fact it seems that we can just use the __uint128_t typedef > instead, which doesn't give a pedwarn: > > using __rep = __uint128_t; > > Is that typedef always available if __int128 is? There's a comment in > gcc/c-family/c-common.c

[PATCH 2/3] Remove last gimple_expr_type uses

2021-07-16 Thread Richard Biener
This removes the last uses of gimple_expr_type. Bootstrap & regtest running on x86_64-unknown-linux-gnu. 2021-07-16 Richard Biener * tree-ssa-sccvn.c (vn_reference_eq): Handle NULL vr->type. (ao_ref_init_from_vn_reference): Likewise. (vn_reference_lookup_call): Do not

[PATCH 1/3] Remove gimple_expr_type uses from value-range code

2021-07-16 Thread Richard Biener
This removes the last uses from value-range code. Bootstrap & regtest running on x86_64-unknown-linux-gnu, OK? Thanks, Richard. 2021-07-16 Richard Biener * tree-vrp.c (register_edge_assert_for_2): Use the type from the LHS. (vrp_folder::fold_predicate_in): Likewise.

Re: [PATCH] c++: Don't hide narrowing errors in system headers

2021-07-16 Thread Jason Merrill via Gcc-patches
On 7/15/21 8:03 PM, Marek Polacek wrote: Jonathan pointed me at this issue where constexpr unsigned f() { constexpr int n = -1; return unsigned{n}; } is accepted in system headers, despite the narrowing conversion from a constant. I suspect that whereas narrowing warnings should be

Re: [PATCH] Rewrite memset expanders with vec_duplicate

2021-07-16 Thread H.J. Lu via Gcc-patches
On Fri, Jul 16, 2021 at 4:38 AM Richard Sandiford wrote: > > "H.J. Lu via Gcc-patches" writes: > > 1. Rewrite builtin_memset_read_str and builtin_memset_gen_str with > > vec_duplicate_optab to duplicate QI value to TI/OI/XI value. > > 2. Add TARGET_GEN_MEMSET_SCRATCH_RTX to allow the backend to

Re: *Ping**2 [Patch] Fortran: Fix bind(C) character length checks

2021-07-16 Thread Jerry D via Gcc-patches
Good to go Tobias. Jerry On 7/14/21 5:50 AM, Burnus, Tobias wrote: Ping**2 On Juli 8, 2021 I wrote: *Ping* I intent to incorporate Sandra's suggestions, except for the beginning of line spacing - that's needed to avoid exceeding the 80 character line limit. I did not include an updated

[PATCH] Remove more gimple_expr_type uses

2021-07-16 Thread Richard Biener
This removes a few more uses. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-07-16 Richard Biener * gimple-ssa-store-merging.c (verify_symbolic_number_p): Use the type of the LHS. (find_bswap_or_nop_1): Likewise. (find_bswap_or_nop):

Re: [RFC] c-family: Add __builtin_noassoc

2021-07-16 Thread Matthias Kretz
On Friday, 16 July 2021 11:31:29 CEST Richard Biener wrote: > On Fri, Jul 16, 2021 at 10:57 AM Matthias Kretz wrote: > > On Wednesday, 14 July 2021 10:14:55 CEST Richard Biener wrote: > > > I think implementing it similar to how we do __builtin_shufflevector > > > would > > > be easily possible.

Re: [PATCH] Rewrite memset expanders with vec_duplicate

2021-07-16 Thread Richard Sandiford via Gcc-patches
"H.J. Lu via Gcc-patches" writes: > 1. Rewrite builtin_memset_read_str and builtin_memset_gen_str with > vec_duplicate_optab to duplicate QI value to TI/OI/XI value. > 2. Add TARGET_GEN_MEMSET_SCRATCH_RTX to allow the backend to use a hard > scratch register to avoid stack realignment when

Re: [committed] libstdc++: Suppress pedantic warnings about __int128

2021-07-16 Thread Jonathan Wakely via Gcc-patches
On Fri, 16 Jul 2021 at 09:40, Jonathan Wakely wrote: > > > > On Fri, 16 Jul 2021, 09:38 Jonathan Wakely, wrote: >> >> >> >> On Fri, 16 Jul 2021, 09:30 Jakub Jelinek via Libstdc++, >> wrote: >>> >>> On Fri, Jul 16, 2021 at 10:27:09AM +0200, Jakub Jelinek via Gcc-patches >>> wrote: >>> > On

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-16 Thread Jonathan Wakely via Gcc-patches
On Fri, 16 Jul 2021 at 03:51, Noah Goldstein wrote: > On intel x86 systems with a private L2 cache the spatial prefetcher > can cause destructive interference along 128 byte aligned boundaries. >

[PATCH] Get rid of some gimple_expr_type uses

2021-07-16 Thread Richard Biener
This gets rid of a few gimple_expr_type uses. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-07-16 Richard Biener * gimple-fold.c (gimple_fold_stmt_to_constant_1): Use the type of the LHS. (gimple_assign_nonnegative_warnv_p): Likewise.

Re: Add EAF_NOT_RETURNED flag

2021-07-16 Thread Richard Biener
On Fri, 16 Jul 2021, Jan Hubicka wrote: > Hi, > this patch adds EAF_NOT_RETURNED flag which is determined by ipa-modref > and used both to improve its propagation (it can stop propagating flags > from call parameter to return value if EAF_NOT_RETURNED is earlier > determined for callee) and also

[PATCH v2] gcc_update: use human readable name for revision string in gcc/REVISION

2021-07-16 Thread Serge Belyshev
Based on discussion I've chosen open-coded version without commit hash. >> > > ... Perhaps rename the r, o, rr and m temporaries. I like it better with short names, there is no other code in that script to clash with. (Also, two adjacent case branches for hg and svn are essentialy dead now).

[PATCH] tree-optimization/101467 - fix make_temp_ssa_name usage

2021-07-16 Thread Richard Biener
My previous change to vect_gen_while introduced paths which call make_temp_ssa_name with a NULL name which isn't supported. The following fixes that. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-07-16 Richard Biener PR tree-optimization/101467 *

Re: [PATCH] gcc_update: use gcc-descr git alias for revision string in gcc/REVISION

2021-07-16 Thread Richard Biener via Gcc-patches
On Fri, Jul 16, 2021 at 11:36 AM Jakub Jelinek wrote: > > On Fri, Jul 16, 2021 at 11:22:27AM +0200, Richard Biener wrote: > > > Yeah, that will mean consistency no matter whether one has the > > > customizations installed or not. > > > And, you don't want the effect of $GCC_GIT gcc-descr but

Re: [PATCH] gcc_update: use gcc-descr git alias for revision string in gcc/REVISION

2021-07-16 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 16, 2021 at 11:22:27AM +0200, Richard Biener wrote: > > Yeah, that will mean consistency no matter whether one has the > > customizations installed or not. > > And, you don't want the effect of $GCC_GIT gcc-descr but $GCC_GIT gcc-descr > > HEAD > > (the default is $GCC_GIT gcc-descr

Re: [RFC] c-family: Add __builtin_noassoc

2021-07-16 Thread Richard Biener via Gcc-patches
On Fri, Jul 16, 2021 at 10:57 AM Matthias Kretz wrote: > > On Wednesday, 14 July 2021 10:14:55 CEST Richard Biener wrote: > > > > There's one "related" IL feature used by the Fortran frontend - > > > > PAREN_EXPR > > > > prevents association across it. So for Fortran (when not > > > >

Re: [PATCH] gcc_update: use gcc-descr git alias for revision string in gcc/REVISION

2021-07-16 Thread Richard Biener via Gcc-patches
On Fri, Jul 16, 2021 at 9:29 AM Jakub Jelinek wrote: > > On Fri, Jul 16, 2021 at 09:06:01AM +0200, Richard Biener via Gcc-patches > wrote: > > On Thu, Jul 15, 2021 at 9:12 PM Serge Belyshev > > wrote: > > > > > > This is to make development version string more readable, and > > > to simplify

Re: [PATCH 2/2][RFC] Add loop masking support for x86

2021-07-16 Thread Richard Biener
On Thu, 15 Jul 2021, Richard Biener wrote: > On Thu, 15 Jul 2021, Richard Biener wrote: > > > OK, guess I was more looking at > > > > #define N 32 > > int foo (unsigned long *a, unsigned long * __restrict b, > > unsigned int *c, unsigned int * __restrict d, > > int n) > > { > >

[RFC] c-family: Add __builtin_noassoc

2021-07-16 Thread Matthias Kretz
On Wednesday, 14 July 2021 10:14:55 CEST Richard Biener wrote: > > > There's one "related" IL feature used by the Fortran frontend - > > > PAREN_EXPR > > > prevents association across it. So for Fortran (when not > > > -fno-protect-parens which is enabled by -Ofast), (a + b) - b cannot be > > >

[PATCH] C-SKY: Use the common way to define MULTILIB_DIRNAMES.

2021-07-16 Thread Xianmiao Qu
From: Cooper Qu This patch has been pushed. C-SKY previously used a forked print-sysroot-suffix.sh and define CSKY_MULTILIB_DIRNAMES to specify OS multilib directories. This patch delete the forked print-sysroot-suffix.sh and define MULTILIB_DIRNAMES to generate same directories. gcc/

RE: [PATCH 1/4][committed] testsuite: Fix testisms in scalar tests PR101457

2021-07-16 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: H.J. Lu > Sent: Friday, July 16, 2021 3:21 AM > To: Tamar Christina > Cc: GCC Patches ; Richard Sandiford > ; nd > Subject: Re: [PATCH 1/4][committed] testsuite: Fix testisms in scalar tests > PR101457 > > On Thu, Jul 15, 2021 at 9:40 AM Tamar Christina via

Add EAF_NOT_RETURNED flag

2021-07-16 Thread Jan Hubicka
Hi, this patch adds EAF_NOT_RETURNED flag which is determined by ipa-modref and used both to improve its propagation (it can stop propagating flags from call parameter to return value if EAF_NOT_RETURNED is earlier determined for callee) and also to improve points-to constraints in

Re: [committed] libstdc++: Suppress pedantic warnings about __int128

2021-07-16 Thread Jonathan Wakely via Gcc-patches
On Fri, 16 Jul 2021, 09:38 Jonathan Wakely, wrote: > > > On Fri, 16 Jul 2021, 09:30 Jakub Jelinek via Libstdc++, < > libstd...@gcc.gnu.org> wrote: > >> On Fri, Jul 16, 2021 at 10:27:09AM +0200, Jakub Jelinek via Gcc-patches >> wrote: >> > On Fri, Jul 16, 2021 at 08:41:06AM +0100, Jonathan Wakely

Re: [committed] libstdc++: Suppress pedantic warnings about __int128

2021-07-16 Thread Jonathan Wakely via Gcc-patches
On Fri, 16 Jul 2021, 09:30 Jakub Jelinek via Libstdc++, < libstd...@gcc.gnu.org> wrote: > On Fri, Jul 16, 2021 at 10:27:09AM +0200, Jakub Jelinek via Gcc-patches > wrote: > > On Fri, Jul 16, 2021 at 08:41:06AM +0100, Jonathan Wakely via > Gcc-patches wrote: > > > ---

Re: [committed] libstdc++: Suppress pedantic warnings about __int128

2021-07-16 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 16, 2021 at 10:27:09AM +0200, Jakub Jelinek via Gcc-patches wrote: > On Fri, Jul 16, 2021 at 08:41:06AM +0100, Jonathan Wakely via Gcc-patches > wrote: > > --- a/libstdc++-v3/include/bits/max_size_type.h > > +++ b/libstdc++-v3/include/bits/max_size_type.h > > @@ -417,7 +417,10 @@

Re: [committed] libstdc++: Suppress pedantic warnings about __int128

2021-07-16 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 16, 2021 at 08:41:06AM +0100, Jonathan Wakely via Gcc-patches wrote: > --- a/libstdc++-v3/include/bits/max_size_type.h > +++ b/libstdc++-v3/include/bits/max_size_type.h > @@ -417,7 +417,10 @@ namespace ranges > #endif > > #if __SIZEOF_INT128__ > +#pragma GCC diagnostic push >

Re: [PATCH, Fortran] Bind(c): CFI_signed_char is not a Fortran character type

2021-07-16 Thread Thomas Koenig via Gcc-patches
Hi Sandra, The part of the patch to add tests for this goes on top of my base TS29113 testsuite patch, which hasn't been reviewed or committed yet. It is my understanding that it is not gcc policy to add xfailed test cases for things that do not yet work. Rather, xfail is for tests that

[committed] libstdc++: Adjust doxygen markup for unique_ptr grouping

2021-07-16 Thread Jonathan Wakely via Gcc-patches
This reorders the @{ and @relates tags, and moves the definition of the __cpp_lib_make_unique macro out of the group, as it seems to confuse doxygen. libstdc++-v3/ChangeLog: * include/bits/unique_ptr.h: Adjust doxygen markup. Tested powerpc64le-linux. Committed to trunk. commit

[committed] libstdc++: Adjust doxygen markup for variable templates group [PR101307]

2021-07-16 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: PR libstdc++/101307 * include/std/type_traits: Adjust doxygen markup. Tested powerpc64le-linux. Committed to trunk. commit da89dfc2a0cb29d3d8a4f2394eee90d150cf6185 Author: Jonathan Wakely Date: Thu Jul 15 21:13:34 2021 libstdc++: Adjust doxygen

[PATCH] tree-optimization/101462 - fix signedness of reused reduction vector

2021-07-16 Thread Richard Biener
This fixes the partial reduction of the reused reduction vector to carried out in the correct sign and the correctly signed vector recorded for the skip edge use. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-07-16 Richard Biener * tree-vect-loop.c

[committed] libstdc++: Suppress pedantic warnings about __int128

2021-07-16 Thread Jonathan Wakely via Gcc-patches
With -std=c++NN -pedantic -Wsystem-headers there are warnings about the use of __int128, which can be suppressed using diagnostic pragmas. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/cpp_type_traits.h: Add diagnostic pragmas around uses of non-standard

Re: [PATCH v3] IBM Z: Use @PLT symbols for local functions in 64-bit mode

2021-07-16 Thread Andreas Krebbel via Gcc-patches
On 7/12/21 9:23 PM, Ilya Leoshkevich wrote: > Bootstrapped and regtested on s390x-redhat-linux. Ok for master? > > v1: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573614.html > v1 -> v2: Do not use UNSPEC_PLT in 64-bit code and rename it to > UNSPEC_PLT31 (Ulrich, Andreas). Do

  1   2   >