[PATCH] gcc/configure: check for powerpc64le-unknown-freebsd

2021-10-15 Thread Piotr Kubaj
Only powerpc64-unknown-freebsd was checked for. Signed-off-by: Piotr Kubaj --- gcc/configure| 2 +- gcc/configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/configure b/gcc/configure index 5ea5a1b7143..8790153cfda 100755 --- a/gcc/configure +++ b/gcc/config

Re: [PATCH v2 0/4] libffi: Sync with upstream

2021-10-15 Thread David Edelsohn via Gcc-patches
On Fri, Oct 15, 2021 at 8:06 PM H.J. Lu wrote: > > On Wed, Oct 13, 2021 at 6:42 AM H.J. Lu wrote: > > > > On Wed, Oct 13, 2021 at 6:03 AM Richard Biener > > wrote: > > > > > > On Wed, Oct 13, 2021 at 2:56 PM H.J. Lu wrote: > > > > > > > > On Wed, Oct 13, 2021 at 5:45 AM Richard Biener > > > >

Re: [PATCH v2 0/4] libffi: Sync with upstream

2021-10-15 Thread H.J. Lu via Gcc-patches
On Wed, Oct 13, 2021 at 6:42 AM H.J. Lu wrote: > > On Wed, Oct 13, 2021 at 6:03 AM Richard Biener > wrote: > > > > On Wed, Oct 13, 2021 at 2:56 PM H.J. Lu wrote: > > > > > > On Wed, Oct 13, 2021 at 5:45 AM Richard Biener > > > wrote: > > > > > > > > On Thu, Sep 2, 2021 at 5:50 PM H.J. Lu wrote

[committed] libstdc++: Fix error in filesystem::path with Clang

2021-10-15 Thread Jonathan Wakely via Gcc-patches
THis fixes teh following error seen with Clang: error: function '_S_convert>' with deduced return type cannot be used before it is defined return string_type(_S_convert(std::u8string_view(__str))); ^ libstdc++-v3/ChangeLog: * include/bits/fs_path.h

[committed] libstdc++: Define std::basic_string::resize_and_overwrite for C++23 (P1072R10)

