[PATCH] Rewrite NAN and sign handling in frange

2022-09-14 Thread Aldy Hernandez via Gcc-patches
Hi Richard. Hi all. The attatched patch rewrites the NAN and sign handling, dropping both tristates in favor of a pair of boolean flags for NANs, and nothing at all for signs. The signs are tracked in the range itself, so now it's possible to describe things like [-0.0, +0.0] +NAN, [+0, +0],

Re: [PATCH] i386: Fixed vec_init_dup_v16bf [PR106887]

2022-09-14 Thread Hongtao Liu via Gcc-patches
On Thu, Sep 15, 2022 at 11:36 AM Kong, Lingling via Gcc-patches wrote: > > Hi > > The patch is to fix vec_init_dup_v16bf, add correct handle for v16bf mode in > ix86_expand_vector_init_duplicate. > Add testcase with sse2 without avx2. > > OK for master? > > gcc/ChangeLog: > > PR

Re: [PATCH] LoongArch: Prepare static PIE support

2022-09-14 Thread Lulu Cheng
LGTM! Thanks. 在 2022/9/13 下午11:32, Xi Ruoyao 写道: Static PIE allows us to extend the ASLR to cover static executables and it's not too difficult to support it. On GCC side, we just pass a group of options to the linker, like other ports with static PIE support. The real implementation of

[PATCH] i386: Fixed vec_init_dup_v16bf [PR106887]

2022-09-14 Thread Kong, Lingling via Gcc-patches
Hi The patch is to fix vec_init_dup_v16bf, add correct handle for v16bf mode in ix86_expand_vector_init_duplicate. Add testcase with sse2 without avx2. OK for master? gcc/ChangeLog: PR target/106887 * config/i386/i386-expand.cc (ix86_expand_vector_init_duplicate):

float.h: Do not define INFINITY for C2x when infinities not supported

