[PATCH] sccvn: Consider def BB in rpo_vn_valueize [PR98464]

2020-12-30 Thread Kewen.Lin via Gcc-patches
Hi, As PR98464 shows, this patch is to make rpo_vn_valueize consider the definition basic block of name, to sync with what we do in function eliminate_stmt. Bootstrapped/regtested on powerpc64le-linux-gnu P9. Full SPEC2017 build/run passed on P9. BR, Kewen gcc/ChangeLog: PR tree-optim

Re: [PATCH, libstdc++] Add to pch header.

2020-12-30 Thread Jonathan Wakely via Gcc-patches
On 30/12/20 17:54 -0500, Edward Smith-Rowland wrote: I think we want to add source_location to the precompiled header... Ok if it passes testing? OK, thanks.

[committed] d: Mangled Symbols now back reference types and identifiers

2020-12-30 Thread Iain Buclaw via Gcc-patches
Hi, With this patch, symbols with `extern(D)` linkage are now mangled using back references to types and identifiers if these occur more than once in the mangled name as emitted before. This reduces symbol length, especially with chained expressions of templated functions with Voldemort return ty

libgo patch committed: Update to Go1.16beta1 release

2020-12-30 Thread Ian Lance Taylor via Gcc-patches
I've committed a patch to update libgo to the Go 1.16beta1 release. This patch does not include support for the new //go:embed directive that will be available in Go 1.16.1 (https://golang.org/issue/41191) Support for that requires compiler changes, which will come later. As usual with these big

[PATCH, libstdc++] Add to pch header.

2020-12-30 Thread Edward Smith-Rowland via Gcc-patches
I think we want to add source_location to the precompiled header... Ok if it passes testing? Ed Smith-Rowland p Description: Binary data

[patch, shared coarrays, committed] Fix

2020-12-30 Thread Thomas Koenig via Gcc-patches
Hello world, I just committed the attached patch to the branch as https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=4726e39b0be3c0bc55e43d2d300f0d0b9529d883 . It is sometimes astonishing, if you shake code a bit, how many bugs came crawling out :-) Best regards Thomas Make STAT and E

[PATCH] i386: Remove unnecessary clobbers from combine splitters.

2020-12-30 Thread Uros Bizjak via Gcc-patches
There is no need for combine splitters to emit insn patterns with clobbers, the pass is smart enough to add clobbers to patterns as necessary. 2020-12-30 Uroš Bizjak gcc/ * config/i386/i386.md: Remove unnecessary clobbers from combine splitters. Bootstrapped and regression tested on x

[committed] d: Simplify quoting characters in deps_add_target

2020-12-30 Thread Iain Buclaw via Gcc-patches
Hi, The implementation of deps_add_target in d-lang.cc was based on what was present in libcpp. This patch synchronizes the escaping logic to match the current version. Bootstrapped and regression tested on x86_64-linux-gnu, committed to mainline. Regards Iain --- gcc/d/ChangeLog: * d

[committed] d: Give the result of evaluated expressions a location

2020-12-30 Thread Iain Buclaw via Gcc-patches
Hi, CST trees that were converted back to a D front-end AST node lost all location information of the original expression. With this patch, now this is propagated on to the literal expression. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards, Iain. ---

Re: [PATCH 3/3] arm: Auto-vectorization for MVE: vshr

2020-12-30 Thread Christophe Lyon via Gcc-patches
ping? On Thu, 17 Dec 2020 at 18:48, Christophe Lyon wrote: > > This patch enables MVE vshr instructions for auto-vectorization. New > MVE patterns are introduced that take a vector of constants as second > operand, all constants being equal. > > The existing mve_vshrq_n_ is kept, as it takes a s

Re: [PATCH 2/3] arm: Auto-vectorization for MVE: vshl

2020-12-30 Thread Christophe Lyon via Gcc-patches
ping? On Thu, 17 Dec 2020 at 18:48, Christophe Lyon wrote: > > This patch enables MVE vshlq instructions for auto-vectorization. > > The existing mve_vshlq_n_ is kept, as it takes a single > immediate as second operand, and is used by arm_mve.h. > > We move the vashl3 insn from neon.md to an expa

Re: [PATCH 1/3] arm: Add movmisalign patterns for MVE (PR target/97875)

2020-12-30 Thread Christophe Lyon via Gcc-patches
ping? On Thu, 17 Dec 2020 at 18:48, Christophe Lyon wrote: > > This patch adds new movmisalign_mve_load and store patterns for > MVE to help vectorization. They are very similar to their Neon > counterparts, but use different iterators and instructions. > > Indeed MVE supports less vectors modes

Re: [PATCH] i386: Optimize pmovmskb on inverted vector to inversion of pmovmskb result [PR98461]

2020-12-30 Thread Uros Bizjak via Gcc-patches
On Wed, Dec 30, 2020 at 10:23 AM Jakub Jelinek wrote: > > Hi! > > The following patch adds combine splitters to optimize: > - vpcmpeqd%ymm1, %ymm1, %ymm1 > - vpandn %ymm1, %ymm0, %ymm0 > vpmovmskb %ymm0, %eax > + notl%eax > etc. (for vectors with less t

[PATCH] fold-const: Avoid (cast) ((cast2) x p+ y) folding for -fsanitize=alignment [PR98206]

2020-12-30 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is diagnosed by UBSan as invalid, even when it is valid. We have a derived type Base2 at offset 1 with alignment 1 and do: (const Derived &) ((const Base2 *) this + -1) but the folder before ubsan in the FE gets a chance to instrument it optimizes that into: (const Deriv

[PATCH] i386: Optimize pmovmskb on inverted vector to inversion of pmovmskb result [PR98461]

2020-12-30 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch adds combine splitters to optimize: - vpcmpeqd%ymm1, %ymm1, %ymm1 - vpandn %ymm1, %ymm0, %ymm0 vpmovmskb %ymm0, %eax + notl%eax etc. (for vectors with less than 32 elements with xorl instead of notl). Bootstrapped/regtested on x

[PATCH] reassoc: Optimize x > 0x1fff || y > 0x1fff into (x | y) > 0x1fff [PR56719]

2020-12-30 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch adds an optimization mentioned in PR56719 #c8. We already have the x != 0 && y != 0 && z != 0 into (x | y | z) != 0 and x != -1 && y != -1 && y != -1 into (x & y & z) != -1 optimizations, this patch just extends that to x < C && y < C && z < C for power of two constants C i

[PATCH] c++: Fix ICE with __builtin_bit_cast [PR98469]

2020-12-30 Thread Jakub Jelinek via Gcc-patches
Hi! On the following testcase we ICE during constexpr evaluation (for warnings), because the IL has ADDR_EXPR of BIT_CAST_EXPR and ADDR_EXPR case asserts the result is not a CONSTRUCTOR. I've tried to force a temporary for those in call.c next to: if (convs->need_temporary_p ||