2021-10-15 Thread Jonathan Wakely via Gcc-patches
A recently approved change for the C++23 working draft. libstdc++-v3/ChangeLog: * include/bits/basic_string.h (__cpp_lib_string_resize_and_overwrite): Define for C++23. (basic_string::resize_and_overwrite): Declare. * include/bits/basic_string.tcc (basic_string::re

[r12-4443 Regression] FAIL: 27_io/ios_base/failure/dual_abi.cc execution test on Linux/x86_64

2021-10-15 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 93ac832f1846e4867aa6537f76f510fab8e3e87d is the first bad commit commit 93ac832f1846e4867aa6537f76f510fab8e3e87d Author: Andrew MacLeod Date: Thu Oct 7 10:12:29 2021 -0400 Ranger : Do not process abnormal ssa-names. caused FAIL: 27_io/ios_base/failure/dual_abi.cc executi

[Patch] Fortran: Fix CLASS conversion check [PR102745]

2021-10-15 Thread Tobias Burnus
This patch fixes two issues: First, to print 'CLASS(t2)' instead of: Error: Type mismatch in argument ‘x’ at (1); passed CLASS(__class_MAIN___T2_a) to TYPE(t) Additionally, class(t2) = class(t) ! 't2' extends 't' class(t2) = class(any) was wrongly accepted. OK? Tobias -

Re: [PATCH] c++: fix cases of core1001/1322 by not dropping cv-qualifier of function parameter of type of typename or decltype[PR101402,PR102033,PR102034,PR102039,PR102

2021-10-15 Thread Jason Merrill via Gcc-patches
On 10/14/21 07:04, Nick Huang wrote: IMHO, I think your patch probably finally solved this long-standing Core 1001 issue. Of course it is not up to me to say so. I just want to point out that it even solves the following case, even though it is more or less expected if concept and lambda all work

Re: [PATCH] Add a simulate_record_decl lang hook

2021-10-15 Thread Jason Merrill via Gcc-patches
On 9/24/21 13:53, Richard Sandiford wrote: This patch adds a lang hook for defining a struct/RECORD_TYPE “as if” it had appeared directly in the source code. It follows the similar existing hook for enums. It's the caller's responsibility to create the fields (as FIELD_DECLs) but the hook's res

Re: [PATCH] PR fortran/102685 - ICE in output_constructor_regular_field, at varasm.c:5514

2021-10-15 Thread Harald Anlauf via Gcc-patches
Hi Tobias, all, > > In developing the patch I encountered a difficulty with testcase > > dec_structure_6.f90, which uses a DEC extension, namelist "old-style > > CLIST initializers in STRUCTURE". I could not figure out how to > > determine the shape of the initializer; it seemed to be always zero

[r12-4438 Regression] FAIL: libgomp.c/places-10.c execution test on Linux/x86_64

2021-10-15 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 4764049dd620affcd3e2658dc7f03a6616370a29 is the first bad commit commit 4764049dd620affcd3e2658dc7f03a6616370a29 Author: Jakub Jelinek Date: Fri Oct 15 16:25:25 2021 +0200 openmp: Fix up handling of OMP_PLACES=threads(1) caused FAIL: libgomp.c/places-10.c execution test

Re: [r12-4397 Regression] FAIL: gcc.dg/guality/pr54200.c -Og -DPREVENT_OPTIMIZATION line 20 z == 3 on Linux/x86_64

2021-10-15 Thread H.J. Lu via Gcc-patches
On Fri, Oct 15, 2021 at 2:00 AM Martin Liška wrote: > > On 10/14/21 21:16, sunil.k.pandey wrote: > > FAIL: gcc.dg/guality/pr54200.c -Og -DPREVENT_OPTIMIZATION line 20 z == 3 > > Hello. > > I've just verified the assembly is identical before and after the revision. > So it must be a false positiv

Re: [PATCH, OpenMP 5.1, Fortran] Strictly-structured block support for OpenMP directives

2021-10-15 Thread Jakub Jelinek via Gcc-patches
On Sat, Oct 16, 2021 at 02:44:12AM +0800, Chung-Lin Tang wrote: > The patch currently does not allow strictly-structured BLOCK for > sections/parallel sections, > since I was referencing the 5.1 spec while writing it, although that is > trivially fixable. > (was sensing a bit odd why those two co

[pushed] Darwin: Update specs handling '-r'.

2021-10-15 Thread Iain Sandoe via Gcc-patches
We were not wrapping all the default libraries in checks for whether they should be used. We were also wasting a process launch calling dsymutil for 'r' link lines (a NOP in practice). Order the checks that exclude linking from most likely to occur, downwards. tested on powerpc, i686, x86_64, ar

[pushed] Darwin: Revise handling of some driver opts.

2021-10-15 Thread Iain Sandoe via Gcc-patches
Darwin has a user convenience feature where some linker options are exposed at the driver level (so one can type '-all_load' instead of '-Wl,-all_load' or '-Xlinker -all_load'). We retain this feature, but now these options are all marked as 'Driver' and we process them as early as possible so tha

Re: [PATCH, OpenMP 5.1, Fortran] Strictly-structured block support for OpenMP directives

2021-10-15 Thread Chung-Lin Tang
On 2021/10/14 7:19 PM, Jakub Jelinek wrote: On Thu, Oct 14, 2021 at 12:20:51PM +0200, Jakub Jelinek via Gcc-patches wrote: Thinking more about the Fortran case for !$omp sections, there is an ambiguity. !$omp sections block !$omp section end block is clear and !$omp end sections is optional,

Re: [PATCH] hardened conditionals

2021-10-15 Thread Alexandre Oliva via Gcc-patches
On Oct 14, 2021, Richard Biener wrote: > Yeah, I think that eventually marking the operation we want to preserve > (with volatile?) would be the best way. On GIMPLE that's difficult, > it's easier on GENERIC (we can set TREE_THIS_VOLATILE on the > expression at least), and possibly also on RTL (

[r12-4429 Regression] FAIL: gcc.target/i386/avx512fp16-v4hf-concat.c scan-assembler-times vpunpcklqdq 1 on Linux/x86_64

2021-10-15 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, be072bfa5bb3817168daa0a4a398cd9bd915a726 is the first bad commit commit be072bfa5bb3817168daa0a4a398cd9bd915a726 Author: Hongyu Wang Date: Mon Aug 30 15:18:35 2021 +0800 AVX512FP16: Enhance vector shuffle builtins caused FAIL: gcc.target/i386/avx512fp16-v4hf-concat.c sca

[committed] libstdc++: Make non-propagating-cache fully constexpr [PR101263]

2021-10-15 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: PR libstdc++/101263 * include/std/ranges (__cached): New wrapper struct. (__non_propagating_cache): Use __cached for contained value. (__non_propagating_cache::_M_emplace_deref): Add constexpr. Use std::construct_at instead of placeme

[committed] libstdc++: Add missing constexpr to std::variant (P2231R1)

2021-10-15 Thread Jonathan Wakely via Gcc-patches
This implements the changes in P2231R1 which make std::variant fully constexpr in C++20. We need to replace placement new with std::construct_at, but that isn't defined for C++17. Use std::_Construct instead, which forwards to std::construct_at in C++20 mode (since the related changes to make std:

[committed] libstdc++: Remove try/catch overhead in std::variant::emplace

2021-10-15 Thread Jonathan Wakely via Gcc-patches
The __variant_construct_by_index helper function sets the new index before constructing the new object. This means that if the construction throws then the exception needs to be caught, so the index can be reset to variant_npos, and then the exception rethrown. This means callers are responsible fo

[committed] libstdc++: Remove unused functions in std::variant implementation

2021-10-15 Thread Jonathan Wakely via Gcc-patches
These functions aren't used, and accessing the storage as a void* isn't compatible with C++20 constexpr requirements anyway, so we're unlikely to ever start using them in future. libstdc++-v3/ChangeLog: * include/std/variant (_Variant_storage::_M_storage()): Remove. (__detail::__v

[pushed] Darwin, D: Fix D bootstrap, include tm-dwarf2.h.

2021-10-15 Thread Iain Sandoe via Gcc-patches
After r12-4432-g7bfe7d634f60b0a9 Darwin fails to bootstrap with D enabled since there is no definition of either DWARF2_DEBUG_INFO or PREFERRED_DEBUGGING_TYPE. Fixed here by adding the tm-dwarf2.h file to tm_d_file for Darwin. tested on x86_64-darwin, pushed to master, thanks, Iain P.S. it is no

[COMMITTED] Ranger : Do not process abnormal ssa-names.

2021-10-15 Thread Andrew MacLeod via Gcc-patches
On 10/15/21 10:17 AM, Jeff Law wrote: I don't want to push it quite yet as I wanted feedback to make sure we don't actually do anything I'm not aware of with SSA_NAMES which have the ABNORMAL_PHI flag set.  Most of the code i can find in VRP and vr-values appears to punt, so I presume not e

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

2021-10-15 Thread Richard Sandiford via Gcc-patches
Christophe LYON writes: > On 15/10/2021 17:08, Richard Sandiford wrote: >> Christophe Lyon via Gcc-patches writes: >>> This patch covers a few builtins where we do not use the >>> iterator and thus we cannot use . >>> >>> For v2di instructions, we use the V8BI mode for predicates. >> Why V8BI th

Re: [PATCH] Adjust testcase for O2 vectorization.

2021-10-15 Thread Martin Sebor via Gcc-patches
On 10/14/21 1:11 AM, liuhongt wrote: Hi Kewen: Cound you help to verify if this patch fix those regressions for rs6000 port. As discussed in [1], this patch add xfail/target selector to those testcases, also make a copy of them so that they can be tested w/o vectorization. Just to make sure

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

2021-10-15 Thread Christophe LYON via Gcc-patches
On 15/10/2021 17:08, Richard Sandiford wrote: Christophe Lyon via Gcc-patches writes: This patch covers a few builtins where we do not use the iterator and thus we cannot use . For v2di instructions, we use the V8BI mode for predicates. Why V8BI though, when VPRED uses HI? Hmm.. I used

Re: [PATCH] Fix handling of flag_rename_registers.

2021-10-15 Thread Martin Liška
On 10/14/21 16:27, Jeff Law wrote: So what's the preferred way to handle this?  We're in the process of evaluating -frename-registers on our target right now and subject to verification of a couple issues, our inclination is to turn it on for our target at -O2. Jeff I think the best approach

Re: [PATCH] rs6000: Remove unnecessary option manipulation.

2021-10-15 Thread Martin Liška
On 10/14/21 17:10, Bill Schmidt via Gcc-patches wrote: Looks like you got your parentheses wrong here. Whoops, thanks for the heads up. I'm testing this fixed version. P.S. Next time, please CC me. Thanks, MartinFrom cd9891ec3eed3a5b289b7c556598606d21e48206 Mon Sep 17 00:00:00 2001 From: Mar

[committed] openmp: Improve testsuite/libgomp.c/affinity-1.c testcase

2021-10-15 Thread Jakub Jelinek via Gcc-patches
Hi! I've noticed that while I have added hopefully sufficient test coverage for the case where one uses simple number or !number as p-interval, I haven't added any coverage for number:len:stride or number:len. This patch adds that. Tested on x86_64-linux and i686-linux, committed to trunk. 2021

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

2021-10-15 Thread Martin Liška
All right, and there's second part that moves the code from toplev.c to opts.c (finish_options) as I've done in the original version. The patch also handles PR102766 where nvptx.c target sets: debug_nonbind_markers_p = 0; So the easiest approach is marking the flag as set in global_options_set,

Re: [PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible.

2021-10-15 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> -Original Message- >> From: Richard Sandiford >> Sent: Friday, October 15, 2021 1:26 PM >> To: Tamar Christina >> Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw >> ; Marcus Shawcroft >> ; Kyrylo Tkachov >> Subject: Re: [PATCH]AArch64 Lower intrinsics shift

[committed] hppa: Consistently use "rG" constraint for copy instruction in move patterns

2021-10-15 Thread John David Anglin
Some move patterns on hppa use the "rG" constraint and some just use the "r" constraint for the copy instruction. This patch makes all the move patterns consistent. It causes a copy of register %r0 to always be used to zero a register. There's no functional change since there are multiple way

Re: [PATCH v2 00/14] ARM/MVE use vectors of boolean for predicates

2021-10-15 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > This is v2 of this patch series, addressing the comments I received. > The changes v1 -> v2 are: > > - Patch 3: added an executable test, and updated > check_effective_target_arm_mve_hw > - Patch 4: split into patch 4 and patch 14 (to keep numbering the

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

2021-10-15 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 . > > For v2di instructions, we use the V8BI mode for predicates. Why V8BI though, when VPRED uses HI? Would it make sense to define a V2BI? Or doesn't that work

RE: [PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible.

2021-10-15 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Friday, October 15, 2021 1:26 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > ; Marcus Shawcroft > ; Kyrylo Tkachov > Subject: Re: [PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible. > >

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

2021-10-15 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > @@ -31086,36 +31087,20 @@ arm_expand_vector_compare (rtx target, rtx_code > code, rtx op0, rtx op1, > case NE: >if (TARGET_HAVE_MVE) > { > - rtx vpr_p0; > - if (vcond_mve) > - vpr_p0 = target; > - else > -

Re: [PATCH v2 03/14] arm: Add tests for PR target/101325

2021-10-15 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > These tests are derived from the one provided in the PR: there is a > compile-only test because I did not have access to anything that could > execute MVE code until recently. > I have been able to add an executable test since QEMU supports MVE. > > Instea

[committed] openmp: Handle OpenMP 5.1 simplified OMP_PLACES syntax

2021-10-15 Thread Jakub Jelinek via Gcc-patches
Hi! In addition to adding ll_caches and numa_domain abstract names to OMP_PLACES syntax, OpenMP 5.1 also added one syntax simplification: https://github.com/OpenMP/spec/issues/2080 https://github.com/OpenMP/spec/pull/2081 in particular that in the grammar place non-terminal is now not only { res-l

[committed] openmp: Fix up strtoul and strtoull uses in libgomp

2021-10-15 Thread Jakub Jelinek via Gcc-patches
Hi! Yesterday when working on numa_domains, I've noticed because of a bug in my patch a hang on a large NUMA machine. I've fixed the bug, but also discovered that the hang was a result of making wrong assumptions about strtoul/strtoull. All the uses were for portability setting errno = 0 before

[committed] openmp: Fix up handling of OMP_PLACES=threads(1)

2021-10-15 Thread Jakub Jelinek via Gcc-patches
Hi! When writing the places-*.c tests, I've noticed that we mishandle threads abstract name with specified num-places if num-places isn't a multiple of number of hw threads in a core. It then happily ignores the maximum count and overwrites for the remaining hw threads in a core further places th

Re: [PATCH] Allow early sets of SSE hard registers from standard_sse_constant_p

2021-10-15 Thread Uros Bizjak via Gcc-patches
On Fri, Oct 15, 2021 at 2:15 PM Roger Sayle wrote: > > > My previous patch, which was intended to reduce the differences seen by > the combination of -march=cascadelake and -m32, has additionally found > some more instances where this combination behaves differently to regular > x86_64-pc-linux-gn

Re: [PATCH] Allow fully resolving backward jump threading passes.

2021-10-15 Thread Jeff Law via Gcc-patches
On 10/15/2021 8:25 AM, Aldy Hernandez wrote: This refactors the backward threader pass so that it can be called in either fully resolving mode, or in classic mode where any unknowns default to VARYING. Doing so opens the door for "pass_thread_jumps_full" which has the resolving bits set. Thi

[PATCH] Allow fully resolving backward jump threading passes.

2021-10-15 Thread Aldy Hernandez via Gcc-patches
This refactors the backward threader pass so that it can be called in either fully resolving mode, or in classic mode where any unknowns default to VARYING. Doing so opens the door for "pass_thread_jumps_full" which has the resolving bits set. This pass has not been added to the pipeline, but wit

Re: [PATCH] Ranger : Do not process abnormal ssa-names.

2021-10-15 Thread Jeff Law via Gcc-patches
On 10/15/2021 8:21 AM, Aldy Hernandez wrote: On 10/15/21 3:50 PM, Andrew MacLeod wrote: I've been looking at the pathological time issue ranger has with the testcase from, uh..  PR 97623 I think.  I've lost the details, but kept the file since it was showing unpleasant behaviour. Mos

Re: [PATCH] Ranger : Do not process abnormal ssa-names.

2021-10-15 Thread Aldy Hernandez via Gcc-patches
On 10/15/21 3:50 PM, Andrew MacLeod wrote: I've been looking at the pathological time issue ranger has with the testcase from, uh..  PR 97623 I think.  I've lost the details, but kept the file since it was showing unpleasant behaviour. Most of the time is spent in callbacks from substit

Re: [PATCH] Ranger : Do not process abnormal ssa-names.

2021-10-15 Thread Jeff Law via Gcc-patches
On 10/15/2021 7:50 AM, Andrew MacLeod via Gcc-patches wrote: I've been looking at the pathological time issue ranger has with the testcase from, uh..  PR 97623 I think.  I've lost the details, but kept the file since it was showing unpleasant behaviour. Most of the time is spent in call

[PATCH] Ranger : Do not process abnormal ssa-names.

2021-10-15 Thread Andrew MacLeod via Gcc-patches
I've been looking at the pathological time issue ranger has with the testcase from, uh..  PR 97623 I think.  I've lost the details, but kept the file since it was showing unpleasant behaviour. Most of the time is spent in callbacks from substitute_and_fold to value_on_edge()  dealing with

[committed] amdgcn: fix up offload debug linking with LLVM 13

2021-10-15 Thread Andrew Stubbs
This is a follow-up to my previous LLVM13 support patches (the amdgcn port uses the LLVM assembler) to fix up a corner case. With this patch one can now enable debug information in LLVM 13 offload binaries. This was trickier than you'd think because the different LLVM versions have different a

Re: [PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible.

2021-10-15 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: > Hi All, > > This lowers shifts to GIMPLE when the C interpretations of the shift > operations > matches that of AArch64. > > In C shifting right by BITSIZE is undefined, but the behavior is defined in > AArch64. Additionally negative shifts lefts are undefined in C but

[PATCH] Allow early sets of SSE hard registers from standard_sse_constant_p

2021-10-15 Thread Roger Sayle
My previous patch, which was intended to reduce the differences seen by the combination of -march=cascadelake and -m32, has additionally found some more instances where this combination behaves differently to regular x86_64-pc-linux-gnu. The middle-end always, and backends usually, use emit_move_

[COMMITED] tree-optimization/102752: Fix determining precission of reduction_var

2021-10-15 Thread Stefan Schulze Frielinghaus via Gcc-patches
While determining the precission of reduction_var an SSA_NAME instead of its TREE_TYPE is used. Streamlined with other TREE_TYPE (reduction_var) uses. Bootstrapped and regtested on x86 and IBM Z. Committed as per PR102752. gcc/ChangeLog: * tree-loop-distribution.c (reduction_var_overfl

RE: [PATCH]middle-end convert negate + right shift into compare greater.

2021-10-15 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Friday, October 15, 2021 10:07 AM > To: Tamar Christina > Cc: Richard Earnshaw ; gcc- > patc...@gcc.gnu.org; nd > Subject: RE: [PATCH]middle-end convert negate + right shift into compare > greater. > > On Fri, 15 Oct 2021, Tamar Chri

Re: [COMMITTED] Do not call range_on_path_entry for SSAs defined within the path

2021-10-15 Thread Aldy Hernandez via Gcc-patches
It's been fixed on trunk. Aldy On Fri, Oct 15, 2021, 09:52 Christophe LYON via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > > On 14/10/2021 14:21, Aldy Hernandez via Gcc-patches wrote: > > In the path solver, when requesting the range of an SSA for which we > > know nothing, we ask the ranger

Re: [PATCH] PR fortran/102685 - ICE in output_constructor_regular_field, at varasm.c:5514

2021-10-15 Thread Tobias Burnus
Hi Harald, dear all, On 14.10.21 23:27, Harald Anlauf via Fortran wrote: the attached patch adds a check for the shape of arrays in derived type constructors. This brings it in line with other major brands. ... In developing the patch I encountered a difficulty with testcase dec_structure_6.f90

Re: [committed] libstdc++: Simplify variant access functions

2021-10-15 Thread Maciej Cencora via Gcc-patches
Hi, variant getter can be implemented in C++17 without using "recursive" calls, but by generating a list of member pointers and applying them with fold expression. Here's an example: https://godbolt.org/z/3vcKjWjPG Regards, Maciej

Re: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-10-15 Thread Richard Biener via Gcc-patches
On Fri, 15 Oct 2021, Tamar Christina wrote: > Hi All, > > During testing after rebasing to commit I noticed a failing testcase with the > bitmask compare patch. > > Consider the following C++ testcase: > > #include > > #define A __attribute__((noipa)) > A bool f5 (double i, double j) { auto c

Re: [patch] Tame if-combining when loop unswitching is enabled

2021-10-15 Thread Richard Biener via Gcc-patches
On Fri, Oct 15, 2021 at 11:15 AM Eric Botcazou via Gcc-patches wrote: > > Hi, > > in order to make it possible to vectorize loops running over arrays in Ada, > which generally contain index checks, hence control-flow instructions, we rely > on loop unswitching to generate two copies of the loop, o

[PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-10-15 Thread Tamar Christina via Gcc-patches
Hi All, During testing after rebasing to commit I noticed a failing testcase with the bitmask compare patch. Consider the following C++ testcase: #include #define A __attribute__((noipa)) A bool f5 (double i, double j) { auto c = i <=> j; return c >= 0; } This turns into a comparison against

[COMMITTED] Make signness explicit in tree-ssa/pr102736.c

2021-10-15 Thread Aldy Hernandez via Gcc-patches
This test is failing on ppc64* due to different default signness for chars. Thanks to Richi for quickly pointing out the problem. Tested on x86-64 Linux and ppc64le Linux. gcc/testsuite/ChangeLog: PR testsuite/pr102751 * gcc.dg/tree-ssa/pr102736.c: Make sign explicit. --- gcc/t

Re: [PATCH]middle-end convert negate + right shift into compare greater.

2021-10-15 Thread Richard Biener via Gcc-patches
On Fri, 15 Oct 2021, Richard Earnshaw wrote: > On 15/10/2021 10:06, Richard Biener via Gcc-patches wrote: > > On Fri, 15 Oct 2021, Tamar Christina wrote: > > > > +/* Fold (-x >> C) into x > 0 where C = precision(type) - 1. */ (for > +cst (INTEGER_CST VECTOR_CST) (simplify >

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-15 Thread Aldy Hernandez via Gcc-patches
On 10/15/21 2:47 AM, Andrew MacLeod wrote: On 10/14/21 6:07 PM, Martin Sebor via Gcc-patches wrote: On 10/9/21 12:47 PM, Aldy Hernandez via Gcc-patches wrote: We seem to be passing a lot of context around in the strlen code.  I certainly don't want to contribute to more. Most of the handle_*

Re: [PATCH]middle-end convert negate + right shift into compare greater.

2021-10-15 Thread Richard Earnshaw via Gcc-patches
On 15/10/2021 10:06, Richard Biener via Gcc-patches wrote: On Fri, 15 Oct 2021, Tamar Christina wrote: +/* Fold (-x >> C) into x > 0 where C = precision(type) - 1. */ (for +cst (INTEGER_CST VECTOR_CST) (simplify + (rshift (negate:s @0) cst@1) + (if (!flag_wrapv) Don't test flag_wrapv di

[committed] openmp: Add support for OMP_PLACES=numa_domains

2021-10-15 Thread Jakub Jelinek via Gcc-patches
Hi! This adds support for numa_domains abstract name in OMP_PLACES, also new in OpenMP 5.1. Way to test this is OMP_PLACES=numa_domains OMP_DISPLAY_ENV=true LD_PRELOAD=.libs/libgomp.so.1 /bin/true and see what it prints on OMP_PLACES line. For non-NUMA machines it should print a single place tha

[committed] openmp: Add support for OMP_PLACES=ll_caches

2021-10-15 Thread Jakub Jelinek via Gcc-patches
Hi! This patch implements support for ll_caches abstract name in OMP_PLACES, which stands for places where logical cpus in each place share the last level cache. This seems to work fine for me on x86 and kernel sources show that it is in common code, but on some machines on CompileFarm the files

[patch] Tame if-combining when loop unswitching is enabled

2021-10-15 Thread Eric Botcazou via Gcc-patches
Hi, in order to make it possible to vectorize loops running over arrays in Ada, which generally contain index checks, hence control-flow instructions, we rely on loop unswitching to generate two copies of the loop, one guarded with a global condition (no index check fails in the loop) and vecto

RE: [PATCH]middle-end convert negate + right shift into compare greater.

2021-10-15 Thread Richard Biener via Gcc-patches
On Fri, 15 Oct 2021, Tamar Christina wrote: > > > > > > +/* Fold (-x >> C) into x > 0 where C = precision(type) - 1. */ (for > > > +cst (INTEGER_CST VECTOR_CST) (simplify > > > + (rshift (negate:s @0) cst@1) > > > + (if (!flag_wrapv) > > > > Don't test flag_wrapv directly, instead use the ap

Re: [r12-4397 Regression] FAIL: gcc.dg/guality/pr54200.c -Og -DPREVENT_OPTIMIZATION line 20 z == 3 on Linux/x86_64

2021-10-15 Thread Martin Liška
On 10/14/21 21:16, sunil.k.pandey wrote: FAIL: gcc.dg/guality/pr54200.c -Og -DPREVENT_OPTIMIZATION line 20 z == 3 Hello. I've just verified the assembly is identical before and after the revision. So it must be a false positive. Cheers, Martin

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-10-15 Thread Richard Biener via Gcc-patches
On Tue, 12 Oct 2021, Andre Vieira (lists) wrote: > Hi Richi, > > I think this is what you meant, I now hide all the unrolling cost calculations > in the existing target hooks for costs. I did need to adjust 'finish_cost' to > take the loop_vinfo so the target's implementations are able to set the

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

2021-10-15 Thread Jonathan Wakely via Gcc-patches
On Fri, 15 Oct 2021 at 06:19, François Dumont wrote: > > On 14/10/21 7:43 pm, Jonathan Wakely wrote: > > On Thu, 14 Oct 2021 at 18:11, François Dumont wrote: > >> Hi > >> > >> On a related subject I am waiting for some feedback on: > >> > >> https://gcc.gnu.org/pipermail/libstdc++/2021-Augus

[PATCH] AVX512FP16: Add *_set1_pch intrinsics.

2021-10-15 Thread dianhong.xu--- via Gcc-patches
From: dianhong xu Add *_set1_pch (_Float16 _Complex A) intrinsics. gcc/ChangeLog: * config/i386/avx512fp16intrin.h: (_mm512_set1_pch): New intrinsic. * config/i386/avx512fp16vlintrin.h: (_mm256_set1_pch): New intrinsic. (_mm_set1_pch): Ditto. gcc/testsui

Re: [PATCH] Always default to DWARF2_DEBUG if not specified, warn about deprecated STABS

2021-10-15 Thread Richard Biener via Gcc-patches
On Tue, 28 Sep 2021, Koning, Paul wrote: > > > > On Sep 28, 2021, at 2:14 AM, Richard Biener via Gcc-patches > > wrote: > > > > On Tue, Sep 21, 2021 at 4:26 PM Richard Biener via Gcc-patches > > wrote: > >> > >> This makes defaults.h choose DWARF2_DEBUG if PREFERRED_DEBUGGING_TYPE > >> is n

[PATCH] c/102763 - fix ICE with invalid input to GIMPLE FE

2021-10-15 Thread Richard Biener via Gcc-patches
This fixes an ICE for the failure to verify we're dereferencing a pointer before throwing that at build_simple_mem_ref. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. Richard. 2021-10-15 Richard Biener PR c/102763 gcc/c/ * gimple-parser.c (c_parser_gimpl

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-10-15 Thread Richard Biener via Gcc-patches
On Sat, Oct 9, 2021 at 5:45 AM Xionghu Luo wrote: > > Hi, > > On 2021/9/28 20:09, Richard Biener wrote: > > On Fri, Sep 24, 2021 at 8:29 AM Xionghu Luo wrote: > >> > >> Update the patch to v3, not sure whether you prefer the paste style > >> and continue to link the previous thread as Segher disl

[PATCH]AArch64 Lower intrinsics shift to GIMPLE when possible.

2021-10-15 Thread Tamar Christina via Gcc-patches
Hi All, This lowers shifts to GIMPLE when the C interpretations of the shift operations matches that of AArch64. In C shifting right by BITSIZE is undefined, but the behavior is defined in AArch64. Additionally negative shifts lefts are undefined in C but defined for the register variant of the

Re: [COMMITTED] Do not call range_on_path_entry for SSAs defined within the path

2021-10-15 Thread Christophe LYON via Gcc-patches
On 14/10/2021 14:21, Aldy Hernandez via Gcc-patches wrote: In the path solver, when requesting the range of an SSA for which we know nothing, we ask the ranger for the range incoming to the path. We do this by asking for all the incoming ranges to the path entry block and unioning them. The pr

RE: [PATCH]middle-end convert negate + right shift into compare greater.

2021-10-15 Thread Tamar Christina via Gcc-patches
> > > > +/* Fold (-x >> C) into x > 0 where C = precision(type) - 1. */ (for > > +cst (INTEGER_CST VECTOR_CST) (simplify > > + (rshift (negate:s @0) cst@1) > > + (if (!flag_wrapv) > > Don't test flag_wrapv directly, instead use the appropriate > TYPE_OVERFLOW_{UNDEFINED,WRAPS} predicates. Bu

Re: FW: [PING] Re: [Patch][GCC][middle-end] - Generate FRINTZ for (double)(int) under -ffast-math on aarch64

2021-10-15 Thread Richard Biener via Gcc-patches
On Fri, Sep 24, 2021 at 2:59 PM Jirui Wu via Gcc-patches wrote: > > Hi, > > Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577846.html > > The patch is attached as text for ease of use. Is there anything that needs > to change? > > Ok for master? If OK, can it be committed for me, I

[PATCH] ipa/102762 - fix ICE with invalid __builtin_va_arg_pack () use

2021-10-15 Thread Richard Biener via Gcc-patches
We have to be careful to not break the argument space calculation. If there's not enough arguments just do not append any. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-10-15 Richard Biener PR ipa/102762 * tree-inline.c (copy_bb): Avoid underflowing nargs.

Re: [PATCH] Adjust testcase for O2 vectorization.

2021-10-15 Thread Kewen.Lin via Gcc-patches
on 2021/10/14 下午6:56, Kewen.Lin via Gcc-patches wrote: > Hi Hongtao, > > on 2021/10/14 下午3:11, liuhongt wrote: >> Hi Kewen: >> Cound you help to verify if this patch fix those regressions >> for rs6000 port. >> > > The ppc64le run just finished, there are still some regresssions: > > NA->XPASS