[PATCH 4/4] poison input_location and cfun in one spot

2021-06-29 Thread Trevor Saunders
This simply confirms we can poison them in a small region. boostrapped and regtested on x86_64-linux-gnu, ok? Trev gcc/ChangeLog: * gimple-range.cc (disable_ranger): Prevent access to cfun and input_location. --- gcc/gimple-range.cc | 3 +++ 1 file changed, 3 insertions(+)

[PATCH 2/4] allow poisoning input_location in ranges it should not be used

2021-06-29 Thread Trevor Saunders
This makes it possible to assert if input_location is used during the lifetime of a scope. This will allow us to find places that currently use it within a function and its callees, or prevent adding uses within the lifetime of a function after all existing uses are removed. bootstrapped and

[PATCH 3/4] allow poisoning cfun

2021-06-29 Thread Trevor Saunders
Since cfun is already a macro in most of the compiler, we redefine it to point to a second variable, to avoid having to support C++ objects as GC roots. However we keep the existing function * global for internal use as a gc root. It is unfortunate the two globals need to stay in sync, but there

[PATCH 1/4] add utility to poison globals that should not be used

2021-06-29 Thread Trevor Saunders
This provides a class to wrap globals like input_location or cfun that should not be used directly and will ideally go away. This class tracks if access to the global is currently blocked and asserts if accessed when that is not allowed. It also adds a class to mark access as blocked for the

Re: [PATCH] Port GCC documentation to Sphinx

2021-06-29 Thread Martin Liška
On 6/29/21 12:50 PM, Richard Earnshaw wrote: On 29/06/2021 11:09, Martin Liška wrote: On 6/28/21 5:33 PM, Joseph Myers wrote: Are formatted manuals (HTML, PDF, man, info) corresponding to this patch version also available for review? I've just uploaded them here:

Re: [PATCH v3] fixinc: don't "fix" machine names in __has_include(...) [PR91085]

2021-06-29 Thread Xi Ruoyao via Gcc-patches
On Tue, 2021-06-29 at 08:53 -0700, Bruce Korb wrote: > On 6/28/21 10:26 PM, Xi Ruoyao wrote: > > v3: > >    use memmem/memchr instead of trivial loops > >    split most of the logic into a static function > >    avoid hardcoded magic number > >    adjust test > Looks good to me. :) Thanks for

Ping: [PATCH] rs6000: Remove unspecs for vec_mrghl[bhw]