2022-09-14 Thread Joseph Myers
C2x has changed the rules for defining INFINITY in so it is no longer defined when float does not support infinities, instead of being defined to an expression that overflows at translation time. Thus, make the definition conditional on __FLT_HAS_INFINITY__ (this is already inside a

Re: [committed] libstdc++: Add TSan annotations to std::atomic>

2022-09-14 Thread Jonathan Wakely via Gcc-patches
On Wed, 14 Sept 2022 at 23:25, Jonathan Wakely wrote: > > On Wed, 14 Sept 2022 at 23:05, Jonathan Wakely via Libstdc++ > wrote: > > > > Tested powerpc64le-linux, pushed to trunk. > > > > -- >8 -- > > > > This adds annotations to std::atomic> to enable TSan to > > understand the custom locking.

Re: [committed] libstdc++: Add TSan annotations to std::atomic>

2022-09-14 Thread Jonathan Wakely via Gcc-patches
On Wed, 14 Sept 2022 at 23:05, Jonathan Wakely via Libstdc++ wrote: > > Tested powerpc64le-linux, pushed to trunk. > > -- >8 -- > > This adds annotations to std::atomic> to enable TSan to > understand the custom locking. Without this, TSan reports data races for > accesses to the _M_ptr member,

[committed] libstdc++: Add TSan annotations to std::atomic>

2022-09-14 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- This adds annotations to std::atomic> to enable TSan to understand the custom locking. Without this, TSan reports data races for accesses to the _M_ptr member, even though those are correctly synchronized using atomic operations on the tagged

[committed] libstdc++: Add missing header to

2022-09-14 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- This is needed for std::nothrow and the nothrow operator new overload, so should be included explicitly. libstdc++-v3/ChangeLog: * include/bits/stl_tempbuf.h: Include . --- libstdc++-v3/include/bits/stl_tempbuf.h | 1 + 1 file

Re: OpenMP: Generate SIMD clones for functions with "declare target"

2022-09-14 Thread Thomas Schwinge
Hi Sandra! Commenting on just one single item: On 2022-09-14T11:32:11-0600, Sandra Loosemore wrote: > --- a/gcc/omp-simd-clone.cc > +++ b/gcc/omp-simd-clone.cc > void > expand_simd_clones (struct cgraph_node *node) > { > - tree attr = lookup_attribute ("omp declare simd", > -

Re: [PATCH] Optimize (X<

2022-09-14 Thread Marc Glisse via Gcc-patches
On Tue, 13 Sep 2022, Roger Sayle wrote: This patch tweaks the match.pd transformation previously added to fold (X< In https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html , I read: "Bitwise operators act on the representation of the value including both the sign and value bits,

[committed] libstdc++: Add assertion to std::promise::set_exception (LWG 2276)

2022-09-14 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- Without this assertion, the shared state is made ready, but contains neither a value nor an exception. Add an assertion to prevent users from accessing a value that was never initialized in the shared state. libstdc++-v3/ChangeLog: *

[committed] libstdc++: Add comment to 17_intro/names.cc test

2022-09-14 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * testsuite/17_intro/names.cc: Explain why poison pragma can't be used. --- libstdc++-v3/testsuite/17_intro/names.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git

[committed] libstdc++: Document LWG 1203 API change in manual

2022-09-14 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * doc/xml/manual/intro.xml: Document LWG 1203. * doc/html/*: Regenerate. --- libstdc++-v3/doc/html/manual/bugs.html | 3 +++ libstdc++-v3/doc/html/manual/debug_mode_using.html | 7 ++-

Re: OpenMP: Generate SIMD clones for functions with "declare target"

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Wed, Sep 14, 2022 at 11:32:11AM -0600, Sandra Loosemore wrote: > This patch is part of the ongoing effort to find more SIMD optimization > opportunities in OpenMP code. Here we are looking for functions that have > the "omp declare target" attribute that are also suitable candidates for >

[PATCH] mips: Add appropriate linker flags when compiling with -static-pie

2022-09-14 Thread linted via Gcc-patches
Hello, This patch fixes missing flags when compiling with -static-pie on mips. I made these modifications based on the previously submitted static pie patch for arm as well as the working code for aarch64. I tested with a host of mips-elf and checked with mips-sim. This patch was also tested and

Re: [PATCH] OpenMP: Enable vectorization in all OpenMP loops

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Wed, Sep 14, 2022 at 11:31:34AM -0600, Sandra Loosemore wrote: > GCC presently enables the loop vectorizer at lower optimization levels for > OpenMP loops with the "simd" specifier than it does for loops without it. > The "simd" specifier isn't defined to be purely an optimization hint to the >

OpenMP: Generate SIMD clones for functions with "declare target"

2022-09-14 Thread Sandra Loosemore
This patch is part of the ongoing effort to find more SIMD optimization opportunities in OpenMP code. Here we are looking for functions that have the "omp declare target" attribute that are also suitable candidates for automatic SIMD cloning. I've made the filter quite conservative, but

[PATCH] OpenMP: Enable vectorization in all OpenMP loops

2022-09-14 Thread Sandra Loosemore
GCC presently enables the loop vectorizer at lower optimization levels for OpenMP loops with the "simd" specifier than it does for loops without it. The "simd" specifier isn't defined to be purely an optimization hint to the compiler; it also has semantic effects like changing the

[PATCH][_GLIBCXX_INLINE_VERSION] Fix test dg-prune-output

2022-09-14 Thread François Dumont via Gcc-patches
    libstdc++: [_GLIBCXX_INLINE_VERSION] Fix test dg-prune-output     libstdc++-v3/ChangeLog:     * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: Adapt dg-prune-output to     _GLIBCXX_INLINE_VERSION mode. With this patch all tests are Ok in

[PATCH][_GLIBCXX_INLINE_VERSION] Cleanup gnu-versioned-namespace.ver

2022-09-14 Thread François Dumont via Gcc-patches
    libstdc++: [_GLIBCXX_INLINE_VERSION] Cleanup gnu-versioned-namespace.ver     Remove expressions for symbols in std::__detail::__8 namespace, they are obsolete since     version namespace applies only at std:: level, not at sub-levels.     libstdc++-v3/ChangeLog:     *

Re: [PATCH v3 11/11] FYI/unfinished: OpenMP 5.0 "declare mapper" support for C++

2022-09-14 Thread Julian Brown
On Wed, 14 Sep 2022 16:58:28 +0200 Jakub Jelinek wrote: > On Tue, Sep 13, 2022 at 02:04:30PM -0700, Julian Brown wrote: > > This patch implements OpenMP 5.0 "declare mapper" support for C++. > > This hasn't been fully revised yet following previous review > > comments, but I am including it in

Re: [PATCH Rust front-end v2 34/37] gccrs: add lang.opt

2022-09-14 Thread Thomas Schwinge
Hi! On 2022-09-14T15:39:47+0200, Richard Biener via Gcc-patches wrote: > On Wed, Aug 24, 2022 at 2:13 PM wrote: >> >> From: Philip Herron >> >> We have some rust specific langugage options note -fwrapv is enabled by >> default in the code. We are trying to respect options such as >>

[COMMITTED] Minor fixes to frange.

2022-09-14 Thread Aldy Hernandez via Gcc-patches
Following are a series of cleanups to the frange code in preparation for a much more invasive patch rewriting the NAN and sign tracking bits. Please be patient, as I'm trying to break everything up into small chunks instead of dropping a mondo patch removing the NAN and sign tristate handling.

[COMMITTED] Provide cleaner set_nan(), clear_nan(), and update_nan() methods.

2022-09-14 Thread Aldy Hernandez via Gcc-patches
set_* has a very specific meaning for irange's and friends. Methods prefixed with set_* are setters clobbering the existing range. As such, the current set_nan() method is confusing in that it's not actually setting a range to a NAN, but twiddling the NAN flags for an existing frange. This

[COMMITTED] Pass full range to build_* in range-op-float.cc

2022-09-14 Thread Aldy Hernandez via Gcc-patches
The build_ helper functions in range-op-float.cc take the actual value from the operand's endpoint, but this value could be deduced from the operand itself therefore cleaning up the call site. This also reduces the potential of mistakenly passing the wrong bound. No functional changes.

[COMMITTED] frange: add both zeros to ranges when there's the possiblity of equality.

2022-09-14 Thread Aldy Hernandez via Gcc-patches
Every time there's equality at play, we must be careful that any equality with zero matches both -0.0 and +0.0 when honoring signed zeros. We were doing this correctly for the == and != op1_range operators (albeit inefficiently), but aren't doing it at all when building >= and <=. This fixes the

[COMMITTED] Use frange::set_nan() from the generic frange::set().

2022-09-14 Thread Aldy Hernandez via Gcc-patches
This patch cleans up the frange::set() code by passing all things NAN to frange::set_nan(). No functional changes. Regstrapped on x86-64 Linux, plus I ran selftests for -ffinite-math-only. gcc/ChangeLog: * value-range.cc (frange::set): Use set_nan. * value-range.h

Re: [PATCH v3 11/11] FYI/unfinished: OpenMP 5.0 "declare mapper" support for C++

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 13, 2022 at 02:04:30PM -0700, Julian Brown wrote: > This patch implements OpenMP 5.0 "declare mapper" support for C++. > This hasn't been fully revised yet following previous review comments, > but I am including it in this series to demonstrate the new approach to > gimplifying map

[PATCH 10/15 V2] arm: Implement cortex-M return signing address codegen

2022-09-14 Thread Andrea Corallo via Gcc-patches
Hi all, this patch enables address return signature and verification based on Armv8.1-M Pointer Authentication [1]. To sign the return address, we use the PAC R12, LR, SP instruction upon function entry. This is signing LR using SP and storing the result in R12. R12 will be pushed into the

[PATCH] libstdc++: Implement ranges::chunk_by_view from P2443R1

2022-09-14 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk? libstdc++-v3/ChangeLog: * include/bits/ranges_algo.h (__adjacent_find_fn, adjacent_find): Move to ... * include/bits/ranges_util.h: ... here. * include/std/ranges (chunk_by_view): Define.

[PATCH] Move void_list_node init to common code

2022-09-14 Thread Richard Biener via Gcc-patches
All frontends replicate this, so move it. Bootstrap and regtest running for all languages on x86_64-unknown-linux-gnu. OK if that succeeds? Thanks, Richard. gcc/ * tree.cc (build_common_tree_nodes): Initialize void_list_node here. gcc/ada/ * gcc-interface/trans.cc

Re: [PATCH Rust front-end v2 07/37] gccrs: Add gcc-check-target check-rust

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Wed, Sep 14, 2022 at 03:41:48PM +0200, Richard Biener via Gcc-patches wrote: > On Wed, Aug 24, 2022 at 2:08 PM wrote: > > > > From: Philip Herron > > > > This allows us to invoke the rust testsuite. > > OK. > > > > > ChangeLog: > > * Makefile.def: Add autogen target > > *

Re: [PATCH v3 08/11] OpenMP/OpenACC: Rework clause expansion and nested struct handling

2022-09-14 Thread Julian Brown
On Wed, 14 Sep 2022 15:24:12 +0200 Jakub Jelinek via Fortran wrote: > On Tue, Sep 13, 2022 at 02:03:18PM -0700, Julian Brown wrote: > > +class c_omp_address_inspector > > +{ > > + location_t loc; > > + tree root_term; > > + bool indirections; > > + int map_supported; > > + > > +protected: >

Re: [PATCH Rust front-end v2 07/37] gccrs: Add gcc-check-target check-rust

2022-09-14 Thread Richard Biener via Gcc-patches
On Wed, Aug 24, 2022 at 2:08 PM wrote: > > From: Philip Herron > > This allows us to invoke the rust testsuite. OK. > > ChangeLog: > * Makefile.def: Add autogen target > * Makefile.in: regenerate via autogen > --- > Makefile.def | 1 + > Makefile.in | 8 > 2 files

Re: [PATCH Rust front-end v2 33/37] gccrs: add lang-spec.h

2022-09-14 Thread Richard Biener via Gcc-patches
On Wed, Aug 24, 2022 at 2:20 PM wrote: > > From: Philip Herron > > This specifies the extensions of the Rust language. LGTM > --- > gcc/rust/lang-specs.h | 26 ++ > 1 file changed, 26 insertions(+) > create mode 100644 gcc/rust/lang-specs.h > > diff --git

Re: [PATCH Rust front-end v2 32/37] gccrs: Add config-lang.in

2022-09-14 Thread Richard Biener via Gcc-patches
On Wed, Aug 24, 2022 at 2:19 PM wrote: > > From: Philip Herron > > This was a copy paste from gccgo front-end, we do not use any of the > target_libs yet but we will need these when we support the libpanic crate. LGTM > --- > gcc/rust/config-lang.in | 34 ++ >

Re: [PATCH Rust front-end v2 34/37] gccrs: add lang.opt

2022-09-14 Thread Richard Biener via Gcc-patches
On Wed, Aug 24, 2022 at 2:13 PM wrote: > > From: Philip Herron > > We have some rust specific langugage options note -fwrapv is enabled by > default in the code. We are trying to respect options such as > -Wunused-result which we get by porting over c++ no-discard for rust's > must-use

Re: [PATCH Rust front-end v2 09/37] gccrs: Add Lexer for Rust front-end

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Wed, Sep 14, 2022 at 03:30:39PM +0200, Richard Biener via Gcc-patches wrote: > > +// GCC is distributed in the hope that it will be useful, but WITHOUT ANY > > +// WARRANTY; without even the implied warranty of MERCHANTABILITY or > > +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General

Re: [PATCH Rust front-end v2 31/37] gccrs: Add GCC Rust front-end Make-lang.in

2022-09-14 Thread Richard Biener via Gcc-patches
On Wed, Aug 24, 2022 at 2:22 PM wrote: > > From: Philip Herron > > This is the Makefile for our front-end. > --- > gcc/rust/Make-lang.in | 400 ++ > 1 file changed, 400 insertions(+) > create mode 100644 gcc/rust/Make-lang.in > > diff --git

Re: [PATCH Rust front-end v2 09/37] gccrs: Add Lexer for Rust front-end

2022-09-14 Thread Richard Biener via Gcc-patches
On Wed, Aug 24, 2022 at 2:04 PM wrote: > > From: The Other > > The lexer is refered to as a ManagedTokenSource within the parser, this > lexer does not currently support unicode but serves as a starting point > to do so. > > Co-authored-by: Philip Herron > Co-authored-by: Arthur Cohen >

Re: [PATCH v3 08/11] OpenMP/OpenACC: Rework clause expansion and nested struct handling

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 13, 2022 at 02:03:18PM -0700, Julian Brown wrote: > This patch is an extension and rewrite/rethink of the following two patches: > > "OpenMP/OpenACC: Add inspector class to unify mapped address analysis" > https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591977.html > >

Re: [PATCH v3 07/11] OpenMP/OpenACC: Reindent TO/FROM/_CACHE_ stanza in {c_}finish_omp_clause

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 13, 2022 at 02:03:17PM -0700, Julian Brown wrote: > This patch trivially adds braces and reindents the > OMP_CLAUSE_TO/OMP_CLAUSE_FROM/OMP_CLAUSE__CACHE_ stanza in > c_finish_omp_clause and finish_omp_clause, in preparation for the > following patch (to clarify the diff a little). > >

Re: [COMMITTED] Fix unused variable warning (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality)

2022-09-14 Thread Martin Liška
On 9/14/22 14:19, Jan-Benedict Glaw wrote: > On Thu, 2022-09-01 12:05:23 +0200, Martin Liška wrote: >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >> >> I've also built all cross compilers. >> >> Ready to be installed? >> Thanks, >> Martin >> >> gcc/ChangeLog: >> >>

Re: [PATCH v3 06/11] OpenMP: Pointers and member mappings

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 13, 2022 at 02:03:16PM -0700, Julian Brown wrote: > @@ -3440,6 +3437,50 @@ gfc_trans_omp_clauses (stmtblock_t *block, > gfc_omp_clauses *clauses, > { > if (pointer || (openacc && allocatable)) > { > +

[PATCH] tree-optimization/106938 - cleanup abnormal edges after inlining

2022-09-14 Thread Richard Biener via Gcc-patches
After inlining and IPA transforms we run fixup_cfg to fixup CFG effects in other functions. But that fails to clean abnormal edges from non-pure/const calls which might no longer be necessary when ->calls_setjmp is false. The following ensures this happens and refactors things so we call

[COMMITTED] [PR106936] Remove assert from get_value_range.

2022-09-14 Thread Aldy Hernandez via Gcc-patches
This assert was put here to make sure that the legacy get_value_range() wasn't being called on stuff that legacy couldn't handle (floats, etc), because the result would ultimately be copied into a value_range_equiv. In this case, simplify_casted_cond() is calling it on an offset_type which is

Re: [PATCH v2] libstdc++: Add pretty printer for std::stringstreams

2022-09-14 Thread Jonathan Wakely via Gcc-patches
On Tue, 6 Sept 2022 at 22:25, Philipp Fent wrote: > > To display (o-,i-)stringstreams in the common case, we just print the > underlying stringbuf, without the many ios_base members. In the > unconventional case that the underlying streambuf was redirected, we > report the redirected target. > >

Re: [PATCH v3 05/11] OpenMP: push attaches to end of clause list in "target" regions

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 13, 2022 at 02:03:15PM -0700, Julian Brown wrote: > This patch moves GOMP_MAP_ATTACH{_ZERO_LENGTH_ARRAY_SECTION} nodes to > the end of the clause list, for offload regions. This ensures that when > we do the attach operation, both the "attachment point" and the target > region have

[COMMITTED] Fix unused variable warning (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality)

2022-09-14 Thread Jan-Benedict Glaw
On Thu, 2022-09-01 12:05:23 +0200, Martin Liška wrote: > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > I've also built all cross compilers. > > Ready to be installed? > Thanks, > Martin > > gcc/ChangeLog: > > * Makefile.in: Remove -gstabs option support,

Re: [PATCH] Add libgo dependency on libbacktrace.

2022-09-14 Thread Thomas Schwinge
Hi! On 2022-08-18T07:59:50+0100, Sergei Trofimovich via Gcc-patches wrote: > From: Sergei Trofimovich > > Noticed missing dependency when regenerated Makefile.in for unrelated > change with 'autoget Makefile.def'. ACK. (..., and by now pushed in commit

Re: [PATCH v3 04/11] OpenMP/OpenACC: mapping group list-handling improvements

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 13, 2022 at 02:01:45PM -0700, Julian Brown wrote: > @@ -9443,6 +9499,41 @@ omp_containing_struct (tree expr) >return expr; > } > Missing function comment here. > +static bool > +omp_mapped_by_containing_struct (hash_map + omp_mapping_group

Re: [PATCH v3 03/11] OpenMP/OpenACC struct sibling list gimplification extension and rework

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 13, 2022 at 02:01:44PM -0700, Julian Brown wrote: > static tree > -insert_struct_comp_map (enum tree_code code, tree c, tree struct_node, > - tree prev_node, tree *scp) > +build_struct_comp_nodes (enum tree_code code, tree grp_start, tree grp_end, > +

Re: [PATCH v3 02/11] Remove omp_target_reorder_clauses

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 13, 2022 at 02:01:43PM -0700, Julian Brown wrote: > This patch has been split out from the previous one to avoid a > confusingly-interleaved diff. The two patches will be committed squashed > together. > > 2022-09-13 Julian Brown > > gcc/ > * gimplify.c

Re: [PATCH v3 01/11] OpenMP 5.0: Clause ordering for OpenMP 5.0 (topological sorting by base pointer)

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 13, 2022 at 02:01:42PM -0700, Julian Brown wrote: > --- a/gcc/omp-low.cc > +++ b/gcc/omp-low.cc > @@ -1599,8 +1599,11 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) > { > /* If this is an offloaded region, an attach operation should >only

[PATCH] tree-optimization/106934 - avoid BIT_FIELD_REF of bitfields

2022-09-14 Thread Richard Biener via Gcc-patches
The following avoids creating BIT_FIELD_REF of bitfields in update-address-taken. The patch doesn't implement punning to a full precision integer type but leaves a comment according to that. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/106934

Re: [committed][nvptx] Add uniform_warp_check insn

2022-09-14 Thread Tom de Vries via Gcc-patches
On 9/14/22 11:41, Thomas Schwinge wrote: Hi Tom! On 2022-02-01T19:31:27+0100, Tom de Vries via Gcc-patches wrote: Hi, On a GT 1030, with driver version 470.94 and -mptx=3.1 I run into: ... FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/parallel-dims.c \ -DACC_DEVICE_TYPE_nvidia=1

Re: [committed][nvptx] Add bar.warp.sync

2022-09-14 Thread Tom de Vries via Gcc-patches
On 9/14/22 11:41, Thomas Schwinge wrote: Hi Tom! On 2022-02-01T19:31:13+0100, Tom de Vries via Gcc-patches wrote: On a GT 1030 (sm_61), with driver version 470.94 I run into: ... FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/parallel-dims.c \ -DACC_DEVICE_TYPE_nvidia=1

Re: [committed][nvptx] Add uniform_warp_check insn

2022-09-14 Thread Thomas Schwinge
Hi Tom! On 2022-02-01T19:31:27+0100, Tom de Vries via Gcc-patches wrote: > Hi, > > On a GT 1030, with driver version 470.94 and -mptx=3.1 I run into: > ... > FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/parallel-dims.c \ > -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0

Re: [committed][nvptx] Add bar.warp.sync

2022-09-14 Thread Thomas Schwinge
Hi Tom! On 2022-02-01T19:31:13+0100, Tom de Vries via Gcc-patches wrote: > On a GT 1030 (sm_61), with driver version 470.94 I run into: > ... > FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/parallel-dims.c \ > -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none \ > -O2

Re: [PATCH] Disallow pointer operands for |, ^ and partly & [PR106878]

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Wed, Sep 14, 2022 at 07:58:47AM +, Richard Biener wrote: > > My change to match.pd (that added the two simplifications this patch > > touches) results in more |/^/& assignments with pointer arguments, > > but since r12-1608 we reject pointer operands for BIT_NOT_EXPR. > > > > Disallowing

Re: [PATCH 3/3] vect: inbranch SIMD clones

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Wed, Sep 14, 2022 at 08:09:08AM +, Richard Biener wrote: > Are nested functions a thing for OpenMP? But yes, punt on them > for now. For Fortran certainly because they are part of the language, for C too because they are GNU extension. But declare simd is mostly best effort, so we can at

Re: [PATCH] Optimize (X<

2022-09-14 Thread Richard Biener via Gcc-patches
On Tue, Sep 13, 2022 at 8:37 PM Roger Sayle wrote: > > > This patch tweaks the match.pd transformation previously added to fold > (X< (wrapping) types, to also allow signed integer types provided that they > don't trap and the overflow needn't be preserved for sanitization. > i.e. this should now

Re: [PATCH] PR tree-optimization/71343: Value number X<<2 as X*4.

2022-09-14 Thread Richard Biener via Gcc-patches
On Tue, Sep 13, 2022 at 7:55 PM Roger Sayle wrote: > > > This patch is the second part of a fix for PR tree-optimization/71343, > that implements Richard Biener's suggestion of using tree-ssa's value > numbering instead of match.pd. The change is that when assigning a > value number for the

Re: [PATCH] Enhance final_value_replacement_loop to handle bitop with an invariant induction.[PR105735]

2022-09-14 Thread Richard Biener via Gcc-patches
On Tue, Sep 13, 2022 at 9:54 AM Kong, Lingling wrote: > > Hi Richard, > > Thanks you so much for reviewing this patch. I really appreciate it. For > these review comments, I have made some changes. > > > That's a single-stmt match, you shouldn't use match.pd matching for this. > > Instead just

Re: [PATCH 3/3] vect: inbranch SIMD clones

2022-09-14 Thread Richard Biener via Gcc-patches
On Fri, 9 Sep 2022, Jakub Jelinek wrote: > On Tue, Aug 09, 2022 at 02:23:50PM +0100, Andrew Stubbs wrote: > > > > There has been support for generating "inbranch" SIMD clones for a long > > time, > > but nothing actually uses them (as far as I can see). > > Thanks for working on this. > >

Re: [PATCH] Disallow pointer operands for |, ^ and partly & [PR106878]

2022-09-14 Thread Richard Biener via Gcc-patches
On Wed, 14 Sep 2022, Jakub Jelinek wrote: > Hi! > > My change to match.pd (that added the two simplifications this patch > touches) results in more |/^/& assignments with pointer arguments, > but since r12-1608 we reject pointer operands for BIT_NOT_EXPR. > > Disallowing them for BIT_NOT_EXPR

[PATCH] Disallow pointer operands for |, ^ and partly & [PR106878]

2022-09-14 Thread Jakub Jelinek via Gcc-patches
Hi! My change to match.pd (that added the two simplifications this patch touches) results in more |/^/& assignments with pointer arguments, but since r12-1608 we reject pointer operands for BIT_NOT_EXPR. Disallowing them for BIT_NOT_EXPR and allowing for BIT_{IOR,XOR,AND}_EXPR leads to a

FYI: "declare mapper" patch set for Fortran (June 2022) (was: [PATCH v3 11/11] FYI/unfinished: OpenMP 5.0 "declare mapper" support for C++)

2022-09-14 Thread Tobias Burnus
On 13.09.22 23:04, Julian Brown wrote: This patch implements OpenMP 5.0 "declare mapper" support for C++. And to complete list of patches belonging to this set, Julian had posted the associated Fortran patch set in June: [PATCH 0/6] OpenMP 5.0: Fortran "declare mapper" support

Re: [PATCH] [ICE] Check another epilog variable peeling case in vectorizable_nonlinear_induction.

2022-09-14 Thread Richard Biener via Gcc-patches
On Wed, Sep 14, 2022 at 3:25 AM liuhongt via Gcc-patches wrote: > > In vectorizable_nonlinear_induction, r13-2503-gc13223b790bbc5 prevent > variable peeling by > only checking LOOP_VINFO_MASK_SKIP_NITERS (loop_vinfo). But when > "!vect_use_loop_mask_for_alignment_p (loop_vinfo) && >

Re: [PATCH] RISC-V: Don't try to vectorize tree-ssa/gen-vect-34.c

2022-09-14 Thread jiawei
LGTM, Maybe we can try is after RVV supported.> We don't yet support vectorization on RISC-V. > > gcc/testsuite/ChangeLog> > * gcc.dg/tree-ssa/gen-vect-34.c: Skip RISC-V > > targets.> ---> gcc/testsuite/gcc.dg/tree-ssa/gen-vect-34.c | 2 +-> 1 file > > changed, 1 insertion(+), 1 deletion(-)>