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

2021-09-21 Thread HAO CHEN GUI via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-August/578162.html Thanks On 6/9/2021 下午 2:01, HAO CHEN GUI wrote: Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-August/578162.html Thanks On 26/8/2021 上午 9:19, HAO CHEN GUI wrote: Hi B

PING^1 [PATCH, rs6000] Optimization for vec_xl_sext

2021-09-21 Thread HAO CHEN GUI via Gcc-patches
Hi,   Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579434.html Thanks On 15/9/2021 下午 3:35, HAO CHEN GUI wrote: Bill,     Yes, I built the gcc with p10 binutils. Then power10_ok tests can pass. Thanks again for your kindly explanation.     I finally realized t

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

2021-09-21 Thread Richard Biener via Gcc-patches
On Tue, 21 Sep 2021, Andre Vieira (lists) wrote: > Hi Richi, > > Thanks for the review, see below some questions. > > On 21/09/2021 13:30, Richard Biener wrote: > > On Fri, 17 Sep 2021, Andre Vieira (lists) wrote: > > > >> Hi all, > >> > >> This patch adds the ability to define a target hook to

Re: [PATCH] Support 64bit fma/fms/fnma/fnms under avx512vl.

2021-09-21 Thread Uros Bizjak via Gcc-patches
On Wed, Sep 22, 2021 at 7:09 AM liuhongt wrote: > > Hi: > fma/fms/fnma/fnmsv2sf4 are defined only under (TARGET_FMA || TARGET_FMA4). > The patch extend the expanders to TARGET_AVX512VL. > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Ok for trunk? > > gcc/ChangeLog: > >

Re: [PATCH v2] ipa-inline: Add target info into fn summary [PR102059]

2021-09-21 Thread Kewen.Lin via Gcc-patches
on 2021/9/21 下午5:39, Richard Biener wrote: > On Tue, Sep 21, 2021 at 11:31 AM Martin Jambor wrote: >> >> Hi, >> >> On Tue, Sep 21 2021, Kewen.Lin wrote: >>> on 2021/9/17 下午7:26, Martin Jambor wrote: On Fri, Sep 17 2021, Kewen.Lin wrote: >> [...] > > Sorry that I failed to use 16 bit-f

Re: [PATCH] rs6000: Parameterize some const values for density test

