[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. *

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

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. > > *

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) > > +{ > > +

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

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: [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: [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

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

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: [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] 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

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)

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

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, >

[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

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

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;

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!

[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

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.

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] 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

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 to finish at x86_64-linux). Honza gcc/ChangeLog: * ipa-modref-tree.h (struct

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

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 >

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: *

[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

[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

[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

[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

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 > *

[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

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

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 > > > >

[PATCH] libstdc++: Check [ptr,end) and [ptr,ptr+n) ranges with _GLIBCXX_ASSERTIONS

2021-10-11 Thread Jonathan Wakely via Gcc-patches
This enables lightweight checks for the __glibcxx_requires_valid_range and __glibcxx_requires_string_len macros when _GLIBCXX_ASSERTIONS is defined. By using __builtin_object_size we can check whether the end of the range is part of the same object as the start of the range, and detect problems

Re: [PATCH 2/5]AArch64 sve: combine nested if predicates

2021-10-11 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> > Note: This patch series is working incrementally towards generating the >> most >> > efficient code for this and other loops in small steps. >> >> It looks like this could be done in the vectoriser via an extension of the >> scalar_cond_masked_set mechanism.

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

2021-10-11 Thread Segher Boessenkool
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: > > "asm volatile" means there is a side effect in the asm. This means that > > it has to be executed on the real machine the same as on the abstract > > machine,

Re: *PING* [PATCH] doc: improve -fsanitize=undefined description

2021-10-11 Thread Diane Meirowitz via Gcc-patches
Richard, Thank you! Diane > On Oct 11, 2021, at 12:15 PM, Richard Sandiford > wrote: > > Diane Meirowitz via Gcc-patches writes: >> Please review my patch. It is tiny. Thank you. > > Thanks for the patch and sorry for the very slow response. > I've now pushed this to master and all active

Re: [PATCH 1/5]AArch64 sve: combine inverted masks into NOTs

2021-10-11 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: > Hi, > > Sending a new version of the patch because I noticed the pattern was > overriding the nor pattern. > > A second pattern is needed to capture the nor case as combine will match the > longest sequence first. So without this pattern we end up de-optimizing nor >

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 9:30 AM, Segher Boessenkool wrote: Hi! On Mon, Oct 11, 2021 at 10:47:00AM +0800, Kewen.Lin wrote: As PR102658 shows, commit r12-4240 enables vectorization at O2, some cases need to be adjusted accordingly for rs6000 port. - For target specific test cases, this adds

Re: *PING* [PATCH] doc: improve -fsanitize=undefined description

2021-10-11 Thread Richard Sandiford via Gcc-patches
Diane Meirowitz via Gcc-patches writes: > Please review my patch. It is tiny. Thank you. Thanks for the patch and sorry for the very slow response. I've now pushed this to master and all active branches. Thanks, Richard > Diane > > On 9/15/21, 5:02 PM, "Diane Meirowitz" wrote: > > >

Re: [PATCH, rs6000] Disable gimple fold for float or double vec_minmax when fast-math is not set

2021-10-11 Thread Segher Boessenkool
On Mon, Oct 11, 2021 at 10:55:36AM -0500, Segher Boessenkool wrote: > On Thu, Aug 26, 2021 at 09:19:30AM +0800, HAO CHEN GUI wrote: > > gcc/ > > ?? * config/rs6000/rs6000-call.c (rs6000_gimple_fold_builtin): > > ?? Modify the VSX_BUILTIN_XVMINDP, ALTIVEC_BUILTIN_VMINFP, > > ??

Re: [RFC] ldist: Recognize rawmemchr loop patterns

2021-10-11 Thread Stefan Schulze Frielinghaus via Gcc-patches
On Fri, Sep 17, 2021 at 10:08:27AM +0200, Richard Biener wrote: > On Mon, Sep 13, 2021 at 4:53 PM Stefan Schulze Frielinghaus > wrote: > > > > On Mon, Sep 06, 2021 at 11:56:21AM +0200, Richard Biener wrote: > > > On Fri, Sep 3, 2021 at 10:01 AM Stefan Schulze Frielinghaus > > > wrote: > > > > >

Re: [PATCH, rs6000] Disable gimple fold for float or double vec_minmax when fast-math is not set

2021-10-11 Thread Segher Boessenkool
Hi! On Thu, Aug 26, 2021 at 09:19:30AM +0800, HAO CHEN GUI wrote: > gcc/ > ?? * config/rs6000/rs6000-call.c (rs6000_gimple_fold_builtin): > ?? Modify the VSX_BUILTIN_XVMINDP, ALTIVEC_BUILTIN_VMINFP, > ?? VSX_BUILTIN_XVMAXDP, ALTIVEC_BUILTIN_VMAXFP expansions. Something mangles your

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

2021-10-11 Thread Segher Boessenkool
Hi! On Mon, Oct 11, 2021 at 10:47:00AM +0800, Kewen.Lin wrote: > As PR102658 shows, commit r12-4240 enables vectorization at O2, > some cases need to be adjusted accordingly for rs6000 port. > > - For target specific test cases, this adds -fno-tree-vectorize > to retain original test points,

Re: [PATCH] attribs: Allow optional second arg for attr deprecated [PR102049]

2021-10-11 Thread Marek Polacek via Gcc-patches
Any thoughts? On Thu, Sep 23, 2021 at 12:16:36PM -0400, Marek Polacek via Gcc-patches wrote: > Clang implements something we don't have: > > __attribute__((deprecated("message", "replacement"))); > > which seems pretty neat so I wrote this patch to add it to gcc. > > It doesn't allow the

Re: [PATCH v4] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-10-11 Thread Marek Polacek via Gcc-patches
Ping. On Tue, Sep 28, 2021 at 04:20:46PM -0400, Marek Polacek wrote: > On Thu, Sep 23, 2021 at 02:25:16PM -0400, Jason Merrill wrote: > > On 9/20/21 18:59, Marek Polacek via Gcc-patches wrote: > > > +void > > > +handle_ignored_attributes_option (vec *v) > > > +{ > > > + if (v == nullptr) > > > +

Re: [SVE] [gimple-isel] PR93183 - SVE does not use neg as conditional

2021-10-11 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > On Fri, 8 Oct 2021 at 21:19, Richard Sandiford > wrote: >> >> Thanks for looking at this. >> >> Prathamesh Kulkarni writes: >> > Hi, >> > As mentioned in PR, for the following test-case: >> > >> > typedef unsigned char uint8_t; >> > >> > static inline uint8_t >> >

Re: [PATCH 12/13] arm: Convert more load/store MVE builtins to predicate qualifiers

2021-10-11 Thread Richard Sandiford via Gcc-patches
Richard Sandiford via Gcc-patches writes: > Christophe Lyon via Gcc-patches writes: >> This patch covers a few builtins where we do not use the >> iterator and thus we cannot use . >> >> However this introduces a problem for the v2di instructions, because >> there is not predicate for this

Re: [PATCH 07/11] OpenMP: Fix non-zero attach/detach bias for struct dereferences

2021-10-11 Thread Julian Brown
On Fri, 1 Oct 2021 10:09:05 -0700 Julian Brown wrote: > libgomp/ > * testsuite/libgomp.c++/baseptrs-3.C: Add test (XFAILed for > now). This XFAILed test is addressed in the followup patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-October/581342.html Cheers, Julian

[PATCH] libgomp: alloc* test fixes [PR102628, PR102668]

2021-10-11 Thread Jakub Jelinek via Gcc-patches
Hi! As reported, the alloc-9.c test and alloc-{1,2,3}.F* and alloc-11.f90 tests fail on powerpc64-linux with -m32. The reason why it fails just there is that malloc doesn't guarantee there 128-bit alignment (historically glibc guaranteed 2 * sizeof (void *) alignment from malloc). There are two

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

2021-10-11 Thread Paul Keir via Gcc-patches
*ping* From: Paul Keir Sent: 03 September 2021 11:31 To: gcc-patches@gcc.gnu.org Cc: libstd...@gcc.gnu.org Subject: Re: [PATCH] libstdc++: Fix compare_three_way for constexpr and Clang *ping* From: Paul Keir

[PATCH] middle-end/102683 - fix .DEFERRED_INIT expansion

2021-10-11 Thread Richard Biener via Gcc-patches
This avoids using an integer type for which we don't have an approprate mode when expanding .DEFERRED_INIT to a non-memory entity. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Will push after it finished. Richard. 2021-10-11 Richard Biener PR middle-end/102683

Re: [PATCH 13/13] arm: Convert more MVE/CDE builtins to predicate qualifiers

2021-10-11 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > This patch covers a few non-load/store builtins where we do not use > the iterator and thus we cannot use . > > We need to update the expected code in cde-mve-full-assembly.c because > we now use mve_movv16qi instead of movhi to generate the vmsr >

Re: [PATCH 12/13] arm: Convert more load/store MVE builtins to predicate qualifiers

2021-10-11 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > This patch covers a few builtins where we do not use the > iterator and thus we cannot use . > > However this introduces a problem for the v2di instructions, because > there is not predicate for this case. For instance, changing > STRSBS_P_QUALIFIERS

[PATCH] middle-end/101480 - overloaded global new/delete

2021-10-11 Thread Richard Biener via Gcc-patches
The following fixes the issue of ignoring side-effects on memory from overloaded global new/delete operators by not marking them as effectively 'const' apart from other explicitely specified side-effects. This will cause FAIL: g++.dg/warn/Warray-bounds-16.C -std=gnu++1? (test for excess errors)

Re: [PATCH 10/13] arm: Convert remaining MVE vcmp builtins to predicate qualifiers

2021-10-11 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > This is mostly a mechanical change, only tested by the intrinsics > expansion tests. > > 2021-09-02 Christophe Lyon > > gcc/ > PR target/100757 > PR target/101325 > * config/arm/arm-builtins.c (BINOP_UNONE_NONE_NONE_QUALIFIERS):

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

2021-10-11 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > From: Christophe Lyon > > The problem in this PR is that we call VPSEL with a mask of vector > type instead of HImode. This happens because operand 3 in vcond_mask > is the pre-computed vector comparison and has vector type. > > This patch fixes it by

Re: [PATCH] gcov: make profile merging smarter

2021-10-11 Thread Martin Liška
On 10/11/21 15:49, Martin Liška wrote: Let me update the documentation bits. There's the updated patch. May I install the patch now? Thanks, MartinFrom fdeb81a960faa19f75316e279a79c231da212f99 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 9 Sep 2021 13:02:24 +0200 Subject: [PATCH]

Re: [PATCH 08/13] arm: Implement auto-vectorized MVE comparisons with vectors of boolean predicates

2021-10-11 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > We make use of qualifier_predicate to describe MVE builtins > prototypes, restricting to auto-vectorizable vcmp* and vpsel builtins, > as they are exercised by the tests added earlier in the series. > > Special handling is needed for mve_vpselq because it

Re: [Patch 4/7, Arm. GCC] Implement target feature macros for PACBTI.

2021-10-11 Thread Richard Earnshaw via Gcc-patches
On 08/10/2021 13:18, Tejas Belagod via Gcc-patches wrote: Hi, This patch implements target feature macros when PACBTI is enabled through the -march option or -mbranch-protection. Tested on arm-none-eabi. OK for trunk? 2021-10-04 Tejas Belagod gcc/ChangeLog: * config/arm/arm-c.c

Re: [PATCH 07/13] arm: Implement MVE predicates as vectors of booleans

2021-10-11 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > This patch implements support for vectors of booleans to support MVE > predicates, instead of HImode. Since the ABI mandates pred16_t (aka > uint16_t) to represent predicates in intrinsics prototypes, we > introduce a new "predicate" type qualifier so

Re: [PATCH] gcov: make profile merging smarter

2021-10-11 Thread Martin Liška
On 10/5/21 12:04, Richard Biener wrote: On Mon, Oct 4, 2021 at 1:32 PM Martin Liška wrote: On 10/4/21 13:16, Richard Biener wrote: I meant in merge_one_data do not check ->stamp or ->checksum but instead rely on the counter merging code to detect mismatches (there's read_mismatch and

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

2021-10-11 Thread Paul A. Clarke via Gcc-patches
On Fri, Oct 08, 2021 at 05:31:11PM -0500, Segher Boessenkool wrote: > On Fri, Oct 08, 2021 at 02:27:28PM -0500, Paul A. Clarke wrote: > > On Fri, Oct 08, 2021 at 12:39:15PM -0500, Segher Boessenkool wrote: > > I see. Thanks for the reference. If I understand correctly, volatile > > prevents some

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-11 Thread Richard Biener via Gcc-patches
On Mon, Oct 11, 2021 at 3:21 PM Martin Liška wrote: > > On 10/11/21 15:05, Richard Biener wrote: > >> + if (!opts_set->x_flag_var_tracking) > >> +opts->x_flag_var_tracking = optimize >= 1; > > That's still not equivalent to the old code for -fvar-tracking-uninit which > > sets

Re: [PATCH 06/13] arm: Fix mve_vmvnq_n_ argument mode

2021-10-11 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > The vmvnq_n* intrinsics and have [u]int[16|32]_t arguments, so use > iterator instead of HI in mve_vmvnq_n_. > > 2021-09-03 Christophe Lyon > > gcc/ > * config/arm/mve.md (mve_vmvnq_n_): Use V_elem mode > for operand 1. > > diff

[PATCH 2/2] OpenACC: Make deep-copy-arrayofstruct.c a libgomp/runtime test

2021-10-11 Thread Julian Brown
I noticed that the test in question now compiles properly, and in fact runs properly too. Thus it's more useful as a runtime test than a passing compilation test that otherwise doesn't do much. This patch moves it to libgomp. Tested with offloading to NVPTX and bootstrapped. (I can probably

[PATCH 1/2] OpenMP: Handle reference-typed struct members

2021-10-11 Thread Julian Brown
This patch fixes the baseptrs-3.C test case introduced in the patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-October/580729.html The problematic case concerns OpenMP mapping clauses containing struct members of reference type, e.g. "mystruct.myref.myptr[:N]". To be able to access the

[Ada] Fix problematic import of type-generic GCC atomic builtin

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
This implements the support for most type-generic GCC atomic builtins. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/gigi.h (resolve_atomic_size): Declare. (list_third): New inline function. * gcc-interface/decl.c (type_for_atomic_builtin_p):

[Ada] Tweak the warning about missing local raises

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
This prevents the warning from being given when there may still be regular exception handlers in the code, although some of them have been turned into local raises, by querying the predicate that determines whether such regular handlers are removed or not in the front-end. Tested on

[Ada] Fix for atomic wrongly rejected on object of discriminated type

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
The reason is that the automatic alignment promotion is not yet performed in the case where the nominal subtype is of variable size. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/decl.c (promote_object_alignment): Add GNU_SIZE parameter and use it

[Ada] Remove redundant guard in expansion of dispatching calls

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Routines Make_Predefined_Primitive_Specs and Predefined_Primitive_Bodies, which create predefined primitives for derived tagged types, are only called when restriction No_Dispatching_Calls is inactive. There is no need to recheck this restriction when creating individual primitive operations

[Ada] Runtime transition: System.Threads

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Rewrite the former System.Threads implementation for AE653 to work on the new Light runtime for VxWworks7r2Cert. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-thread.ads: Fix comments. Remove unused package imports. (Thread_Body_Exception_Exit):

[Ada] Valid postconditions incorrectly rejected.

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
For users, 'Old attribute references are only allowed within postcondition expressions. Internally, the FE may build trees that transiently (before some subsequent transformation) violate these rules; this is ok, but these violations were being incorrectly flagged in some cases. Fix this problem.

[Ada] Warn about conversion with any predefined time types

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
We already had a warning for unchecked conversions that involve the private type Ada.Calendar.Time, whose representation might differ between releases and targets of the compiler. Now this warning is extended to Ada.Real_Time.Time and Ada.Real_Time.Time_Span, which is similarly non-portable.

[Ada] Incorrect Dynamic_Predicate results for static arguments

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
In determining at run time whether a statically-known discrete value satisifies the predicate of a subtype where both - a Dynamic_Predicate aspect specification applies (directly or indirectly) to a subtype; and - at least one other predicate aspect specification (that is, either

[Ada] RTEMS: use regular RTEMS API for minimum stack size calculation

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Use _POSIX_Threads_Minimum_stack_size instead of ada_pthread_minimum_stack_size so the runtime does not require the RTEMS kernel to be configured to have Ada support. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-parame__rtems.adb: use

[Ada] Simplify membership tests with N_Generic_Declaration

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Use collective N_Generic_Declaration subtype instead of its members N_Generic_Subprogram_Declaration and N_Generic_Package_Declaration where reasonable. Code cleanup related to handling of Global contracts in generic units; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on

[Ada] Remove constant arguments

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
All these arguments were identified programmatically as being always used with the same value (often the default one). As such, they can be omitted. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * ali.adb (Get_Name): Ignore_Spaces is always False. * bindo-graphs.adb

[PATCH] middle-end/102682 - avoid invalid subreg on the LHS

2021-10-11 Thread Richard Biener via Gcc-patches
The following avoids generating (insn 6 5 7 2 (set (subreg:OI (concatn/v:TI [ (reg:DI 92 [ buffer ]) (reg:DI 93 [ buffer+8 ]) ]) 0) (subreg:OI (reg/v:V8SI 85 [ __x ]) 0)) "t.ii":76:21 74 {*movoi_internal_avx} (nil)) via

[Ada] Find an interpretation for membership test with a singleton value

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
When resolving type Color is (Blue, Orange); function Get_Color return Color is begin return Blue; end Get_Color; function Get_Color return String is begin return "Blue"; end Get_Color; Test : Boolean := Get_Color in Blue; we did not try all the possible interpretations

[Ada] Fix internal error on fixed-point divide, multiply and scaling

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
This fixes a couple of long-standing oversights in the fixed-point multiply implementation that were recently copied into the divide implementation and thus made more visible: when computing the operand size for compile-time known values, the negative case must be taken into account and

[Ada] RTEMS: use hardware interrupts instead of signals for interrupt handling

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
RTEMS supports attaching interrupt handlers to hardware interrupt vectors, which is superior to the current approach of attaching handlers to signals. Direct attachment of handlers removes the execution overhead of converting hardware interrupts to signals and their subsequent propagation to the

[Ada] Import binder globals as constant

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
The various __gl_XYZ binder globals prevent some link-time optimizations when imported as mutable. Work around this by turning them into constants. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnarl/s-intman__android.adb, libgnarl/s-intman__lynxos.adb,

[Ada] Reorder subprogram spec and bodies in alphabetical order

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Required by the style guide and by future changes in this function. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch4.adb (Analyze_Membership_Op): Reorder subprogram spec and bodies in alphabetical order.diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb

[Ada] Rewrite extended names in derived class-wide expressions

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
When building a derived class-wide pre- or postcondition we are mapping references to inherited formals and subprogram. Originally we only did it for simple names; recently we fixed this mapping to also work for operator symbols; with this patch we also do this for extended names. Tested on

[Ada] Simplify detection of delayed aggregates

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Replace IF with a single RETURN statement. Cleanup related to expansion of aggregates in GNATprove mode; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_aggr.adb (Is_Delayed_Aggregate): Simplify.diff --git a/gcc/ada/exp_aggr.adb

[Ada] Simplify detection of record components with default initialization

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
When detecting record components with default initialization we did two iteration over the component list; now we do only one. Also, there was no need to explicitly guard against an empty list where the subsequent iteration with First/Next/Present works fine. Cleanup related to expansion of

[Ada] Move rewriting of boxes in aggregates from resolution to expansion

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Rewriting of boxes in record aggregates into the corresponding default values was done in resolution, where we special-cased access types and scalar types with a Default_Value aspect. However, this rewriting rather belong to expansion. Also, the special-casing didn't take Normalize_Scalars nor

[Ada] Remove redundant guard against an empty component list

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
There is no need to explicitly guard against an empty list where the subsequent iteration with First/Next/Present works fine. Cleanup related to expansion of aggregates in GNATprove mode; behaviour is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_aggr.adb

[Ada] Simplify initialization of concurrent components

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Concurrent record types are either task record types or protected record types. Now we detect them collectively (when looking for any of them) or exclusively (when looking for one or the other). Cleanup code related to fixes in expansion of boxes in record aggregates. Behaviour is unaffected.

[Ada] RTEMS: use default stack checking emulation package

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Remove the RTEMS specific version of System.Stack_Checking.Operations as the internal RTEMS API it uses can only detect stack overflow after the event, whereas the stack checking emulation is meant to detect the stack overflow before it occurs. Use the standard System.Stack_Checking.Operations

[Ada] Do not clear Analyzed flag in expand if already set by preanalysis

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
During Expand, prevent the clearing of the Analyzed flag if it has already been set by Fold_Ureal. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * expander.adb (Expand): Skip clearing of Analyzed flag if already set for N_Real_Literal.diff --git

[Ada] Fix crash on array component with Default_Value

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
When complaining about a compile-time constraint error within a default initialization procedure we assumed that this procedure initializes a record object. However, it can initialize an array object too. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_util.adb

[Ada] Simplify code for checks within an initialization procedure

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
It is simpler to access the type of first formal using semantic instead of syntactic query. Behaviour is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Compile_Time_Constraint_Error): Simplify getting the type of the first formal

[Ada] Size of time_t in newer verions of VxWorks7

2021-10-11 Thread Pierre-Marie de Rodat via Gcc-patches
Set the default size of time_t_bits to match the standard runtimes. The size must match that which is used in the VSB, since the same VSB is used to build all of the runtimes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-parame__ae653.ads (time_t_bits): Change

Re: [Patch 3/7, Arm, GCC] Add testsuite library support for PACBTI target.

2021-10-11 Thread Richard Earnshaw via Gcc-patches
On 11/10/2021 14:36, Richard Earnshaw via Gcc-patches wrote: On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote: Hi, Add targeting-checking entities for PACBTI in testsuite framework. Tested on arm-none-eabi. OK for trunk? 2021-10-04  Tejas Belagod  gcc/ChangeLog: *

Re: [Patch 3/7, Arm, GCC] Add testsuite library support for PACBTI target.

2021-10-11 Thread Richard Earnshaw via Gcc-patches
On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote: Hi, Add targeting-checking entities for PACBTI in testsuite framework. Tested on arm-none-eabi. OK for trunk? 2021-10-04 Tejas Belagod gcc/ChangeLog: * testsuite/lib/target-supports.exp

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-11 Thread Martin Liška
On 10/11/21 15:05, Richard Biener wrote: + if (!opts_set->x_flag_var_tracking) +opts->x_flag_var_tracking = optimize >= 1; That's still not equivalent to the old code for -fvar-tracking-uninit which sets opts->x_flag_var_tracking to 1 and the old code checked that for AUTOINIT_VALUE but

  1   2   >