Re: [PATCH v2 2/4] Refactor loop_version

2021-10-31 Thread Xionghu Luo via Gcc-patches
On 2021/10/29 19:52, Richard Biener wrote: > On Wed, 27 Oct 2021, Xionghu Luo wrote: > >> loop_version currently does lv_adjust_loop_entry_edge >> before it loopifys the copy inserted on the header. This patch moves >> the condition generation later and thus we have four pieces to help >>

Re: [PATCH] Fortran: Diagnose all operands with constraint violations [PR101337]

2021-10-31 Thread Sandra Loosemore
On 10/31/21 1:50 PM, Bernhard Reutner-Fischer wrote: From: Bernhard Reutner-Fischer PR fortran/101337 gcc/fortran/ChangeLog: * resolve.c (resolve_operator): Continue resolving on op2 error. --- The PR rightfully notes that we only diagnose the right operator and do not check

[PATCH] Check number of iterations for test cases pr101145

2021-10-31 Thread Jiufu Guo via Gcc-patches
PR101145 is supporting if the number of iterations can be calculated for the 'until wrap' condition. Current test cases are checking if the loop can be vectorized, if a loop can be vectorized then the number of interations is known. While it would be better to check the loop's number of

[PATCH] Adjust testcase for O2 vect.

2021-10-31 Thread liuhongt via Gcc-patches
> (I'm assuming the difference is due to some architectural > constraints as opposed to arbitrary limitations in the code There're 2 difference: 1. target support unaligned store or not. 2. target support move by piece or not(which will enable block move in gimple level). Updated patch. Adjust

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-10-31 Thread Fāng-ruì Sòng via Gcc-patches
On Fri, Oct 8, 2021 at 10:57 AM Fāng-ruì Sòng wrote: > > On Fri, Sep 24, 2021 at 11:29 AM H.J. Lu wrote: > > > > On Fri, Sep 24, 2021 at 11:14 AM Fāng-ruì Sòng wrote: > > > > > > On Fri, Sep 24, 2021 at 10:41 AM H.J. Lu wrote: > > > > > > > > On Fri, Sep 24, 2021 at 10:29 AM Fāng-ruì Sòng >

[PATCH] contrib: testsuite-management: Update to be python3 compatible

2021-10-31 Thread Bernhard Reutner-Fischer via Gcc-patches
From: Bernhard Reutner-Fischer contrib/ChangeLog: * testsuite-management/validate_failures.py: 2to3 --- Tested with python-3.9.7 where it now works again. --- .../testsuite-management/validate_failures.py | 38 +-- 1 file changed, 19 insertions(+), 19 deletions(-)

Re: [PATCH,FORTRAN 28/29] Free type-bound procedure structs

2021-10-31 Thread Bernhard Reutner-Fischer via Gcc-patches
On Fri, 29 Oct 2021 22:09:07 +0200 Bernhard Reutner-Fischer wrote: > On Fri, 29 Oct 2021 21:36:26 +0200 > Harald Anlauf via Gcc-patches wrote: > > > Dear Bernhard, all, > > > > Am 29.10.21 um 02:05 schrieb Bernhard Reutner-Fischer via Gcc-patches: > > > > >> diff --git

[PATCH] PR fortran/102715 - [12 Regression] ICE in gfc_simplify_transpose, at fortran/simplify.c:8184

2021-10-31 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, the fix for initialization of DT arrays caused an apparent regression for cases where inconsistent ranks were used in such an initialization. This caused either an ICE in subsequent uses of these arrays, or showed up in valgrind as invalid reads, all of which seemed to be

[PATCH] Fortran: Diagnose all operands with constraint violations [PR101337]

2021-10-31 Thread Bernhard Reutner-Fischer via Gcc-patches
From: Bernhard Reutner-Fischer PR fortran/101337 gcc/fortran/ChangeLog: * resolve.c (resolve_operator): Continue resolving on op2 error. --- The PR rightfully notes that we only diagnose the right operator and do not check the left operator if the right one was faulty.

[committed] d: Fix regressing test failures on ix86-solaris2.11

2021-10-31 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a regression caused by r12-3986. The _Unwind_Exception struct had its alignment adjusted to 16-bytes in order to be compatible with other languages, however malloc() on Solaris X86 is not guaranteed to allocate memory aligned to 16-bytes as well. Bootstrapped and regression

[committed] d: Fix pr96435.d failing on SPARC and HPPA

2021-10-31 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes test failures seen on SPARC and HPPA targets. The value used to initialize the integer field in the union didn't account for BigEndian targets running this code. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, as well as sparc-sun-solaris2.11. Committed

Re: [PATCH] Fortran: Silence -Wmaybe-uninitialized warning

2021-10-31 Thread Bernhard Reutner-Fischer via Gcc-patches
On Sun, 31 Oct 2021 18:05:36 +0100 Thomas Koenig wrote: > Hi Bernhard, > > > gcc/fortran/ChangeLog: > > > > * resolve.c (resolve_fl_procedure): Initialize > > allocatable_or_pointer. > > Looking at the code, it is clear that this is a false > positive, or a false maybe, but the

[PATCH] Fortran: Missing error with IMPLICIT none (external) [PR100972]

2021-10-31 Thread Bernhard Reutner-Fischer via Gcc-patches
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: PR fortran/100972 * decl.c (gfc_match_implicit_none): Fix typo in warning. * resolve.c (resolve_unknown_f): Reject external procedures without explicit EXTERNAL attribute whe IMPLICIT none (external)

Re: [PATCH] Fortran: Silence -Wmaybe-uninitialized warning

2021-10-31 Thread Thomas Koenig via Gcc-patches
Hi Bernhard, gcc/fortran/ChangeLog: * resolve.c (resolve_fl_procedure): Initialize allocatable_or_pointer. Looking at the code, it is clear that this is a false positive, or a false maybe, but the semantics of C/C++ may well indicate that sym->result could change, although

[PATCH] Fortran: Silence -Wmaybe-uninitialized warning

2021-10-31 Thread Bernhard Reutner-Fischer via Gcc-patches
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: * resolve.c (resolve_fl_procedure): Initialize allocatable_or_pointer. --- fortran/resolve.c: In function 'bool resolve_fl_procedure(gfc_symbol*, int)': fortran/resolve.c:13391:7: warning: 'allocatable_or_pointer' may be

Re: [PATCH v2] c-format: Add -Wformat-int-precision option [PR80060]

2021-10-31 Thread Daniil Stas via Gcc-patches
On Sun, 10 Oct 2021 23:10:20 + Daniil Stas wrote: > This option is enabled by default when -Wformat option is enabled. A > user can specify -Wno-format-int-precision to disable emitting > warnings when passing an argument of an incompatible integer type to > a 'd', 'i', 'o', 'u', 'x', or 'X'

[committed] wwwdocs: gcc-11: Switch dwarfstd.org to https

2021-10-31 Thread Gerald Pfeifer
Business as usual... Gerald --- htdocs/gcc-11/changes.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html index 6dec8856..c81f0e82 100644 --- a/htdocs/gcc-11/changes.html +++ b/htdocs/gcc-11/changes.html @@ -142,7

[PATCH] Fortran: Remove double spaces in open() warning [PR99884]

2021-10-31 Thread Bernhard Reutner-Fischer via Gcc-patches
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: PR fortran/99884 * io.c (check_open_constraints): Remove double spaces. --- gcc/fortran/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index

[committed] wwwdocs: gcc-6: Update link to Intel's pcommit deprecation

2021-10-31 Thread Gerald Pfeifer
This complements the same change I made to the GCC 5 release notes a bit ago. Gerald --- htdocs/gcc-6/changes.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/gcc-6/changes.html b/htdocs/gcc-6/changes.html index e95aabbe..6dd86d83 100644 ---

[PATCH] Add -fopt-builtin optimization option

2021-10-31 Thread Keith Packard via Gcc-patches
This option (enabled by default) controls optimizations which convert a sequence of operations into an equivalent sequence that includes calls to builtin functions. Typical cases here are code which matches memcpy, calloc, sincos. The -ftree-loop-distribute-patterns flag only covers converting

[PATCH Take #2] x86_64: Expand ashrv1ti (and PR target/102986)

2021-10-31 Thread Roger Sayle
Very many thanks to Jakub for proof-reading my patch, catching my silly GNU-style mistakes and making excellent suggestions. This revised patch incorporates all of his feedback, and has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. 2021-10-31

[PATCH 21/21] [crypto]: add testcases for Zbkx

2021-10-31 Thread siyu
From: SiYu Wu --- gcc/testsuite/gcc.target/riscv/Zbkx.c | 17 + 1 file changed, 17 insertions(+) create mode 100644 gcc/testsuite/gcc.target/riscv/Zbkx.c diff --git a/gcc/testsuite/gcc.target/riscv/Zbkx.c b/gcc/testsuite/gcc.target/riscv/Zbkx.c new file mode 100644 index

[PATCH 12/21] [crypto]: add machine description for Zksh

2021-10-31 Thread siyu
From: SiYu Wu --- gcc/common/config/riscv/riscv-common.c | 2 ++ gcc/config/riscv/crypto.md | 19 +++ gcc/config/riscv/riscv-opts.h | 2 ++ 3 files changed, 23 insertions(+) diff --git a/gcc/common/config/riscv/riscv-common.c

[PATCH 09/21] [crypto]: add machine description for Zksed

2021-10-31 Thread siyu
From: SiYu Wu --- gcc/common/config/riscv/riscv-common.c | 2 ++ gcc/config/riscv/crypto.md | 21 + gcc/config/riscv/riscv-opts.h | 2 ++ 3 files changed, 25 insertions(+) diff --git a/gcc/common/config/riscv/riscv-common.c

[PATCH 13/21] [crypto]: add builtins for Zksh

2021-10-31 Thread siyu
From: SiYu Wu --- gcc/config/riscv/riscv-builtins-crypto.def | 6 ++ gcc/config/riscv/riscv-builtins.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/gcc/config/riscv/riscv-builtins-crypto.def b/gcc/config/riscv/riscv-builtins-crypto.def index 47bfff80f2e..abef52057a0

[PATCH 14/21] [crypto]: add testcases for Zksh

2021-10-31 Thread siyu
From: SiYu Wu Co-authored-by: Shihua Liao --- gcc/testsuite/gcc.target/riscv/Zksh-sm3.c | 15 +++ 1 file changed, 15 insertions(+) create mode 100644 gcc/testsuite/gcc.target/riscv/Zksh-sm3.c diff --git a/gcc/testsuite/gcc.target/riscv/Zksh-sm3.c

[PATCH 18/21] change z* subset assert to allow "zk"

2021-10-31 Thread siyu
From: SiYu Wu --- gcc/common/config/riscv/riscv-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/common/config/riscv/riscv-common.c b/gcc/common/config/riscv/riscv-common.c index 4ed2a1f662a..e801fa149a2 100644 --- a/gcc/common/config/riscv/riscv-common.c +++

[PATCH 20/21] [crypto]: add builtins for Zbkx

2021-10-31 Thread siyu
From: SiYu Wu --- gcc/config/riscv/riscv-builtins-crypto.def | 6 ++ gcc/config/riscv/riscv-builtins.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/gcc/config/riscv/riscv-builtins-crypto.def b/gcc/config/riscv/riscv-builtins-crypto.def index abef52057a0..e8c36789fe5

[PATCH 17/21] [crypto]: add implied defines of Zk, Zkn and Zks

2021-10-31 Thread siyu
From: SiYu Wu --- gcc/common/config/riscv/riscv-common.c | 16 +++- gcc/config/riscv/arch-canonicalize | 16 +++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/gcc/common/config/riscv/riscv-common.c b/gcc/common/config/riscv/riscv-common.c index

[PATCH 16/21] [crypto]: add option defines for Zbkb, Zbkc and Zbkx

2021-10-31 Thread siyu
From: SiYu Wu --- gcc/common/config/riscv/riscv-common.c | 6 ++ gcc/config/riscv/riscv-opts.h | 6 ++ 2 files changed, 12 insertions(+) diff --git a/gcc/common/config/riscv/riscv-common.c b/gcc/common/config/riscv/riscv-common.c index b2b85180ffe..18c09591c42 100644 ---

[PATCH 11/21] [crypto]: add testcases for Zksed

2021-10-31 Thread siyu
From: SiYu Wu Co-authored-by: Shihua Liao --- gcc/testsuite/gcc.target/riscv/Zksed-sm4.c | 17 + 1 file changed, 17 insertions(+) create mode 100644 gcc/testsuite/gcc.target/riscv/Zksed-sm4.c diff --git a/gcc/testsuite/gcc.target/riscv/Zksed-sm4.c

[PATCH 10/21] [crypto]: add builtins for Zksed

2021-10-31 Thread siyu
From: SiYu Wu --- gcc/config/riscv/riscv-builtins-crypto.def | 6 ++ gcc/config/riscv/riscv-builtins.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/gcc/config/riscv/riscv-builtins-crypto.def b/gcc/config/riscv/riscv-builtins-crypto.def index ca008929927..47bfff80f2e

[PATCH 19/21] [crypto]: add machine description for Zbkx

2021-10-31 Thread siyu
From: SiYu Wu NOTE: The Zbkx should be implemented in bitmanip's Zbp, but since zbp is not included in the bitmanip spec v1.0, and crypto's v1.0 release will earlier than bitmanip's next release, so for now we implementing it here. --- gcc/config/riscv/crypto.md | 27 +++

[PATCH 03/21] [crypto]: add machine description for Zknd and Zkne

2021-10-31 Thread siyu
From: SiYu Wu --- gcc/common/config/riscv/riscv-common.c | 6 ++ gcc/config/riscv/crypto.md | 129 + gcc/config/riscv/riscv-opts.h | 6 ++ gcc/config/riscv/riscv.md | 2 + gcc/config/riscv/riscv.opt | 3 + 5 files

[PATCH 15/21] [crypto]: add option defines for Zkr and Zkt

2021-10-31 Thread siyu
From: SiYu Wu --- gcc/common/config/riscv/riscv-common.c | 3 +++ gcc/config/riscv/riscv-opts.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/gcc/common/config/riscv/riscv-common.c b/gcc/common/config/riscv/riscv-common.c index 8f4f4472690..b2b85180ffe 100644 ---

[PATCH 08/21] [crypto]: add testcases for Zknh

2021-10-31 Thread siyu
From: SiYu Wu Co-authored-by: Shihua Liao --- gcc/testsuite/gcc.target/riscv/Zknh-sha256.c | 27 + .../gcc.target/riscv/Zknh-sha512-01.c | 40 +++ .../gcc.target/riscv/Zknh-sha512-02.c | 28 + 3 files changed, 95 insertions(+) create

[PATCH 02/21] Fix attribute bugs due to zicsr/zifencei

2021-10-31 Thread siyu
From: jiawei --- gcc/config/riscv/arch-canonicalize | 2 ++ gcc/config/riscv/riscv.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/config/riscv/arch-canonicalize b/gcc/config/riscv/arch-canonicalize index c7df3c8a313..e2feb7e85cd 100755 ---

[PATCH 00/21] RISC-V: add gcc support for Scalar Cryptography v1.0.0-rc5

2021-10-31 Thread siyu
From: SiYu Wu This patch add gcc backend support for RISC-V Scalar Cryptography Extension (k-ext), including machine description, builtins defines and testcases for each k-ext's subset. A note about Zbkx: The Zbkx should be implemented in bitmanip's Zbp, but since zbp is not included in the

[PATCH 06/21] [crypto]: add machine description for Zknh

2021-10-31 Thread siyu
From: SiYu Wu --- gcc/common/config/riscv/riscv-common.c | 2 + gcc/config/riscv/crypto.md | 123 + gcc/config/riscv/riscv-opts.h | 2 + 3 files changed, 127 insertions(+) diff --git a/gcc/common/config/riscv/riscv-common.c

[PATCH 04/21] [crypto]: add builtins for Zknd and Zkne

2021-10-31 Thread siyu
From: SiYu Wu --- gcc/config/riscv/riscv-builtins-crypto.def | 34 ++ gcc/config/riscv/riscv-builtins.c | 15 ++ gcc/config/riscv/riscv-ftypes.def | 3 ++ 3 files changed, 52 insertions(+) create mode 100644

[PATCH 07/21] [crypto]: add builtins for Zknh

2021-10-31 Thread siyu
From: SiYu Wu --- gcc/config/riscv/riscv-builtins-crypto.def | 24 ++ gcc/config/riscv/riscv-builtins.c | 2 ++ gcc/config/riscv/riscv-ftypes.def | 3 +++ 3 files changed, 29 insertions(+) diff --git a/gcc/config/riscv/riscv-builtins-crypto.def

[PATCH 01/21] Fix riscv_expand_block_move

2021-10-31 Thread siyu
From: linsinan1995 <47880367+linsinan1...@users.noreply.github.com> --- gcc/config/riscv/riscv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c index 6aef3d3a6cf..0529b6d60cd 100644 --- a/gcc/config/riscv/riscv.c +++

[PATCH 05/21] [crypto]: add testcases for Zknd and Zkne

2021-10-31 Thread siyu
From: SiYu Wu Co-authored-by: Shihua Liao --- gcc/testsuite/gcc.target/riscv/Zknd-aes-01.c | 15 +++ gcc/testsuite/gcc.target/riscv/Zknd-aes-02.c | 21 +++ gcc/testsuite/gcc.target/riscv/Zkne-aes-01.c | 15 +++ gcc/testsuite/gcc.target/riscv/Zkne-aes-02.c | 27

[PATCH v4] Fix ICE when mixing VLAs and statement expressions [PR91038]

2021-10-31 Thread Uecker, Martin
Hi Jason, here is the fourth version of the patch. I followed your suggestion and now make this transformation sooner in pointer_int_sum. I also added a check to only do this transformation when the pointer is not a VAR_DECL, which avoids it in the most common cases where it is not necessary.