2021-09-21 Thread Kewen.Lin via Gcc-patches
on 2021/9/21 下午8:03, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 21, 2021 at 01:47:19PM +0800, Kewen.Lin wrote: >> on 2021/9/18 上午6:26, Segher Boessenkool wrote: + if (data->nloads > (unsigned int) rs6000_density_load_num_threshold +&& load_pct > (unsigned int) rs6000_densit

[PATCH] [i386] Adjust testcase.

2021-09-21 Thread liuhongt via Gcc-patches
Pushed to trunk. gcc/testsuite/ChangeLog: * gcc.target/i386/pr92658-avx512f.c: Refine testcase. * gcc.target/i386/pr92658-avx512vl.c: Adjust scan-assembler, only v2di->v2qi truncate is not supported, v4di->v4qi should be supported. --- gcc/testsuite/gcc.target/i38

Re: [PATCH] ipa-fnsummary: Remove inconsistent bp_pack_value

2021-09-21 Thread Kewen.Lin via Gcc-patches
on 2021/9/21 下午2:16, Richard Biener wrote: > On Tue, Sep 21, 2021 at 4:09 AM Kewen.Lin wrote: >> >> Hi Richi, >> >> Thanks for the review! >> >> on 2021/9/17 下午6:04, Richard Biener wrote: >>> On Fri, Sep 17, 2021 at 12:03 PM Richard Biener >>> wrote: On Fri, Sep 17, 2021 at 11:43 AM Kew

[PATCH] Support 64bit fma/fms/fnma/fnms under avx512vl.

2021-09-21 Thread liuhongt via Gcc-patches
Hi: fma/fms/fnma/fnmsv2sf4 are defined only under (TARGET_FMA || TARGET_FMA4). The patch extend the expanders to TARGET_AVX512VL. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for trunk? gcc/ChangeLog: * config/i386/mmx.md (fmav2sf4): Extend to AVX512 fma. (f

Re: [PATCH 49/62] AVX512FP16: Add vfcmaddcph/vfmaddcph/vfcmulcph/vfmulcph

2021-09-21 Thread Hongtao Liu via Gcc-patches
I'm going to check in 7 patches. [PATCH 49/62] AVX512FP16: Add vfcmaddcph/vfmaddcph/vfcmulcph/vfmulcph [PATCH 50/62] AVX512FP16: Add testcases for vfcmaddcph/vfmaddcph/vfcmulcph/vfmulcph. [PATCH 51/62] AVX512FP16: Add vfcmaddcsh/vfmaddcsh/vfcmulcsh/vfmulcsh. [PATCH 52/62] AVX512FP16: Add testcases

Re: [PATCH v6] c++: Fix cp_tree_equal for template value args using dependent sizeof/alignof/noexcept expressions

2021-09-21 Thread Jason Merrill via Gcc-patches
On 9/21/21 21:19, Barrett Adair wrote: This revision adds description and ChangeLog entries. Applied, thanks! I wrapped some too-long lines in the commit message and tweaked the whitespace in the code slightly. Jason

Re: [PATCH] x86: Clean up gcc.target/i386/auto-init-* tests

2021-09-21 Thread H.J. Lu via Gcc-patches
On Mon, Sep 20, 2021 at 8:19 AM H.J. Lu wrote: > > On Fri, Sep 17, 2021 at 10:32 AM Qing Zhao via Gcc-patches > wrote: > > > > > > > > > On Sep 17, 2021, at 11:59 AM, Jakub Jelinek wrote: > > > > > > On Fri, Sep 17, 2021 at 04:55:22PM +, Qing Zhao wrote: > > >> This is the patch to fix gcc.t

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-09-21 Thread Fāng-ruì Sòng via Gcc-patches
On Tue, Sep 21, 2021 at 6:57 PM H.J. Lu wrote: > > On Tue, Sep 21, 2021 at 9:16 AM Uros Bizjak wrote: > > > > On Mon, Sep 20, 2021 at 8:20 PM Fāng-ruì Sòng via Gcc-patches > > wrote: > > > > > > PING^5 https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html > > > > > > On Sat, Sep 4, 2021

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-09-21 Thread H.J. Lu via Gcc-patches
On Tue, Sep 21, 2021 at 9:16 AM Uros Bizjak wrote: > > On Mon, Sep 20, 2021 at 8:20 PM Fāng-ruì Sòng via Gcc-patches > wrote: > > > > PING^5 https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html > > > > On Sat, Sep 4, 2021 at 12:11 PM Fāng-ruì Sòng wrote: > > > > > > PING^4 https://gcc.

Re: [PATCH] Allow different vector types for stmt groups

2021-09-21 Thread Hongtao Liu via Gcc-patches
On Tue, Sep 21, 2021 at 10:55 PM H.J. Lu wrote: > > On Mon, Sep 20, 2021 at 5:15 AM Richard Biener via Gcc-patches > wrote: > > > > This allows vectorization (in practice non-loop vectorization) to > > have a stmt participate in different vector type vectorizations. > > It allows us to remove vec

Re: [PATCH] Enable auto-vectorization at O2 with very-cheap cost model.

2021-09-21 Thread Hongtao Liu via Gcc-patches
On Mon, Sep 20, 2021 at 4:13 AM Martin Sebor wrote: > > On 9/16/21 3:03 AM, Hongtao Liu via Gcc-patches wrote: > > On Thu, Sep 16, 2021 at 4:23 PM Richard Biener via Gcc-patches > > wrote: > >> > >> On Thu, 16 Sep 2021, liuhongt wrote: > >> > >>> Ping > >>> rebased on latest trunk. > >>> > >>> gc

[PATCH] libiberty: prevent null dereferencing on dlang_type

2021-09-21 Thread Luís Ferreira
This patch prevents dereferencing a null reference on a crafted malformed magled name, often causing SIGSEGV to be raised. Signed-off-by: Luís Ferreira --- libiberty/d-demangle.c | 2 +- libiberty/testsuite/d-demangle-expected | 5 - 2 files changed, 5 insertions(+), 2 delet

[PATCH v6] c++: Fix cp_tree_equal for template value args using dependent sizeof/alignof/noexcept expressions

2021-09-21 Thread Barrett Adair via Gcc-patches
This revision adds description and ChangeLog entries. Thanks, Barrett From d256074a17f16ce5a90653e1d907a8dbc105aa43 Mon Sep 17 00:00:00 2001 From: Barrett Adair Date: Wed, 15 Sep 2021 15:26:22 -0500 Subject: [PATCH] c++: fix template instantiation comparison in redeclarations This change fixes a

[PATCH] libiberty: prevent buffer overflow when decoding user input

2021-09-21 Thread Luís Ferreira
Currently a stack/heap overflow may happen if a crafted mangle is maliciously used to cause denial of service, such as intentional crashes by accessing a reserved memory space. Signed-off-by: Luís Ferreira --- libiberty/d-demangle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

Re: [PATCH] c++: fix wrong fixit hints for misspelled typedef [PR77565]

2021-09-21 Thread Michel Morin via Gcc-patches
On Tue, Sep 21, 2021 at 5:24 AM Jason Merrill wrote: > > On 9/17/21 13:31, Michel Morin wrote: > > On Fri, Sep 17, 2021 at 3:23 AM Jason Merrill wrote: > >> > >> On 9/16/21 11:50, Michel Morin wrote: > >>> On Thu, Sep 16, 2021 at 5:44 AM Jason Merrill wrote: > > On 9/14/21 04:29, Miche

Re: [PATCH] warn for more impossible null pointer tests [PR102103]

2021-09-21 Thread Martin Sebor via Gcc-patches
On 9/21/21 3:40 PM, Jason Merrill wrote: On 9/17/21 12:02, Martin Sebor wrote: On 9/8/21 2:06 PM, Jason Merrill wrote: On 9/2/21 7:53 PM, Martin Sebor wrote: @@ -4622,28 +4622,94 @@ warn_for_null_address (location_t location, tree op, tsubst_flags_t complain)     if (!warn_address     ||

Re: [PATCH] c++: concept-ids and value-dependence [PR102412]

2021-09-21 Thread Jason Merrill via Gcc-patches
On 9/21/21 09:30, Patrick Palka wrote: case TEMPLATE_ID_EXPR: - return concept_definition_p (TREE_OPERAND (expression, 0)); + return concept_definition_p (TREE_OPERAND (expression, 0)) + && any_dependent_template_arguments_p (TREE_OPERAND (expression, 1)); Hmm, do we even

Re: [PATCH v5] c++: Fix cp_tree_equal for template value args using dependent sizeof/alignof/noexcept expressions

2021-09-21 Thread Jason Merrill via Gcc-patches
On 9/21/21 19:07, Barrett Adair wrote: Thanks for the feedback. I addressed the concerns raised in the previous patch. I ran tests with this, after rebasing: ../gcc/configure --prefix=$MYPREFIX --enable-languages=c++ --enable-bootstrap --enable-checking=yes,extra --disable-multilib && make -

[PATCH v5] c++: Fix cp_tree_equal for template value args using dependent sizeof/alignof/noexcept expressions

2021-09-21 Thread Barrett Adair via Gcc-patches
Thanks for the feedback. I addressed the concerns raised in the previous patch. I ran tests with this, after rebasing: ../gcc/configure --prefix=$MYPREFIX --enable-languages=c++ --enable-bootstrap --enable-checking=yes,extra --disable-multilib && make -j6 && make check I have the "expected" fail

[PATCH v2 3/3] reassoc: Test rank biasing

2021-09-21 Thread Ilya Leoshkevich via Gcc-patches
Add both positive and negative tests. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/reassoc-46.c: New test. * gcc.dg/tree-ssa/reassoc-46.h: Common code for new tests. * gcc.dg/tree-ssa/reassoc-47.c: New test. * gcc.dg/tree-ssa/reassoc-48.c: New test. * gcc.dg/

[PATCH v2 2/3] reassoc: Propagate PHI_LOOP_BIAS along single uses

2021-09-21 Thread Ilya Leoshkevich via Gcc-patches
PR tree-optimization/49749 introduced code that shortens dependency chains containing loop accumulators by placing them last on operand lists of associative operations. 456.hmmer benchmark on s390 could benefit from this, however, the code that needs it modifies loop accumulator before using it, a

[PATCH v2 1/3] reassoc: Do not bias loop-carried PHIs early

2021-09-21 Thread Ilya Leoshkevich via Gcc-patches
Biasing loop-carried PHIs during the 1st reassociation pass interferes with reduction chains and does not bring measurable benefits, so do it only during the 2nd reassociation pass. gcc/ChangeLog: * passes.def (pass_reassoc): Rename parameter to early_p. * tree-ssa-reassoc

[PATCH v2 0/3] reassoc: Propagate PHI_LOOP_BIAS along single uses

2021-09-21 Thread Ilya Leoshkevich via Gcc-patches
This is an update to my very old patch with the review comments addressed. Bootstrapped and regtested x86_64-redhat-linux, ppc64le-redhat-linux and s390x-redhat-linux. v1: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548785.html Changes in v2: * Disable PHI biasing in the early pass instan

Re: Merge from trunk to gccgo branch

2021-09-21 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 09e18d113b3c3dae896ac1a8ad1e0087adbb153b to the gccgo branch. Ian

[PATCH] rs6000: Add psabi diagnostic for C++ zero-width bit field ABI change (PR102024)

2021-09-21 Thread Bill Schmidt via Gcc-patches
Hi! Previously zero-width bit fields were removed from structs, so that otherwise homogeneous aggregates were treated as such and passed in FPRs and VSRs. This was incorrect behavior per the ELFv2 ABI. Now that these fields are no longer being removed, we generate the correct parameter passing c

[PATCH] Objective-C: fix class_ro layout for non-LP64

2021-09-21 Thread Matt Jacobson via Gcc-patches
Fix class_ro layout for non-LP64. On LP64, the requisite padding is added at a lower level. For non-LP64, this fixes binary compatibility with clang-built classes/runtimes. Tested by examining the generated assembly for a class_ro in both cases (and in the case of clang), for both x86_64 (64-bi

Re: [RFC/PATCH] C++ constexpr vs. floating point exceptions.

2021-09-21 Thread Marc Glisse
On Tue, 21 Sep 2021, Jason Merrill via Gcc-patches wrote: On Tue, Sep 21, 2021 at 4:30 PM Joseph Myers wrote: On Tue, 21 Sep 2021, Jakub Jelinek via Gcc-patches wrote: On Tue, Sep 21, 2021 at 02:15:59PM +0100, Roger Sayle wrote: Can you double check? Integer division by zero is undefined,

Re: [PATCH] warn for more impossible null pointer tests [PR102103]

2021-09-21 Thread Jason Merrill via Gcc-patches
On 9/17/21 12:02, Martin Sebor wrote: On 9/8/21 2:06 PM, Jason Merrill wrote: On 9/2/21 7:53 PM, Martin Sebor wrote: @@ -4622,28 +4622,94 @@ warn_for_null_address (location_t location, tree op, tsubst_flags_t complain)     if (!warn_address     || (complain & tf_warning) == 0     || c_

libgo patch committed: set runtime.GOROOT at build time

2021-09-21 Thread Ian Lance Taylor via Gcc-patches
This patch changes libto to set runtime.GOROOT value at build time. In Go 1.17 the gc toolchain changed to set runtime.GOROOT in cmd/link (previously it was runtime/internal/sys.GOROOT). This patch does the same in libgo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mai

Re: [RFC/PATCH] C++ constexpr vs. floating point exceptions.

2021-09-21 Thread Jason Merrill via Gcc-patches
On Tue, Sep 21, 2021 at 4:30 PM Joseph Myers wrote: > On Tue, 21 Sep 2021, Jakub Jelinek via Gcc-patches wrote: > > > On Tue, Sep 21, 2021 at 02:15:59PM +0100, Roger Sayle wrote: > > > Can you double check? Integer division by zero is undefined, but > isn't floating point > > > division by zero

Re: [RFC/PATCH] C++ constexpr vs. floating point exceptions.

2021-09-21 Thread Joseph Myers
On Tue, 21 Sep 2021, Jakub Jelinek via Gcc-patches wrote: > On Tue, Sep 21, 2021 at 02:15:59PM +0100, Roger Sayle wrote: > > Can you double check? Integer division by zero is undefined, but isn't > > floating point > > division by zero defined by the appropriate IEEE standards? > > https://eel.

Re: [PATCH V3 0/6] Initial support for AVX512FP16

2021-09-21 Thread Iain Sandoe
Hello Joseph, > On 21 Sep 2021, at 21:11, Joseph Myers wrote: > > On Fri, 3 Sep 2021, Iain Sandoe wrote: > >> given that: >> >> a) this fixes Darwin x86-64 bootstrap which has been broken for more than 24h >> b) the patch is now Darwin-local. > > Actually, it's not Darwin-local. It uses __MA

Re: [PATCH V3 0/6] Initial support for AVX512FP16

2021-09-21 Thread Joseph Myers
On Fri, 3 Sep 2021, Iain Sandoe wrote: > given that: > > a) this fixes Darwin x86-64 bootstrap which has been broken for more than 24h > b) the patch is now Darwin-local. Actually, it's not Darwin-local. It uses __MACH__, which is also defined for Hurd. And because sfp-machine.h gets included

[Patch] Fortran: Improve -Wmissing-include-dirs warnings [PR55534]

2021-09-21 Thread Tobias Burnus
While the previous patch fixed -Wno-missing-include-dirs and sorted out some inconsistencies with libcpp warnings, it had two issues: * Some superfluous warnings were printed, e.g. for gfortran nonexisting/file.f90 there was a warning about include path "nonexisting" not existing and twic

[PATCH][testsuite][aarch64]: Fix gcc.target/aarch64/auto-init-* tests.

2021-09-21 Thread Qing Zhao via Gcc-patches
Hi, This is the patch to fix gcc.target/aarch64/auto-init-* tests. I have tested the change on aarch64-linux with make check-gcc RUNTESTFLAGS='--target_board=unix\{-mabi=lp64,-mabi=ilp32,-mabi=lp64/-fstack-clash-protection/-fstack-protector-all,-mabi=ilp32/-fstack-clash-protection/-fstack-pro

[r12-3722 Regression] FAIL: gfortran.dg/write_to_null.F90 -Os (test for excess errors) on Linux/x86_64

2021-09-21 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 417ea5c02cef7f000e66d1af22b066c2c1cda047 is the first bad commit commit 417ea5c02cef7f000e66d1af22b066c2c1cda047 Author: Tobias Burnus Date: Tue Sep 21 08:27:00 2021 +0200 Fortran: Fix -Wno-missing-include-dirs handling [PR55534] caused FAIL: gfortran.dg/achar_6.F90 -O

Re: [HELP Needed!][PATCH] testsuite: Fix gcc.target/aarch64/auto-init-* tests.

2021-09-21 Thread Qing Zhao via Gcc-patches
By using a newer version of dejagnu on aarch64, the options in the testing cases are appended AFTER the options in the RUNTESTFLAGS. As a result, my patch to the aarch64/auto-init-* tests passed without issue. Thanks a lot for your help. Qing > On Sep 20, 2021, at 9:36 AM, Richard Earnshaw >

Re: [PATCH 2/7] Do not query SCEV in range_of_phi unless dominators are available.

2021-09-21 Thread Aldy Hernandez via Gcc-patches
On 9/21/21 7:05 PM, Andrew MacLeod wrote: On 9/21/21 12:53 PM, Aldy Hernandez wrote: SCEV won't work without dominators and we can get called without dominators from debug_ranger. Another option would be to rename scev_initialized_p to something like scev_available_p and move the check there

Re: [PATCH 2/7] Do not query SCEV in range_of_phi unless dominators are available.

2021-09-21 Thread Andrew MacLeod via Gcc-patches
On 9/21/21 12:53 PM, Aldy Hernandez wrote: SCEV won't work without dominators and we can get called without dominators from debug_ranger. Another option would be to rename scev_initialized_p to something like scev_available_p and move the check there. For now, this will do. Committed. gcc/Cha

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

2021-09-21 Thread Tamar Christina via Gcc-patches
Hi honored reviewer, Thanks for the feedback, I hereby submit the new patch: > > Note: This patch series is working incrementally towards generating the > most > > efficient code for this and other loops in small steps. > > It looks like this could be done in the vectoriser via an extensio

[PATCH 5/7] path solver: Remove useless code.

2021-09-21 Thread Aldy Hernandez via Gcc-patches
Committed. gcc/ChangeLog: * gimple-range-path.cc (path_range_query::range_defined_in_block): Remove useless code. --- gcc/gimple-range-path.cc | 4 1 file changed, 4 deletions(-) diff --git a/gcc/gimple-range-path.cc b/gcc/gimple-range-path.cc index b3040c9bc00..b86a76fa74b

[PATCH 2/7] Do not query SCEV in range_of_phi unless dominators are available.

2021-09-21 Thread Aldy Hernandez via Gcc-patches
SCEV won't work without dominators and we can get called without dominators from debug_ranger. Another option would be to rename scev_initialized_p to something like scev_available_p and move the check there. For now, this will do. Committed. gcc/ChangeLog: * gimple-range-fold.cc (fold

[PATCH 1/7] Allocate non_null_ref tables at creation.

2021-09-21 Thread Aldy Hernandez via Gcc-patches
Preallocating the space is slightly cheaper than calling safe_grow_cleared. Committed. gcc/ChangeLog: * gimple-range-cache.cc (non_null_ref::non_null_ref): Use create and quick_grow_cleared instead of safe_grow_cleared. --- gcc/gimple-range-cache.cc | 4 ++-- 1 file changed, 2 i

[PATCH 4/7] path solver: Add relation support.

2021-09-21 Thread Aldy Hernandez via Gcc-patches
This patch adds relational support to the path solver. It uses a path_oracle that keeps track of relations within a path which are augmented by relations on entry to the path. With it, range_of_stmt, range_of_expr, and friends can give relation aware answers. Committed. gcc/ChangeLog:

[PATCH 3/7] Move postfold_gcond_edges into fur_source.

2021-09-21 Thread Aldy Hernandez via Gcc-patches
The code registering outgoing edges from a cond is living in fold_using_range, which makes it difficult to be called from other places. Also, it refuses to register relations on the outgoing destinations that have more than one predecessor. This latter issue is a problem because we would like to

[PATCH 6/7] path solver: Add related SSAs to solvable set.

2021-09-21 Thread Aldy Hernandez via Gcc-patches
The path solver takes an initial set of SSA names which are deemed interesting. These are then solved along the path. Adding any copies of said SSA names to the list of interesting names yields significantly better results. This patch adds said copies to the already provided list. Currently thi

[PATCH 7/7] path solver: Use ranger to solve unknowns.

2021-09-21 Thread Aldy Hernandez via Gcc-patches
The default behavior for the path solver is to resort to VARYING when the range for an unknown SSA is outside the given path. This is both cheap and fast, but fails to get a significant amount of ranges that traditionally the DOM and VRP threaders could get. This patch uses the ranger to resolve

[PATCH 0/7] Add ability to resolve unknowns to path solver.

2021-09-21 Thread Aldy Hernandez via Gcc-patches
The default behavior for the path solver is to resort to VARYING when the range for a requested SSA is outside the given path. This is both cheap and fast, but fails to get a significant amount of ranges that traditionally the DOM and VRP threaders got. This patchset improves the path solver such

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

2021-09-21 Thread Andre Vieira (lists) via Gcc-patches
Hi Richi, Thanks for the review, see below some questions. On 21/09/2021 13:30, Richard Biener wrote: On Fri, 17 Sep 2021, Andre Vieira (lists) wrote: Hi all, This patch adds the ability to define a target hook to unroll the main vectorized loop. It also introduces --param's vect-unroll and

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-09-21 Thread Uros Bizjak via Gcc-patches
On Mon, Sep 20, 2021 at 8:20 PM Fāng-ruì Sòng via Gcc-patches wrote: > > PING^5 https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html > > On Sat, Sep 4, 2021 at 12:11 PM Fāng-ruì Sòng wrote: > > > > PING^4 https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html > > > > One major d

[Ada] Add some comments in init.c about the lynx178 signal handler

2021-09-21 Thread Pierre-Marie de Rodat
__gnat_error_handler for LynxOS in init.c only accepts a "sig" argument. Add some comments to explain why, and how to fix it with a change to a kernel build parameter. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * init.c (__gnat_error_handler) [LynxOS]: Add a comment about

[Ada] Rename "optional" node subtypes that allow Empty

2021-09-21 Thread Pierre-Marie de Rodat
This patch renames the new Opt_... subtypes in Sinfo.Nodes and Einfo.Entities to end with the suffix "_Id" for homogeneity with other subtypes of Node_Id and Entity_Id. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gen_il-gen.adb (Put_Opt_Subtype): Add suffix.diff --git a/

[Ada] Spurious dynamic accessibility check on allocator

2021-09-21 Thread Pierre-Marie de Rodat
This patch corrects an issue in the compiler whereby an anonymous access class-wide type allocator with default initialization has spuriously generated dynamic accessibility checks associated with the construct - leading to spurious runtime accessibility failures. Additionally, this patch corrects

[Ada] SCOs: generate 'P' decisions for [Type_]Invariant pragmas

2021-09-21 Thread Pierre-Marie de Rodat
Those pragmas should be dealt with in the same way as their equivalent aspects. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * par_sco.adb (Traverse_One): Add support for pragma Invariant / Type_Invariant.diff --git a/gcc/ada/par_sco.adb b/gcc/ada/par_sco.adb --- a/

[Ada] Add "optional" node subtypes that allow Empty

2021-09-21 Thread Pierre-Marie de Rodat
This patch adds new Opt_... subtypes to Sinfo.Nodes and Einfo.Entities. The predicates say "Opt_N_Declaration = Empty" rather than "No (Opt_N_Declaration)" because No is not visible. It can't be made visible with "with Atree;", because that would introduce cycles. It could be made visible by moving

[Ada] bindgen: support additional features on targets suppressing the standard lib

2021-09-21 Thread Pierre-Marie de Rodat
For targets that suppress the standard library, the binder can now set the default stack size and enable stack checking when GCC stack limit are used. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * bindgen.adb (Gen_Adainit): For targets that suppress the standard li

[Ada] Fix regression in ACATS bdd2006 and bdd2007

2021-09-21 Thread Pierre-Marie de Rodat
This fix is not strictly necessary to pass these ACATS tests, but this improves the error message, and avoids updating expected outputs. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Stream_Size): Print message about allowed stream sizes even if other

