Re: [PATCH v3 1/6] rs6000: Support SSE4.1 "round" intrinsics

2021-10-11 Thread Paul A. Clarke via Gcc-patches
On Mon, Oct 11, 2021 at 11:28:39AM -0500, Segher Boessenkool wrote: > On Mon, Oct 11, 2021 at 08:46:17AM -0500, Paul A. Clarke wrote: > > On Fri, Oct 08, 2021 at 05:31:11PM -0500, Segher Boessenkool wrote: [...] > > > > With respect to volatile, I worry about removing it, because I do > > > > indee

Re: [PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

2021-10-11 Thread Segher Boessenkool
On Mon, Oct 11, 2021 at 10:23:03AM -0600, Martin Sebor wrote: > On 10/11/21 9:30 AM, Segher Boessenkool wrote: > >On Mon, Oct 11, 2021 at 10:47:00AM +0800, Kewen.Lin wrote: > >>- For generic test cases, it follows the existing suggested > >>practice with necessary target/xfail selector. > > > >Not

[r12-4319 Regression] FAIL: g++.dg/warn/Warray-bounds-16.C -std=gnu++98 (test for excess errors) on Linux/x86_64

2021-10-11 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 09a0affdb0598a54835ac4bb0dd6b54122c12916 is the first bad commit commit 09a0affdb0598a54835ac4bb0dd6b54122c12916 Author: Richard Biener Date: Mon Oct 11 16:06:03 2021 +0200 middle-end/101480 - overloaded global new/delete caused FAIL: g++.dg/warn/Warray-bounds-16.C -std

Re: [PATCH v3 2/6] rs6000: Support SSE4.1 "min" and "max" intrinsics

2021-10-11 Thread Segher Boessenkool
On Mon, Aug 23, 2021 at 02:03:06PM -0500, Paul A. Clarke wrote: > gcc > * config/rs6000/smmintrin.h (_mm_min_epi8, _mm_min_epu16, > _mm_min_epi32, _mm_min_epu32, _mm_max_epi8, _mm_max_epu16, > _mm_max_epi32, _mm_max_epu32): New. > > gcc/testsuite > * gcc.target/powerpc/sse4

[committed] libstdc++: Fix std::match_results::end() for failed matches [PR102667]

2021-10-11 Thread Jonathan Wakely via Gcc-patches
The end() function needs to consider whether the underlying vector is empty, not whether the match_results object is empty. That's because the underlying vector will always contain at least three elements for a match_results object that is "ready". It contains three extra elements which are stored

[committed] libstdc++: Add valid range assertions to std::basic_regex [PR89927]

2021-10-11 Thread Jonathan Wakely via Gcc-patches
This adds some debug assertions to basic_regex. They don't actually diagnose the error in the PR yet, but I have another patch to make them more effective. Also change the __glibcxx_assert(false) consistency checks to include a string literal that tells the user a bit more about why the process ab

[committed] libstdc++: Fix std::numeric_limits::lowest() test for strict modes

2021-10-11 Thread Jonathan Wakely via Gcc-patches
This test uses std::is_integral to decide whether we are testing an integral or floating-point type. But that fails for __int128 because is_integral<__int128> is false in strict modes. By using numeric_limits::is_integer instead we get the right answer for all types that have a numeric_limits speci

[committed] libstdc++: Simplify std::basic_regex::assign

2021-10-11 Thread Jonathan Wakely via Gcc-patches
We know that if __is_contiguous_iterator is true then we have a pointer or a __normal_iterator that wraps a pointer, so we don't need to use std::__to_address. libstdc++-v3/ChangeLog: * include/bits/regex.h (basic_regex::assign(Iter, Iter)): Avoid std::__to_address by using poitne

Re: [PATCH] libstdc++: Add wrapper for internal uses of std::terminate

2021-10-11 Thread Jonathan Wakely via Gcc-patches
On 08/10/21 12:23 +0100, Jonathan Wakely wrote: This adds an inline wrapper for std::terminate that doesn't add the declaration of std::terminate to namespace std. This allows the library to terminate without including all of . libstdc++-v3/ChangeLog: * include/bits/atomic_timed_wait.h:

Re: [PATCH] libstdc++: Fix compare_three_way for constexpr and Clang

2021-10-11 Thread Jonathan Wakely via Gcc-patches
On Fri, 20 Aug 2021 at 21:19, Paul Keir wrote: > > Hi, > > The current compare_three_way implementation makes provision for constant > evaluation contexts (avoiding reinterpret_cast etc.), but the approach fails > with Clang; when it compares two const volatile void pointers: "comparison > betwe

Re: [PATCH 3/7]AArch64 Add pattern for sshr to cmlt

2021-10-11 Thread Andrew Pinski via Gcc-patches
On Thu, Sep 30, 2021 at 2:28 AM Kyrylo Tkachov via Gcc-patches wrote: > > -Original Message- > > From: Tamar Christina > > Sent: Wednesday, September 29, 2021 5:20 PM > > To: gcc-patches@gcc.gnu.org > > Cc: nd ; Richard Earnshaw ; > > Marcus Shawcroft ; Kyrylo Tkachov > > ; Richard Sandif

Revert accidental change in ipa-modref-tree.h

2021-10-11 Thread Jan Hubicka via Gcc-patches
Hi, I managed to commit an unrelatd change that was sitting my tree that breaks bootstrap. I have reverted it now and checked bootstrap gets past the failing point (still waiting for full bootstrap®test to finish at x86_64-linux). Honza gcc/ChangeLog: * ipa-modref-tree.h (struct modref_

Re: [PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

2021-10-11 Thread Martin Sebor via Gcc-patches
On 10/11/21 11:43 AM, Segher Boessenkool wrote: On Mon, Oct 11, 2021 at 10:23:03AM -0600, Martin Sebor wrote: On 10/11/21 9:30 AM, Segher Boessenkool wrote: On Mon, Oct 11, 2021 at 10:47:00AM +0800, Kewen.Lin wrote: - For generic test cases, it follows the existing suggested practice with nece

PING**2 - (Re: [Patch] Fortran: Various CLASS + assumed-rank fixed [PR102541])

2021-10-11 Thread Tobias Burnus
PING**2 On 06.10.21 12:24, Tobias Burnus wrote: Early ping for this patch. I do note that Harald browsed the patch (thanks!) and had two remarks, cf. https://gcc.gnu.org/pipermail/gcc-patches/2021-October/581256.html (I intent to fix the two nits – as mentioned in the reply to Harald's email.)

Re: [Patch] Fortran: Various CLASS + assumed-rank fixed [PR102541]

2021-10-11 Thread Harald Anlauf via Gcc-patches
Hi Tobias, Am 01.10.21 um 02:43 schrieb Tobias Burnus: Hi all, this patch fixes a bunch of issues with CLASS.  * * * besides my previous minor remarks I do not have further comments. I played around a little but did not find any (new) obstacles. OK for mainline? OK from my side. Thanks

[r12-4324 Regression] FAIL: gcc.dg/tree-ssa/ldist-strlen-2.c execution test on Linux/x86_64

2021-10-11 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 008e7397dad971c03c08fc1b0a4a98fddccaaed8 is the first bad commit commit 008e7397dad971c03c08fc1b0a4a98fddccaaed8 Author: Jan Hubicka Date: Mon Oct 11 18:43:26 2021 +0200 Commonize ipa-pta constraint generation for calls caused FAIL: gcc.dg/tree-ssa/ldist-strlen-1.c execu

Re: [PATCH v3 3/6] rs6000: Simplify some SSE4.1 "test" intrinsics

2021-10-11 Thread Segher Boessenkool
On Mon, Aug 23, 2021 at 02:03:07PM -0500, Paul A. Clarke wrote: > gcc > * config/rs6000/smmintrin.h (_mm_test_all_zeros, > _mm_test_all_ones, _mm_test_mix_ones_zeros): Replace. "Replace" does not say what it is replaced with. "Rewrite" maybe? Okay for trunk either way. Thanks! Seg

Re: [PATCH] libstdc++: Fix compare_three_way for constexpr and Clang

2021-10-11 Thread Jonathan Wakely via Gcc-patches
On Mon, 11 Oct 2021 at 20:48, Jonathan Wakely wrote: > > On Fri, 20 Aug 2021 at 21:19, Paul Keir wrote: > > > > Hi, > > > > The current compare_three_way implementation makes provision for constant > > evaluation contexts (avoiding reinterpret_cast etc.), but the approach > > fails with Clang; w

Re: [PATCH] [GCC 10 branch] tree-optimization: [PR102622]: wrong code due to signed one bit integer and "a?-1:0"

2021-10-11 Thread Andrew Pinski via Gcc-patches
On Sun, Oct 10, 2021 at 11:41 PM Richard Biener via Gcc-patches wrote: > > On Mon, Oct 11, 2021 at 1:20 AM apinski--- via Gcc-patches > wrote: > > > > From: Andrew Pinski > > > > So here is the GCC 10 branch version which fixes the wrong code. > > The problem is we create a negation of an one bi

[PATCH] detect out-of-bounds stores by atomic functions [PR102453]

2021-10-11 Thread Martin Sebor via Gcc-patches
The attached change extends GCC's warnings for out-of-bounds stores to cover atomic (and __sync) built-ins. Rather than hardcoding the properties of these built-ins just for the sake of the out-of-bounds detection, on the assumption that it might be useful for future optimizations as well, I took

Re: [PATCH v3 4/6] rs6000: Support SSE4.1 "cvt" intrinsics

2021-10-11 Thread Segher Boessenkool
Hi! On Mon, Aug 23, 2021 at 02:03:08PM -0500, Paul A. Clarke wrote: > gcc > * config/rs6000/smmintrin.h (_mm_cvtepi8_epi16, _mm_cvtepi8_epi32, > _mm_cvtepi8_epi64, _mm_cvtepi16_epi32, _mm_cvtepi16_epi64, > _mm_cvtepi32_epi64, _mm_cvtepu8_epi16, _mm_cvtepu8_epi32, > _mm_cvte

Re: [PATCH] Allow `make tags` to work from top-level directory

2021-10-11 Thread Eric Gallager via Gcc-patches
On Thu, Oct 13, 2016 at 4:43 PM Eric Gallager wrote: > > On 10/13/16, Jeff Law wrote: > > On 10/06/2016 07:21 AM, Eric Gallager wrote: > >> The libdecnumber, libgcc, and libobjc subdirectories are missing TAGS > >> targets in their Makefiles. The attached patch causes them to be > >> skipped when

Re: [PATCH v3 1/6] rs6000: Support SSE4.1 "round" intrinsics

2021-10-11 Thread Segher Boessenkool
Hi! On Mon, Oct 11, 2021 at 12:31:07PM -0500, Paul A. Clarke wrote: > On Mon, Oct 11, 2021 at 11:28:39AM -0500, Segher Boessenkool wrote: > > > Very similar methods are used in glibc today. Are those broken? > > > > Maybe. > > Ouch. So show the code? > > If you get a real (i.e. not inline) fun

Re: [PATCH] rs6000: Fix vec_cpsgn parameter order (PR101985)

2021-10-11 Thread Bill Schmidt via Gcc-patches
Hi!  Ping, please. :) Bill On 9/24/21 10:20 AM, Bill Schmidt wrote: > Hi! > > This fixes a bug reported in > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101985. > > The vec_cpsgn built-in function API differs in argument order from the > copysign3 convention. Currently that pattern is incorrct

Re: [PING] rs600 built-in series

2021-10-11 Thread Bill Schmidt via Gcc-patches
Hi!  Ping, please. :-) Bill On 9/29/21 3:38 PM, Bill Schmidt wrote: > Hi Segher, > > Might as well ping this before I go on vacation.  :-)  I think we're up to > 06/18: > > https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578604.html > > Thanks!! > > Bill

Re: [PATCH v3 5/6] rs6000: Support more SSE4 "cmp", "mul", "pack" intrinsics

2021-10-11 Thread Segher Boessenkool
Hi! On Mon, Aug 23, 2021 at 02:03:09PM -0500, Paul A. Clarke wrote: > gcc > * config/rs6000/smmintrin.h (_mm_cmpeq_epi64, _mm_cmpgt_epi64, > _mm_mullo_epi32, _mm_mul_epi32, _mm_packus_epi32): New. > * config/rs6000/nmmintrin.h: Copy from i386, tweak to suit. > > gcc/testsuite >

Re: [PATCH v3 6/6] rs6000: Guard some x86 intrinsics implementations

2021-10-11 Thread Segher Boessenkool
Hi! On Mon, Aug 23, 2021 at 02:03:10PM -0500, Paul A. Clarke wrote: > Some compatibility implementations of x86 intrinsics include > Power intrinsics which require POWER8. Guard them. > emmintrin.h: > - _mm_cmpord_pd: Remove code which was ostensibly for pre-POWER8, > but which indeed depended

Re: [PATCH v3 0/6] rs6000: Support more SSE4 intrinsics

2021-10-11 Thread Segher Boessenkool
On Thu, Oct 07, 2021 at 07:29:26PM -0500, Paul A. Clarke wrote: > On Thu, Oct 07, 2021 at 05:25:54PM -0500, Segher Boessenkool wrote: > > On Mon, Aug 23, 2021 at 02:03:04PM -0500, Paul A. Clarke wrote: > > > v3: Add "nmmintrin.h". _mm_cmpgt_epi64 is part of SSE4.2 > > > > There should not be a "v3

Re: [PATCH] check to see if null pointer is dereferenceable [PR102630]

2021-10-11 Thread Joseph Myers
The testcase uses the __seg_fs address space, which is x86-specific, but it isn't in an x86-specific directory or otherwise restricted to x86 targets; thus, I'd expect it to fail for other architectures. This is not a review of the rest of the patch. -- Joseph S. Myers jos...@codesourcery.com

Re: [COMMITTED v4 2/6] rs6000: Support SSE4.1 "min" and "max" intrinsics

2021-10-11 Thread Paul A. Clarke via Gcc-patches
On Mon, Oct 11, 2021 at 02:28:15PM -0500, Segher Boessenkool wrote: > On Mon, Aug 23, 2021 at 02:03:06PM -0500, Paul A. Clarke wrote: > > gcc > > * config/rs6000/smmintrin.h (_mm_min_epi8, _mm_min_epu16, > > _mm_min_epi32, _mm_min_epu32, _mm_max_epi8, _mm_max_epu16, > > _mm_max_epi32, _

Re: [COMMITTED v4 3/6] rs6000: Simplify some SSE4.1 "test" intrinsics

2021-10-11 Thread Paul A. Clarke via Gcc-patches
On Mon, Oct 11, 2021 at 03:50:31PM -0500, Segher Boessenkool wrote: > On Mon, Aug 23, 2021 at 02:03:07PM -0500, Paul A. Clarke wrote: > > gcc > > * config/rs6000/smmintrin.h (_mm_test_all_zeros, > > _mm_test_all_ones, _mm_test_mix_ones_zeros): Replace. > > "Replace" does not say what it is

Re: [COMMITTED v4 4/6] rs6000: Support SSE4.1 "cvt" intrinsics

2021-10-11 Thread Paul A. Clarke via Gcc-patches
On Mon, Oct 11, 2021 at 04:52:44PM -0500, Segher Boessenkool wrote: > On Mon, Aug 23, 2021 at 02:03:08PM -0500, Paul A. Clarke wrote: [...] > > +extern __inline __m128i > > +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) > > +_mm_cvtepi8_epi16 (__m128i __A) > > +{ > > + return

Re: [COMMITTED v4 5/6] rs6000: Support more SSE4 "cmp", "mul", "pack" intrinsics

2021-10-11 Thread Paul A. Clarke via Gcc-patches
On Mon, Oct 11, 2021 at 06:07:35PM -0500, Segher Boessenkool wrote: > On Mon, Aug 23, 2021 at 02:03:09PM -0500, Paul A. Clarke wrote: > > gcc > > * config/rs6000/smmintrin.h (_mm_cmpeq_epi64, _mm_cmpgt_epi64, > > _mm_mullo_epi32, _mm_mul_epi32, _mm_packus_epi32): New. > > * config/rs600

Re: [PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

2021-10-11 Thread Hongtao Liu via Gcc-patches
On Tue, Oct 12, 2021 at 4:08 AM Martin Sebor via Gcc-patches wrote: > > On 10/11/21 11:43 AM, Segher Boessenkool wrote: > > On Mon, Oct 11, 2021 at 10:23:03AM -0600, Martin Sebor wrote: > >> On 10/11/21 9:30 AM, Segher Boessenkool wrote: > >>> On Mon, Oct 11, 2021 at 10:47:00AM +0800, Kewen.Lin wr

[COMMITTED] rs6000: Correct several errant dg-require-effective-target

2021-10-11 Thread Paul A. Clarke via Gcc-patches
I misspelled the dg-require-effective-target attribute "vsx_hw" in recent commits, causing the effected tests to fail. Correct the spelling. 2021-10-11 Paul A. Clarke gcc/testsuite * gcc.target/powerpc/pr78102.c: Fix dg-require-effective-target. * gcc.target/powerpc/sse4_1-pac

Re: [PATCH] hardened conditionals

2021-10-11 Thread Alexandre Oliva via Gcc-patches
On Oct 9, 2021, Richard Biener wrote: > Why two passes (and two IL traverses?) Different traversals, no reason to force them into a single pass. One only looks at the last stmt of each block, where cond stmts may be, while the other has to look at every stmt. > How do you prevent RTL optimiz

Re: [PATCH] detect out-of-bounds stores by atomic functions [PR102453]

2021-10-11 Thread Richard Biener via Gcc-patches
On Mon, Oct 11, 2021 at 11:25 PM Martin Sebor wrote: > > The attached change extends GCC's warnings for out-of-bounds > stores to cover atomic (and __sync) built-ins. > > Rather than hardcoding the properties of these built-ins just > for the sake of the out-of-bounds detection, on the assumption

<    1   2