2021-06-29 Thread Xionghu Luo via Gcc-patches
Gentle ping, thanks. https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572330.html On 2021/6/9 16:03, Xionghu Luo via Gcc-patches wrote: Hi, On 2021/6/9 07:25, Segher Boessenkool wrote: On Mon, May 24, 2021 at 04:02:13AM -0500, Xionghu Luo wrote: vmrghb only accepts permute index {0, 16,

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-06-29 Thread Martin Sebor via Gcc-patches
On 6/29/21 4:58 AM, Richard Biener wrote: On Mon, Jun 28, 2021 at 8:07 PM Martin Sebor wrote: On 6/28/21 2:07 AM, Richard Biener wrote: On Sat, Jun 26, 2021 at 12:36 AM Martin Sebor wrote: On 6/25/21 4:11 PM, Jason Merrill wrote: On 6/25/21 4:51 PM, Martin Sebor wrote: On 6/1/21 3:38

Ping ^ 2: [PATCH] rs6000: Expand fmod and remainder when built with fast-math [PR97142]

2021-06-29 Thread Xionghu Luo via Gcc-patches
Gentle ping ^2, thanks. https://gcc.gnu.org/pipermail/gcc-patches/2021-April/568143.html On 2021/5/14 15:13, Xionghu Luo via Gcc-patches wrote: Test SPEC2017 Ofast P8LE for this patch : 511.povray_r +1.14%, 526.blender_r +1.72%, no obvious changes to others. On 2021/5/6 10:36, Xionghu Luo

Ping: [PATCH] rs6000: Fix wrong code generation for vec_sel [PR94613]

2021-06-29 Thread Xionghu Luo via Gcc-patches
Gentle ping, thanks. https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570333.html On 2021/5/14 14:57, Xionghu Luo via Gcc-patches wrote: Hi, On 2021/5/13 18:49, Segher Boessenkool wrote: Hi! On Fri, Apr 30, 2021 at 01:32:58AM -0500, Xionghu Luo wrote: The vsel instruction is a bit-wise

[PATCH] AIX code CSECT alignment

2021-06-29 Thread David Edelsohn via Gcc-patches
aix: align text CSECTs to at least 32 bytes. Bootstrapped on powerpc-ibm-aix7.2.3.0. Thanks, David gcc/ChangeLog: * config/rs6000/rs6000.c (rs6000_xcoff_section_type_flags): Increase code CSECT alignment to at least 32 bytes. * config/rs6000/xcoff.h

HELP!! How to inhibit optimizations applied to .DEFERRED_INIT argument?

2021-06-29 Thread Qing Zhao via Gcc-patches
Hi, I am testing the 4th patch of -ftrivial-auto-var-init with CPU2017 today, and found the following issues: In the dump file of “*t.i.031t.objsz1”, we have: : __s1_len_217 = .DEFERRED_INIT (__s1_len_176, 2); __s2_len_218 = .DEFERRED_INIT (__s2_len_177, 2); __s2_len_219 = 7; if

Re: [PATCH 2/3 V2] Fix IEEE 128-bit min/max test.

2021-06-29 Thread Segher Boessenkool
On Thu, Jun 17, 2021 at 06:56:09PM -0400, Michael Meissner wrote: > The 'lp64' test > was needed because big endian 32-bit code cannot enable the IEEE 128-bit > floating point instructions. No, *does not* enable them. After diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c

Re: [PATCH 2/4] openacc: Fix async bugs in several OpenACC test cases

2021-06-29 Thread Julian Brown
On Tue, 29 Jun 2021 16:42:02 -0700 Julian Brown wrote: > Several OpenACC tests accidentally abuse async semantics, leading to > race conditions & test failures. This patch fixes those tests. > > Tested with offloading to AMD GCN. I can probably self-approve this as > a testcase change only,

[PATCH 4/4] openacc: Profiling-interface fixes for asynchronous operations

2021-06-29 Thread Julian Brown
This patch fixes some problems with the OpenACC profiling interface when used with asynchronous offload operations. The profiling operations themselves are now launched asynchronously, as previously they measured the wrong thing, and/or executed at the same time as the operation they were supposed

[PATCH 3/4] openacc: Fix asynchronous host-to-device copies in libgomp runtime

2021-06-29 Thread Julian Brown
This patch fixes several places in libgomp/target.c where "ephemeral" data (on the stack or in temporary heap locations) may be used as the source of an asynchronous host-to-device copy that may not complete before the host data disappears. Versions of the patch have been posted several times

[PATCH 2/4] openacc: Fix async bugs in several OpenACC test cases

2021-06-29 Thread Julian Brown
Several OpenACC tests accidentally abuse async semantics, leading to race conditions & test failures. This patch fixes those tests. Tested with offloading to AMD GCN. I can probably self-approve this as a testcase change only, unless anyone objects. Thanks, Julian 2021-06-29 Julian Brown

[PATCH 1/4] openacc: Async fix for lib-94 testcase

2021-06-29 Thread Julian Brown
The test case performs an asynchronous host-to-device copy and then immediately clobbers the data on the host via "memset", leading to a race condition. This patch moves the memset after an acc_wait call instead. Tested with offloading to AMD GCN. I can probably self-approve this as a testcase

[PATCH 0/4] openacc: Async fixes

2021-06-29 Thread Julian Brown
This patch series contains fixes for various problems with async support for OpenACC at present: - Asynchonous host-to-device copies invoked from within libgomp (target.c) could copy bad data to the target -- and the workaround for that currently used in the AMD GCN target plugin could

Re: [PATCH] c++: DR2397 - auto specifier for * and & to arrays [PR100975]

2021-06-29 Thread Marek Polacek via Gcc-patches
On Tue, Jun 29, 2021 at 03:50:27PM -0400, Jason Merrill wrote: > On 6/29/21 3:25 PM, Marek Polacek wrote: > > --- a/gcc/testsuite/g++.dg/cpp0x/auto3.C > > +++ b/gcc/testsuite/g++.dg/cpp0x/auto3.C > > @@ -10,7 +10,7 @@ auto x; // { dg-error "auto" } > > auto i = 42, j =

Re: [PATCH 0/2] Ranger-based backwards threader implementation.

2021-06-29 Thread Martin Sebor via Gcc-patches
On 6/29/21 4:27 AM, Aldy Hernandez wrote: On 6/29/21 1:19 AM, Martin Sebor wrote: On 6/28/21 10:21 AM, Aldy Hernandez via Gcc-patches wrote: This is the ranger-based backwards threader.  It is divided into two parts: the solver and the path discovery bits. The solver is generic enough, that

[PATCH] [RFC] libgcc: Add a backchain fallback to _Unwind_Backtrace() on PowerPC

2021-06-29 Thread Raphael Moreira Zinsly via Gcc-patches
Hi all, There is a patch proposed on glibc that removes the powerpc backtrace implementation [1]. As discussed in that thread, it would be helpful to have a backchain fallback on libgcc before removing it. This patch is moving part of that code to libgcc in order to do that. Is it acceptable to

Re: [Patch] Add 'default' to -foffload=; document that flag [PR67300]

2021-06-29 Thread Christophe Lyon via Gcc-patches
On Tue, Jun 29, 2021 at 10:48 PM Rainer Orth wrote: > Hi Tobias, > > > On 29.06.21 13:58, Jakub Jelinek wrote: > > > >> Also, wonder if we shouldn't print the list of configured targets in > that > >> case, see candidates_list_and_hint functions and its callers. > >> And it is unclear why we use

[pushed] c++: don't treat member var as var template

2021-06-29 Thread Jason Merrill via Gcc-patches
While looking at a partial instantiation issue I noticed that we were wrongly hitting the partial instantiation code when instantiating a static data member of a class template. I don't think this broke anything, but we don't need to do that (small) extra work. gcc/cp/ChangeLog: * pt.c

Re: [Patch] Add 'default' to -foffload=; document that flag [PR67300]

2021-06-29 Thread Rainer Orth
Hi Tobias, > On 29.06.21 13:58, Jakub Jelinek wrote: > >> Also, wonder if we shouldn't print the list of configured targets in that >> case, see candidates_list_and_hint functions and its callers. >> And it is unclear why we use fatal_error, can't unknown offload target names >> be simply ignored

Re: Go patch committed: In composite literals use temps only for interfaces

2021-06-29 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jun 29, 2021 at 11:01 AM Ian Lance Taylor wrote: > > This patch to the Go frontend reduces the number of temporaries that > the compiler genrrates for composite literals. For a composite > literal we only need to introduce a temporary variable if we may be > converting to an interface

[RFC] ipa: Adjust references to identify read-only globals

2021-06-29 Thread Martin Jambor
Hi, this patch has been motivated by SPEC 2017's 544.nab_r in which there is a static variable which is never written to and so zero throughout the run-time of the benchmark. However, it is passed by reference to a function in which it is read and (after some multiplications) passed into

Re: [PATCH][gcc] Allow functions without C-style ellipsis to use format attribute

2021-06-29 Thread Martin Sebor via Gcc-patches
On 6/27/21 10:24 PM, Tuan Le Quang via Gcc-patches wrote: Hi, Currently, format attribute can be used to do type-checking for arguments with respect to a format string. However, only functions with a C-style ellipsis can use it. Supporting this attribute for non-variadic functions(functions

Re: [PATCH 2/4] Allow match-and-simplified phiopt to run in early phiopt

2021-06-29 Thread Andrew Pinski via Gcc-patches
On Tue, Jun 29, 2021 at 12:14 PM Martin Sebor via Gcc-patches wrote: > > On 6/27/21 5:24 PM, apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > > > To move a few things more to match-and-simplify from phiopt, > > we need to allow match_simplify_replacement to run in early > > phiopt.

Re: [PATCH] c++: DR2397 - auto specifier for * and & to arrays [PR100975]

2021-06-29 Thread Jason Merrill via Gcc-patches
On 6/29/21 3:25 PM, Marek Polacek wrote: This patch implements DR2397, which removes the restriction in [dcl.array]p4 that the array element type may not be a placeholder type. We don't need to worry about decltype(auto) here, so this allows code like int a[3]; auto (*p)[3] = auto

Re: [PATCH 2/2] c++: Extend PR96204 fix to variable templates

2021-06-29 Thread Jason Merrill via Gcc-patches
On 6/29/21 1:57 PM, Patrick Palka wrote: r12-1829 corrected the access scope during partial specialization matching of class templates, but neglected the variable template case. This patch moves the access scope adjustment to inside most_specialized_partial_spec, so that all callers can benefit.

[PATCH] c++: DR2397 - auto specifier for * and & to arrays [PR100975]

2021-06-29 Thread Marek Polacek via Gcc-patches
This patch implements DR2397, which removes the restriction in [dcl.array]p4 that the array element type may not be a placeholder type. We don't need to worry about decltype(auto) here, so this allows code like int a[3]; auto (*p)[3] = auto ()[3] = a; However, note that auto (&)[2] =

Go patch commited: Set DECL_NAMELESS for temporaries

2021-06-29 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend sets DECL_NAMELESS for temporary variables. This is consistent with what create_tmp_var does, but is used for cases where we can't use create_tmp_var. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian * go-gcc.cc

Re: [PATCH 2/4] Allow match-and-simplified phiopt to run in early phiopt

2021-06-29 Thread Martin Sebor via Gcc-patches
On 6/27/21 5:24 PM, apinski--- via Gcc-patches wrote: From: Andrew Pinski To move a few things more to match-and-simplify from phiopt, we need to allow match_simplify_replacement to run in early phiopt. To do this we add a replacement for gimple_simplify that is explictly for phiopt. OK?

[PATCH] tree-optimization/101254 - Fix MINUS_EXPR relations.

2021-06-29 Thread Andrew MacLeod via Gcc-patches
We were incorrectly calculating the LHS of a MINUS_EXPR for wrapping signed values.  This patch cleans that up and fully fleshed out the possible LHS of OP1 - OP2 given a known relation between them. Bootstraps on x86_64-pc-linux-gnu with no regressions.  Pushed. Andrew >From

[PATCH] Allow PHIs to pick up global values.

2021-06-29 Thread Andrew MacLeod via Gcc-patches
EVRP appears to allow PHIS to pick up global values before inlining.. This simply matches that behaviour with ranger and allows better equality when running in ranger-only mode.. Bootstraps on x86_64-pc-linux-gnu with no regressions.  Pushed. Andrew >From

[PATCH] Add stmt context in simplify_using_ranges.

2021-06-29 Thread Andrew MacLeod via Gcc-patches
We added context to a lot of simplify_using_ranges, but we didn't catch all the places.   This provides the originating stmt to the missing cases which resolve a few EVRP testcases when running in ranger-only mode. Bootstraps on x86_64-pc-linux-gnu with no regressions.  Pushed. Andrew >From

Re: [PATCH 1/4] Duplicate the range information of the phi onto the new ssa_name

2021-06-29 Thread Martin Sebor via Gcc-patches
On 6/27/21 5:24 PM, apinski--- via Gcc-patches wrote: From: Andrew Pinski Since match_simplify_replacement uses gimple_simplify, there is a new ssa name created sometimes and then we go and replace the phi edge with this new ssa name, the range information on the phi is lost. Placing this in

Re: [PATCH] c++: cxx_eval_array_reference and empty elt type [PR101194]

2021-06-29 Thread Jason Merrill via Gcc-patches
On 6/29/21 2:25 PM, Patrick Palka wrote: Here the initializer for 'x' is represented as an empty CONSTRUCTOR due to its empty element type. So during constexpr evaluation of the ARRAY_REF 'x[0]', we end up trying to lazily value initialize the omitted element at index 0, which fails because the

Re: [PATCH 1/2] c++: Fix push_access_scope and introduce RAII wrapper for it

2021-06-29 Thread Jason Merrill via Gcc-patches
On 6/29/21 1:57 PM, Patrick Palka wrote: When push_access_scope is passed a TYPE_DECL for a class type (which can happen during e.g. satisfaction), we undesirably push only the enclosing context of the class instead of the class itself. This causes us to mishandle e.g. testcase below due to us

[PATCH] c++: cxx_eval_array_reference and empty elt type [PR101194]

2021-06-29 Thread Patrick Palka via Gcc-patches
Here the initializer for 'x' is represented as an empty CONSTRUCTOR due to its empty element type. So during constexpr evaluation of the ARRAY_REF 'x[0]', we end up trying to lazily value initialize the omitted element at index 0, which fails because the element type is not default initializable.

[PATCH 2/4] rs6000: Add tests for SSE4.1 "test" intrinsics

2021-06-29 Thread Paul A. Clarke via Gcc-patches
Copy the test for _mm_testz_si128, _mm_testc_si128, _mm_testnzc_si128, _mm_test_all_ones, _mm_test_all_zeros, _mm_test_mix_ones_zeros from gcc/testsuite/gcc.target/i386. 2021-06-29 Paul A. Clarke gcc/testsuite/ChangeLog: * gcc.target/powerpc/sse4_1-ptest.c: Copy from

[PATCH 4/4] rs6000: Add tests for SSE4.1 "blend" intrinsics

2021-06-29 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-06-29 Paul A. Clarke gcc/testsuite/ChangeLog: * gcc/testsuite/gcc.target/powerpc/sse4_1-blendpd.c: Copy from gcc/testsuite/gcc.target/i386. *

[PATCH 3/4] rs6000: Add support for SSE4.1 "blend" intrinsics

2021-06-29 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-06-29 Paul A. Clarke gcc/ChangeLog: * config/rs6000/smmintrin.h (_mm_blend_pd, _mm_blendv_pd, _mm_blend_ps, _mm_blendv_ps): New. --- gcc/config/rs6000/smmintrin.h | 46

[PATCH 1/4] rs6000: Add support for SSE4.1 "test" intrinsics

2021-06-29 Thread Paul A. Clarke via Gcc-patches
2021-06-29 Paul A. Clarke gcc/ChangeLog: * config/rs6000/smmintrin.h (_mm_testz_si128, _mm_testc_si128, _mm_testnzc_si128, _mm_test_all_ones, _mm_test_all_zeros, _mm_test_mix_ones_zeros): New. --- gcc/config/rs6000/smmintrin.h | 50 +++

[PATCH 0/4] rs6000: Add SSE4.1 "test" and "blend" intrinsics

2021-06-29 Thread Paul A. Clarke via Gcc-patches
Paul A. Clarke (4): rs6000: Add support for SSE4.1 "test" intrinsics rs6000: Add tests for SSE4.1 "test" intrinsics rs6000: Add support for SSE4.1 "blend" intrinsics rs6000: Add tests for SSE4.1 "blend" intrinsics gcc/config/rs6000/smmintrin.h | 96 ++

Go patch committed: In composite literals use temps only for interfaces

2021-06-29 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend reduces the number of temporaries that the compiler genrrates for composite literals. For a composite literal we only need to introduce a temporary variable if we may be converting to an interface type, so only do it then. This saves over 80% of compilation time

Re: [PATCH] Port GCC documentation to Sphinx

2021-06-29 Thread Eli Zaretskii via Gcc-patches
> Date: Tue, 29 Jun 2021 19:57:11 +0300 > From: Eli Zaretskii via Gcc > Cc: g...@gcc.gnu.org, gcc-patches@gcc.gnu.org, jos...@codesourcery.com > > Or how about this: > > `Overall Options' > >See Options Controlling the Kind of Output. > >*note -c. *note -S. *note -E. *note

[PATCH 1/2] c++: Fix push_access_scope and introduce RAII wrapper for it

2021-06-29 Thread Patrick Palka via Gcc-patches
When push_access_scope is passed a TYPE_DECL for a class type (which can happen during e.g. satisfaction), we undesirably push only the enclosing context of the class instead of the class itself. This causes us to mishandle e.g. testcase below due to us not entering the scope of A before checking

[PATCH 2/2] c++: Extend PR96204 fix to variable templates

2021-06-29 Thread Patrick Palka via Gcc-patches
r12-1829 corrected the access scope during partial specialization matching of class templates, but neglected the variable template case. This patch moves the access scope adjustment to inside most_specialized_partial_spec, so that all callers can benefit. Bootstrapped and regtested on

[PATCH] i386: Add V2SFmode vec_addsub pattern [PR95046]

2021-06-29 Thread Uros Bizjak via Gcc-patches
gcc/ 2021-06-21 Uroš Bizjak PR target/95046 * config/i386/mmx.md (vec_addsubv2sf3): New insn pattern. gcc/testsuite/ 2021-06-21 Uroš Bizjak PR target/95046 * gcc.target/i386/pr95046-9.c: New test. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Pushed

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-06-29 Thread Martin Sebor via Gcc-patches
On 6/29/21 8:43 AM, Jason Merrill wrote: On 6/28/21 2:07 PM, Martin Sebor wrote: On 6/28/21 2:07 AM, Richard Biener wrote: On Sat, Jun 26, 2021 at 12:36 AM Martin Sebor wrote: On 6/25/21 4:11 PM, Jason Merrill wrote: On 6/25/21 4:51 PM, Martin Sebor wrote: On 6/1/21 3:38 PM, Jason Merrill

Re: [PATCH] Port GCC documentation to Sphinx

2021-06-29 Thread Eli Zaretskii via Gcc-patches
> From: Martin Liška > Date: Tue, 29 Jun 2021 12:09:23 +0200 > Cc: GCC Development , gcc-patches@gcc.gnu.org > > On 6/28/21 5:33 PM, Joseph Myers wrote: > > Are formatted manuals (HTML, PDF, man, info) corresponding to this patch > > version also available for review? > > I've just uploaded

Re: [wwwdocs] gcc-12/changes.html: GCN - add TI mode, mention -foffload(-options)

2021-06-29 Thread Julian Brown
On Tue, 29 Jun 2021 17:34:00 +0200 Tobias Burnus wrote: > This documents AMD GCN's new much-more complete TI-mode > (__int128_t) support, that was as v2 just posted by Julian > and should get committed very soon. Thank you! > gcc-12/changes.html: GCN - add TI mode, mention -foffload(-options)

Re: GCC documentation: porting to Sphinx

2021-06-29 Thread Arnaud Charlet
> >In particular can you explain the motivation behind all the changes in the > >gcc/ada/doc directory? > > Sure: > 1) All Sphinx manuals live in a directory where index page is called > index.rst. That's why > I moved e.g. this: gcc/ada/doc/{gnat_rm.rst => gnat_rm/index.rst} > 2) I moved

Re: [PATCH v3] fixinc: don't "fix" machine names in __has_include(...) [PR91085]

2021-06-29 Thread Bruce Korb via Gcc-patches
On 6/28/21 10:26 PM, Xi Ruoyao wrote: v3: use memmem/memchr instead of trivial loops split most of the logic into a static function avoid hardcoded magic number adjust test Looks good to me. :)

[wwwdocs] gcc-12/changes.html: GCN - add TI mode, mention -foffload(-options)

2021-06-29 Thread Tobias Burnus
This documents AMD GCN's new much-more complete TI-mode (__int128_t) support, that was as v2 just posted by Julian and should get committed very soon. Additionally, -foffload= (previously undocumented) has been split into -foffload= and -foffload-options= and now has a documentation. Hence, both

Re: [PATCH 4/7] Allow match-and-simplified phiopt to run in early phiopt

2021-06-29 Thread Jeff Law via Gcc-patches
On 6/25/2021 2:24 AM, Richard Biener wrote: On Thu, Jun 24, 2021 at 6:24 PM Jeff Law via Gcc-patches wrote: On 6/23/2021 4:19 PM, apinski--- via Gcc-patches wrote: From: Andrew Pinski To move a few things more to match-and-simplify from phiopt, we need to allow

Re: [PATCH] Rearrange detection of temporary directory for NetBSD

2021-06-29 Thread Jeff Law via Gcc-patches
On 6/28/2021 4:45 PM, Gerald Pfeifer wrote: On Thu, 26 Mar 2020, Kamil Rytarowski wrote: On 25.03.2020 23:36, Jeff Law wrote: I wouldn't mind dropping /usr/tmp. That so antiquated that it'd be non- controversial. Can you send that as a separate patch. Behavior for !__NetBSD__ is out of

Re: [COMMITTED V10 3/7] CTF/BTF debug formats

2021-06-29 Thread Joseph Myers
On Tue, 29 Jun 2021, David Edelsohn via Gcc-patches wrote: > On Tue, Jun 29, 2021 at 10:33 AM Joseph Myers wrote: > > > > There's now a build failure for sparc64-linux-gnu: > > > > In file included from ./tm_p.h:4:0, > > from /scratch/jmyers/glibc-bot/src/gcc/gcc/ctfout.c:24: >

Re: [PATCH 2/5] amdgcn: Add [us]mulsi3_highpart SGPR alternatives & [us]mulsid3/muldi3 expanders

2021-06-29 Thread Julian Brown
On Fri, 18 Jun 2021 15:55:09 +0100 Andrew Stubbs wrote: > On 18/06/2021 15:19, Julian Brown wrote: > > This patch improves 64-bit multiplication for AMD GCN: patterns for > > unsigned and signed 32x32->64 bit multiplication have been added, > > and also 64x64->64 bit multiplication is now

[PATCH 3/3] amdgcn: Add [us]mulsid3/muldi3 patterns

2021-06-29 Thread Julian Brown
This patch improves 64-bit multiplication for AMD GCN: patterns for unsigned and signed 32x32->64 bit multiplication have been added, and also 64x64->64 bit multiplication is now open-coded rather than calling a library function (which may be a win for code size as well as speed: the function

[PATCH 2/3] amdgcn: Add [us]mulsi3_highpart SGPR alternatives

2021-06-29 Thread Julian Brown
This patch splits the mulsi3_highpart pattern into an expander and register/immediate alternatives (to avoid meaningless sign/zero_extends on constants), and adds alternatives for SGPR high-part multiply instructions on GCN5+. I will apply shortly. Julian 2021-06-29 Julian Brown gcc/

[PATCH 1/3] amdgcn: Mark s_mulk_i32 as clobbering SCC

2021-06-29 Thread Julian Brown
The s_mulk_i32 instruction sets the SCC status register according to whether the multiplication overflows, but that is not currently modelled in the GCN backend. AFAIK this is a latent bug and hasn't been noticed "in the wild", but it should be fixed. I will commit shortly. Julian 2021-06-29

[PATCH 0/3] amdgcn: Integer multiplication improvements

2021-06-29 Thread Julian Brown
These three patches replace the following one from the previously-posted series: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573161.html As suggested by Andrew Stubbs, I've changed the early lowering of DImode multiplication to a define_insn_and_split to keep the operation together

Re: [COMMITTED V10 3/7] CTF/BTF debug formats

2021-06-29 Thread David Edelsohn via Gcc-patches
On Tue, Jun 29, 2021 at 10:33 AM Joseph Myers wrote: > > There's now a build failure for sparc64-linux-gnu: > > In file included from ./tm_p.h:4:0, > from /scratch/jmyers/glibc-bot/src/gcc/gcc/ctfout.c:24: > /scratch/jmyers/glibc-bot/src/gcc/gcc/config/sparc/sparc-protos.h:46:47:

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-06-29 Thread Jason Merrill via Gcc-patches
On 6/28/21 2:07 PM, Martin Sebor wrote: On 6/28/21 2:07 AM, Richard Biener wrote: On Sat, Jun 26, 2021 at 12:36 AM Martin Sebor wrote: On 6/25/21 4:11 PM, Jason Merrill wrote: On 6/25/21 4:51 PM, Martin Sebor wrote: On 6/1/21 3:38 PM, Jason Merrill wrote: On 6/1/21 3:56 PM, Martin Sebor

Re: [COMMITTED V10 3/7] CTF/BTF debug formats

2021-06-29 Thread Joseph Myers
There's now a build failure for sparc64-linux-gnu: In file included from ./tm_p.h:4:0, from /scratch/jmyers/glibc-bot/src/gcc/gcc/ctfout.c:24: /scratch/jmyers/glibc-bot/src/gcc/gcc/config/sparc/sparc-protos.h:46:47: error: use of enum 'memmodel' without previous declaration

Re: [Patch] Add 'default' to -foffload=; document that flag [PR67300]

2021-06-29 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 29, 2021 at 03:47:03PM +0200, Tobias Burnus wrote: > gcc/ChangeLog: > > * common.opt (-foffload=): Update description. > (-foffload-options=): New. > * doc/invoke.texi (C Language Options): Document > -foffload and -foffload-options. > * gcc.c

Re: [Patch] Add 'default' to -foffload=; document that flag [PR67300]

2021-06-29 Thread Tobias Burnus
First, the doc-sorting patch has now been applied separately as https://gcc.gnu.org/g:d479ddc0d9854905d03a3290b203a5dcb8db07eb On 29.06.21 13:58, Jakub Jelinek wrote: Also, wonder if we shouldn't print the list of configured targets in that case, see candidates_list_and_hint functions and its

[PATCH] Add forward propagation to SLP "any" permutes

2021-06-29 Thread Richard Biener
This adds a forward propagation phase to the permute optimization machinery which allows us to handle "any" permute for all kinds of nodes. To match previous behavior cost-wise we still do not allow non-external/constant nodes to be duplicated for multiple permutes and this is ensured during

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-06-29 Thread Trevor Saunders
On Fri, Jun 25, 2021 at 02:51:58PM -0600, Martin Sebor via Gcc-patches wrote: > On 6/1/21 3:38 PM, Jason Merrill wrote: > > On 6/1/21 3:56 PM, Martin Sebor wrote: > > > On 5/27/21 2:53 PM, Jason Merrill wrote: > > > > On 4/27/21 11:52 AM, Martin Sebor via Gcc-patches wrote: > > > > > On 4/27/21

Re: [Patch] Add 'default' to -foffload=; document that flag [PR67300]

2021-06-29 Thread Jakub Jelinek via Gcc-patches
On Mon, Jun 28, 2021 at 05:51:30PM +0200, Tobias Burnus wrote: > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi I think it would be better to commit the reorderings in invoke.texi separately from the -foffload* changes, because otherwise people will keep wondering what actually really

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-06-29 Thread Martin Jambor
Hi, On Tue, Jun 29 2021, Richard Biener via Gcc-patches wrote: > On Mon, Jun 28, 2021 at 8:07 PM Martin Sebor wrote: [...] >> >> vNULL can bind to a const vec& (via the vec conversion ctor) but >> not to vec&. The three functions that in the patch are passed >> vNULL modify the argument when

[PATCH] Refactor SLP permute opt propagation

2021-06-29 Thread Richard Biener
This rewrites the SLP permute opt propagation to elide the visited bit for an incoming permute of -1 as well as allowing the initial propagation to take more than one iteration before starting on materialization. As we still lack propagation in the reverse direction I've added

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-06-29 Thread Richard Biener via Gcc-patches
On Mon, Jun 28, 2021 at 8:07 PM Martin Sebor wrote: > > On 6/28/21 2:07 AM, Richard Biener wrote: > > On Sat, Jun 26, 2021 at 12:36 AM Martin Sebor wrote: > >> > >> On 6/25/21 4:11 PM, Jason Merrill wrote: > >>> On 6/25/21 4:51 PM, Martin Sebor wrote: > On 6/1/21 3:38 PM, Jason Merrill

Re: [PATCH] tree-optimization/101186 - extend FRE with "equivalence map" for condition prediction

2021-06-29 Thread Richard Biener via Gcc-patches
On Mon, Jun 28, 2021 at 3:15 PM Andrew MacLeod wrote: > > On 6/27/21 11:46 AM, Aldy Hernandez wrote: > > > > > > On 6/25/21 9:38 AM, Richard Biener wrote: > >> On Thu, Jun 24, 2021 at 5:01 PM Andrew MacLeod > >> wrote: > >>> > >>> On 6/24/21 9:25 AM, Andrew MacLeod wrote: > On 6/24/21 8:29

Re: [PATCH] Port GCC documentation to Sphinx

2021-06-29 Thread Richard Earnshaw via Gcc-patches
On 29/06/2021 11:09, Martin Liška wrote: On 6/28/21 5:33 PM, Joseph Myers wrote: Are formatted manuals (HTML, PDF, man, info) corresponding to this patch version also available for review? I've just uploaded them here: https://splichal.eu/gccsphinx-final/ Martin In the HTML version of

Re: [ARM] PR98435: Missed optimization in expanding vector constructor

2021-06-29 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 28 Jun 2021 at 14:48, Christophe LYON wrote: > > > On 28/06/2021 10:40, Kyrylo Tkachov via Gcc-patches wrote: > > > >> -Original Message- > >> From: Prathamesh Kulkarni > >> Sent: 28 June 2021 09:38 > >> To: Kyrylo Tkachov > >> Cc: Christophe Lyon ; gcc Patches >>

Re: [PATCH 0/2] Ranger-based backwards threader implementation.

2021-06-29 Thread Aldy Hernandez via Gcc-patches
On 6/29/21 1:19 AM, Martin Sebor wrote: On 6/28/21 10:21 AM, Aldy Hernandez via Gcc-patches wrote: This is the ranger-based backwards threader.  It is divided into two parts: the solver and the path discovery bits. The solver is generic enough, that it may be of use to other passes, so it's

Re: [PATCH] Port GCC documentation to Sphinx

2021-06-29 Thread Martin Liška
On 6/28/21 5:33 PM, Joseph Myers wrote: Are formatted manuals (HTML, PDF, man, info) corresponding to this patch version also available for review? I've just uploaded them here: https://splichal.eu/gccsphinx-final/ Martin

Re: [PATCH] New hook adjust_iv_update_pos

2021-06-29 Thread Xionghu Luo via Gcc-patches
On 2021/6/28 16:25, Richard Biener wrote: > On Mon, Jun 28, 2021 at 10:07 AM Xionghu Luo wrote: >> >> >> >> On 2021/6/25 18:02, Richard Biener wrote: >>> On Fri, Jun 25, 2021 at 11:41 AM Xionghu Luo wrote: On 2021/6/25 16:54, Richard Biener wrote: > On Fri, Jun 25,

Re: [PATCH] match.pd: Avoid (intptr_t)x eq/ne CST to x eq/ne (typeof x) CST opt in GENERIC when sanitizing [PR101210]

2021-06-29 Thread Richard Biener
On Tue, 29 Jun 2021, Jakub Jelinek wrote: > Hi! > > When we have (intptr_t) x == cst where x has REFERENCE_TYPE, this > optimization creates x == cst out of it where cst has REFERENCE_TYPE. > If it is done in GENERIC folding, it can results in ubsan failures > where the INTEGER_CST with

[PATCH] tree-optimization/101242 - fix reverse graph entry detection

2021-06-29 Thread Richard Biener
This avoids detecting random unrelated nodes as possible entries to not backwards reachable regions of the SLP graph. Instead explicitely add the problematic nodes. This temporary XFAILs gcc.dg/vect/pr67790.c until I get the permute propagation adjusted to when it needs more than one optimistic

[PATCH] match.pd: Avoid (intptr_t)x eq/ne CST to x eq/ne (typeof x) CST opt in GENERIC when sanitizing [PR101210]

2021-06-29 Thread Jakub Jelinek via Gcc-patches
Hi! When we have (intptr_t) x == cst where x has REFERENCE_TYPE, this optimization creates x == cst out of it where cst has REFERENCE_TYPE. If it is done in GENERIC folding, it can results in ubsan failures where the INTEGER_CST with REFERENCE_TYPE is instrumented. Fixed by deferring it to

Re: [PATCH v5 2/2] x86: Add vec_duplicate expander

2021-06-29 Thread Richard Sandiford via Gcc-patches
"H.J. Lu via Gcc-patches" writes: > On Mon, Jun 28, 2021 at 5:36 AM Richard Sandiford > wrote: >> >> "H.J. Lu" writes: >> > On Sun, Jun 27, 2021 at 2:00 PM Richard Sandiford >> > wrote: >> >> >> >> "H.J. Lu via Gcc-patches" writes: >> >> > On Sun, Jun 27, 2021 at 1:43 AM Richard Sandiford >>

[PATCH 2/2] RISC-V: Add ldr/str instruction for T-HEAD.

2021-06-29 Thread Jojo R via Gcc-patches
gcc/ * gcc/config/riscv/riscv-opts.h (TARGET_LDR): New. (TARGET_LDUR): Likewise. * gcc/config/riscv/riscv.h (INDEX_REG_CLASS): Use TARGET_LDR. (REGNO_OK_FOR_INDEX_P): Use TARGET_LDR. (REG_OK_FOR_INDEX_P): Use REGNO_OK_FOR_INDEX_P. *

[PATCH 1/2] RISC-V: Add arch flags for T-HEAD.

2021-06-29 Thread Jojo R via Gcc-patches
gcc/ * gcc/config/riscv/riscv.opt (riscv_x_subext): New. * gcc/config/riscv/riscv-opts.h (MASK_XTHEAD_C): New. (TARGET_XTHEAD_C): Likewise. * gcc/common/config/riscv/riscv-common.c (riscv_ext_flag_table): Use riscv_x_subext & MASK_XTHEAD_C. ---

[PATCH 0/2] RISC-V: Add ldr/str instruction for T-HEAD.

2021-06-29 Thread Jojo R via Gcc-patches
T-HEAD extends some customized ISAs for Cores. The patches support ldr/str insns, it likes arm's LDR insn, the memory model is a base register indexed by (optionally scaled) register.

Re: pdp11: Fix warnings to allow compilation with a recent GCC and --enable-werror-always

2021-06-29 Thread Jan-Benedict Glaw
On Mon, 2021-06-28 16:17:13 +, Koning, Paul wrote: > > On Jun 28, 2021, at 11:33 AM, Jan-Benedict Glaw wrote: > > > > I'd like to install this patch to let the pdp11-aout configuration > > build again with eg. [...] > > Okay for master? > Yes, thanks! Pushed. Thanks! MfG, JBG --

Re: [ARM] PR66791: Replace calls to builtin in vmul_n (a, b) intrinsics with __a * __b

2021-06-29 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 21 Jun 2021 at 14:04, Prathamesh Kulkarni wrote: > > On Mon, 14 Jun 2021 at 13:27, Prathamesh Kulkarni > wrote: > > > > On Mon, 7 Jun 2021 at 12:45, Prathamesh Kulkarni > > wrote: > > > > > > On Mon, 31 May 2021 at 16:01, Prathamesh Kulkarni > > > wrote: > > > > > > > > On Mon, 31 May

Re: [ARM] PR66791: Gate comparison in vca intrinsics on __FAST_MATH__

2021-06-29 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 22 Jun 2021 at 15:04, Prathamesh Kulkarni wrote: > > Hi, > The attached patch gates abs(__a) cmp abs(__b) for vca intrinsics on > __FAST_MATH__. I moved vabs intrinsics before vcage_f32 since vca > intrinsics use those. > Bootstrapped+tested on arm-linux-gnueabihf. > OK to commit ? ping