[Ada] Set related expression for external DISCR symbols in Build_Temporary

2021-09-21 Thread Pierre-Marie de Rodat
This is required for CodePeer to use a better name for a variable, or a constant created by GNAT. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_util.adb (Build_Temporary): In case of an external DISCR symbol, set the related expression for CodePeer so that a mo

[Ada] Crash on build of Initialization procedure for derived container

2021-09-21 Thread Pierre-Marie de Rodat
This patch fixes a compiler abort on the construction of the initialization procedure for a private type completed by a derived container type whose element type is another container with controlled components with trivial initializations, Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada

[Ada] Cleanup old VxWorks in Makefile.rtl

2021-09-21 Thread Pierre-Marie de Rodat
The sections titled "PowerPC and e500v2 VxWorks 653" and "VxWorksae / VxWorks 653 for x86 (vxsim)" in Makefile.rtl are removed since they are no longer used. Also remove the relevant packages. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * Makefile.rtl: Remove unused VxWork

[Ada] Add assertions to Uintp (UI_Is_In_Int_Range)

2021-09-21 Thread Pierre-Marie de Rodat
This completes the previous change that added assertions to Uintp. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * uintp.ads, uintp.adb (UI_Is_In_Int_Range): Change the type of the formal parameter to Valid_Uint. Remove code that preserved the previous behavi

[Ada] Remove if_expression

2021-09-21 Thread Pierre-Marie de Rodat
Replace an if_expression with an if_statement, because codepeer is tripping over the if_expression. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_eval.adb (Fold_Shift): Replace an if_expression with an if_statement.diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/se

[Ada] Add assertions to Uintp

2021-09-21 Thread Pierre-Marie de Rodat
Add appropriate assertions to the operations in Uintp. Most operations disallow No_Uint. Division disallows Uint_0 on the right, and so on. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * uintp.ads, uintp.adb: Add assertions. (Ubool, Opt_Ubool): New "boolean" subtyp

[Ada] Small optimization to DWARF 5 mode in System.Dwarf_Line

2021-09-21 Thread Pierre-Marie de Rodat
There is no need to fetch every string from the .debug_line_str section. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-dwalin.adb (To_File_Name): Fetch only the last string from the .debug_line_str section. (Symbolic_Address.Set_Result): Likewise.

[Ada] Follow-up tweaks to System.Dwarf_Line

2021-09-21 Thread Pierre-Marie de Rodat
This fixes a couple of thinkos in the previous change. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-dwalin.adb (Skip_Form): Fix cases of DW_FORM_addrx and DW_FORM_implicit_const. Replace Constraint_Error with Dwarf_Error.diff --git a/gcc/ada/lib

[Ada] exp_pakd.adb: work around spurious Codepeer warnings

2021-09-21 Thread Pierre-Marie de Rodat
Codepeer erroneously emits a warning for this if expression. Replacing it with a statement is enough to make the problem disappear. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_pakd.adb (Expand_Packed_Not): Replace expression with statement.diff --git a/gcc/ad

[Ada] rtems: add 128bit support for aarch64

2021-09-21 Thread Pierre-Marie de Rodat
Add 128BITS integer support for aarch64-rtems6. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * Makefile.rtl (aarch64-rtems*): Add GNATRTL_128BIT_PAIRS to the LIBGNAT_TARGET_PAIRS list and also GNATRTL_128BIT_OBJS to the EXTRA_GNATRTL_NONTASKING_OBJS list.dif

[Ada] Fix ignored dynamic predicates specified through "predicate" aspect

2021-09-21 Thread Pierre-Marie de Rodat
Before this patch, GNAT would ignore dynamic predicates specified through the "predicate" pragma when attempting to evaluate expressions. This would result in incorrect behavior in cases like the following: subtype SS is String (1 .. 4) with Predicate => SS (2) = 'e'; pragma Assert ("" i

[Ada] Presence of abstract operator function causes resolution problems

2021-09-21 Thread Pierre-Marie de Rodat
The declaration of an abstract function with an operator designator can result in removing a nonhomographic user-defined operator as a possible interpretation in an overloaded expression, leading to an error about mismatched types. The condition for marking an interpretation as being a predefined

[Ada] Interface behaves differently from abstract tagged null

2021-09-21 Thread Pierre-Marie de Rodat
When the result expression of a simple-return-statement is a type conversion, and the tag of the expression differs from the tag of the specific nonlimited return type, the frontend silently skips ensuring that the tag of the returned object is that of the result type. Tested on x86_64-pc-linux-gn

[Ada] Clean up uses of Esize and RM_Size

2021-09-21 Thread Pierre-Marie de Rodat
This patch updates calls to Esize and RM_Size so they will work with the new representation of "unknown" (i.e. "not yet set"). The old representation is "Uint_0". The new one will be "initial zero bits". The new representation is not yet installed; we are still using Uint_0. A future change wil

[Ada] Enforce legality rule for Predicate_Failure aspect specifications

2021-09-21 Thread Pierre-Marie de Rodat
If a Predicate_Failure aspect is specified for a type or subtype, Ada requires that either the Static_Predicate aspect or the Dynamic_Predicate aspect must also be specified for that same type or subtype. [The GNAT-defined Predicate aspect can also be used to meet this requirement.] The point is th

[Ada] Refactor sort procedures of doubly linked list containers

2021-09-21 Thread Pierre-Marie de Rodat
In earlier work, a performance problem was addressed by rewriting Ada.Containers.Doubly_Linked_Lists.Generic_Sorting in a-cdlili.adb. It turned out that the very-slow-in-some-cases Sort algorithm formerly used there was duplicated in 4 other units: the Bounded, Formal, Indefinite, and Restricted v

[Ada] Update comment for Error_Msg_Internal

2021-09-21 Thread Pierre-Marie de Rodat
When Error_Msg_Internal parameters Sptr and Optr were renamed to Span and Opan, its comment has not been updated. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * errout.adb (Error_Msg_Internal): Fix references to Sptr and Optr in comment; fix grammar of "low-level" w

[Ada] Exception raised on empty file in GNATprove mode

2021-09-21 Thread Pierre-Marie de Rodat
Adapt computation of indexes in buffer for outputting error messages to avoid an index out-of-bound exception on an empty file in GNATprove mode. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * errout.adb (Get_Line_End): Do not allow the result to go past the end of

[Ada] Refine patch for spurious link error involving discriminated types

2021-09-21 Thread Pierre-Marie de Rodat
This patch handles properly the case of a Component_Definition appearing in a Component_Declaration. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch3.adb (Process_Discriminant_Expressions): If the constraint is for a Component_Definition that appears in a

[Ada] Remove "with GNAT.OS_Lib;" from libgnat/a-stbufi.ads

2021-09-21 Thread Pierre-Marie de Rodat
...and replace with System.OS_Lib, because we don't want things under Ada to depend on GNAT. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-stbufi.ads, libgnat/a-stbufi.adb: Change all occurrences of GNAT.OS_Lib to System.OS_Lib.diff --git a/gcc/ada/libgna

Re: [PATCH] Allow different vector types for stmt groups

2021-09-21 Thread H.J. Lu via Gcc-patches
On Mon, Sep 20, 2021 at 5:15 AM Richard Biener via Gcc-patches wrote: > > This allows vectorization (in practice non-loop vectorization) to > have a stmt participate in different vector type vectorizations. > It allows us to remove vect_update_shared_vectype and replace it > by pushing/popping STM

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

2021-09-21 Thread Richard Biener via Gcc-patches
This makes defaults.h choose DWARF2_DEBUG if PREFERRED_DEBUGGING_TYPE is not specified by the target and errors out if DWARF DWARF is not supported. It also makes us warn when STABS is enabled but not the preferred debugging type and removes the corresponding diagnostic from the Ada frontend. The

Re: [PATCH] darwin: support aarch64-darwin host

2021-09-21 Thread Yuta Saito via Gcc-patches
Hello Iain, Thank you for taking a look at my patch. > > Hello Yuta > > thanks for your patch and interest. > > > On 17 Sep 2021, at 16:26, Yuta Saito via Gcc-patches > > wrote: > > > Currently, building gcc for aarch64-darwin host fails due to missing > > host_hooks definition. > > > > This pa

RE: [RFC/PATCH] C++ constexpr vs. floating point exceptions.

2021-09-21 Thread Roger Sayle
Thanks. It's a minefield. I'm regretting using a division by zero example (as it unintentionally drags in the whole undefined behaviour thing). How about my recently added g++.dg/pr88173-1.C, is the following valid, i.e. const, if ordered comparisons against NaNs should raise an exception with

Re: [COMMITTED] Use EDGE_EXECUTABLE in ranger and return UNDEFINED for those edges.

2021-09-21 Thread Andrew MacLeod via Gcc-patches
On 9/21/21 9:32 AM, Richard Biener wrote: On Tue, Sep 21, 2021 at 2:57 PM Andrew MacLeod wrote: On 9/21/21 2:14 AM, Richard Biener wrote: On Tue, Sep 21, 2021 at 8:09 AM Richard Biener wrote: On Tue, Sep 21, 2021 at 12:01 AM Andrew MacLeod via Gcc-patches wrote: The patch sets the EXECUTAB

Re: [RFC/PATCH] C++ constexpr vs. floating point exceptions.

2021-09-21 Thread Xi Ruoyao via Gcc-patches
On Tue, 2021-09-21 at 21:38 +0800, Xi Ruoyao via Gcc-patches wrote: > BTW the "correct" way to get a NaN in C++ seems: > > #include > constexpr double my_nan = std::numeric_limits::quiet_NaN(); Sorry, we were discussing inf, not NaN... Then constexpr double my_inf = std::numeric_limits::infin

Re: [RFC/PATCH] C++ constexpr vs. floating point exceptions.

2021-09-21 Thread Xi Ruoyao via Gcc-patches
On Tue, 2021-09-21 at 14:15 +0100, Roger Sayle wrote: > > Can you double check?  Integer division by zero is undefined, but isn't > floating point > division by zero defined by the appropriate IEEE standards? It's an undefined behavior in C++ standard. Even if we assume C++ *was* IEEE-754 confor

Re: [RFC/PATCH] C++ constexpr vs. floating point exceptions.

2021-09-21 Thread Richard Biener via Gcc-patches
On Tue, Sep 21, 2021 at 3:07 PM Xi Ruoyao via Gcc-patches wrote: > > On Tue, 2021-09-21 at 12:41 +0100, Roger Sayle wrote: > > > > I was wondering if I may ask the C++ language experts for their > > opinion > > on whether (potential) floating point exceptions/traps can be ignored > > in constant e

Re: [COMMITTED] Use EDGE_EXECUTABLE in ranger and return UNDEFINED for those edges.

2021-09-21 Thread Richard Biener via Gcc-patches
On Tue, Sep 21, 2021 at 2:57 PM Andrew MacLeod wrote: > > On 9/21/21 2:14 AM, Richard Biener wrote: > > On Tue, Sep 21, 2021 at 8:09 AM Richard Biener > > wrote: > >> On Tue, Sep 21, 2021 at 12:01 AM Andrew MacLeod via Gcc-patches > >> wrote: > >>> > >>> The patch sets the EXECUTABLE property on

[PATCH] c++: concept-ids and value-dependence [PR102412]

2021-09-21 Thread Patrick Palka via Gcc-patches
Here since uses_template_parms returns true for all concept-ids, when a concept-id is used as a default template argument then during deduction the default argument is considered dependent even after substitution, which leads to deduction failure (from type_unification_real). This patch fixes this

Re: [RFC/PATCH] C++ constexpr vs. floating point exceptions.

2021-09-21 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 21, 2021 at 02:15:59PM +0100, Roger Sayle wrote: > Can you double check? Integer division by zero is undefined, but isn't > floating point > division by zero defined by the appropriate IEEE standards? https://eel.is/c++draft/expr.mul#4 doesn't make the division by zero behavior condi

RE: [RFC/PATCH] C++ constexpr vs. floating point exceptions.

2021-09-21 Thread Roger Sayle
Can you double check? Integer division by zero is undefined, but isn't floating point division by zero defined by the appropriate IEEE standards? Roger -- -Original Message- From: Xi Ruoyao Sent: 21 September 2021 14:07 To: Roger Sayle ; 'GCC Patches' Subject: Re: [RFC/PATCH] C++

Re: [RFC/PATCH] C++ constexpr vs. floating point exceptions.

2021-09-21 Thread Xi Ruoyao via Gcc-patches
On Tue, 2021-09-21 at 12:41 +0100, Roger Sayle wrote: > > I was wondering if I may ask the C++ language experts for their > opinion > on whether (potential) floating point exceptions/traps can be ignored > in constant expressions; this is related to PR c++/96862.  I think my > question boils down

Re: [COMMITTED] Use EDGE_EXECUTABLE in ranger and return UNDEFINED for those edges.

2021-09-21 Thread Andrew MacLeod via Gcc-patches
On 9/21/21 2:14 AM, Richard Biener wrote: On Tue, Sep 21, 2021 at 8:09 AM Richard Biener wrote: On Tue, Sep 21, 2021 at 12:01 AM Andrew MacLeod via Gcc-patches wrote: The patch sets the EXECUTABLE property on edges like VRP does, and then removes that flag when an edge is determined to be un

RE: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-21 Thread Roger Sayle
That define_insn is making my eyes bleed! I think that's the most convincing argument I've ever read on gcc-patches, and I can see now what Segher is so opposed to. My new goal is to add sh_mul and uh_mul as RTL expression codes for highpart multiplication, so that that pattern will go away [an

Re: [Patch] Fortran: Add gfc_simple_for_loop aux function

2021-09-21 Thread Thomas Koenig via Gcc-patches
Hi Tobias, This patch adds a useful auxiliary function to generate a loop. Looks good to me (and there are probably quite a few places where this could be useful). Best regards Thomas

Re: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-21 Thread Segher Boessenkool
On Tue, Sep 21, 2021 at 08:24:04AM +0200, Richard Biener wrote: > On Tue, Sep 21, 2021 at 6:18 AM Jeff Law via Gcc-patches > wrote: > > If we were catching the scenario which led to the creation of (subreg > > (truncate)) in combine and instead of creating (subreg (truncate)) we > > instead create

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

2021-09-21 Thread Richard Biener via Gcc-patches
On Fri, 17 Sep 2021, Andre Vieira (lists) wrote: > Hi all, > > This patch adds the ability to define a target hook to unroll the main > vectorized loop. It also introduces --param's vect-unroll and > vect-unroll-reductions to control this through a command-line. I found this > useful to experimen

  1   2   >