Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-07-20 Thread Richard Biener via Gcc-patches
On Wed, Jul 20, 2022 at 5:36 PM Prathamesh Kulkarni wrote: > > On Mon, 18 Jul 2022 at 11:57, Richard Biener > wrote: > > > > On Fri, Jul 15, 2022 at 3:49 PM Prathamesh Kulkarni > > wrote: > > > > > > On Thu, 14 Jul 2022 at 17:22, Richard Sandiford > > > wrote: > > > > > > > > Richard Biener w

[PATCH v2 2/3] LoongArch: Support split symbol.

2022-07-20 Thread Lulu Cheng
Add compilation option '-mexplicit-relocs', and if enable '-mexplicit-relocs' the symbolic address load instruction 'la.*' will be split into two instructions. This ckompilation option enabled by default. gcc/ChangeLog: * common/config/loongarch/loongarch-common.cc: Enable '-fsec

[PATCH v2 3/3] LoongArch: Modify the definition of the ASM_PREFERRED_EH_DATA_FORMAT macro.

2022-07-20 Thread Lulu Cheng
Some R_LARCH_64 in section .eh_frame will to generate R_LARCH_NONE, we change relocation to R_LARCH_32_PCREL from R_LARCH_64 in setction .eh_frame and not generate dynamic relocation for R_LARCH_32_PCREL. gcc/ChangeLog: * config/loongarch/loongarch.h (ASM_PREFERRED_EH_DATA_FORMAT):

[PATCH v2 1/3] LoongArch: Subdivision symbol type, add SYMBOL_PCREL support.

2022-07-20 Thread Lulu Cheng
1. Remove cModel type support other than normal. 2. The method that calls global functions from 'la.global + jirl' to 'bl' when build with '-fplt'. gcc/ChangeLog: * config/loongarch/constraints.md (a): Delete the constraint. (b): A constant call not local address. (h):

[PATCH v2 0/3] LoongArch: Modify the method of obtaining symbolic addresses.

2022-07-20 Thread Lulu Cheng
1. The original LA macro instruction is split into two instructions to obtain the address of the symbol if enable '-mexplicit-relocs'. 2. Currently, '-mcmodel=' only supports 'normal' mode, because other mode behaviors are not yet determined. This function is gradually improved by the subs

[PATCH] Remove setting -mblock-ops-vector-pair on power10.

2022-07-20 Thread Michael Meissner via Gcc-patches
Remove setting -mblock-ops-vector-pair on power10. Testing has shown that using the load vector pair and store vector pair instructions for block moves has some performance issues on power10. This patch does not set this option by default. If it is a win in other machines in the future, this fla

Re: [PATCH V3] Extend 16/32-bit vector bit_op patterns with (m, 0, i) alternative.

2022-07-20 Thread Uros Bizjak via Gcc-patches
On Thu, Jul 21, 2022 at 7:19 AM liuhongt wrote: > > And split it after reload. > > gcc/ChangeLog: > > PR target/106038 > * config/i386/mmx.md (3): New define_expand, it's > original "3". > (*3): New define_insn, it's original > "3" be extended to handle memo

[PATCH] RTEMS: Add -ftls-model=local-exec to multilibs

2022-07-20 Thread Sebastian Huber
Use the local-exec TLS model for all multilibs of all RTEMS targets with proper TLS support. gcc/ChangeLog: * config/arm/t-rtems (MULTILIB_EXTRA_OPTS): Define to use -ftls-model=local-exec. * config/i386/t-rtems (MULTILIB_EXTRA_OPTS): Likewise. * config/m68k/t-rtem

[PATCH V3] Extend 16/32-bit vector bit_op patterns with (m, 0, i) alternative.

2022-07-20 Thread liuhongt via Gcc-patches
And split it after reload. gcc/ChangeLog: PR target/106038 * config/i386/mmx.md (3): New define_expand, it's original "3". (*3): New define_insn, it's original "3" be extended to handle memory and immediate operand with ix86_binary_operator_ok. Also

Re: [RFC] RISC-V: Add support for RV64E/lp64e

2022-07-20 Thread jiawei
> gcc/ChangeLog > > * config.gcc (riscv): Accept rv64e and lp64e. > * config/riscv/arch-canonicalize: Likewise. > * config/riscv/riscv-c.cc (riscv_cpu_cpp_builtins): Likewise. > * config/riscv/riscv-opts.h (riscv_abi_type): Likewise. > * config/riscv/riscv.cc (riscv_option_override): Likewi

[committed] analyzer: bulletproof taint warnings against NULL m_arg

2022-07-20 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-1774-g742377ed0f0931. gcc/analyzer/ChangeLog: * sm-taint.cc (tainted_array_index::emit): Bulletproof against NULL m_arg. (tainted_array_index::describe_final_event): Likewise. (tai

[committed] analyzer: fix ICE on untracked decl_regions [PR106374]

2022-07-20 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-1773-ga6c192e80a87ef. gcc/analyzer/ChangeLog: PR analyzer/106374 * region.cc (decl_region::get_svalue_for_initializer): Bail out on untracked regions. gcc/testsuite/ChangeLog: PR

Mail delivery failed: returning message to sender

2022-07-20 Thread Mail Delivery System via Gcc-patches
This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: gcc-patches@gcc.gnu.org host gcc.gnu.org [8.43.85.97] SMTP error from remote ma

Ping: 2 libcpp patches

2022-07-20 Thread Lewis Hyatt via Gcc-patches
Hello- May I please ping these two preprocessor patches? For PR103902: https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596704.html For PR55971: https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596820.html Thanks! -Lewis

[committed 2/3] libstdc++: Fix std::common_iterator assignment [PR100823]

2022-07-20 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- This fixes the following conformance problems reported in the PR: - Move constructor and move assignment should be defined. - Copy assignment from a valueless object should be allowed. Assignment is completely rewritten by this patch, as the p

[committed 3/3] libstdc++: Fix std::common_iterator triviality [PR100823]

2022-07-20 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- This fixes the remaining problem reported in the PR, that the special members should be trivial. This can be done by constraining the non-trivial versions and adding defaulted overloads that will be used when the union members are trivial. Mak

[committed 1/3] libstdc++: Fix minor bugs in std::common_iterator

2022-07-20 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- The noexcept-specifier for some std::common_iterator constructors was incorrectly using an rvalue as the first argument of std::is_nothrow_assignable_v. This gave the wrong answer for some types, e.g. std::common_iterator, because an rvalue of s

Re: [PATCH, rs6000, v2] Cleanup some vstrir define_expand naming inconsistencies

2022-07-20 Thread Segher Boessenkool
On Tue, Jul 19, 2022 at 03:14:52PM -0500, will schmidt wrote: > This cleans up some of the naming around the vstrir and vstril > instruction definitions, with some cosmetic changes for consistency. Okay for trunk. Thanks! Segher

[committed] analyzer: update "tainted" state of RHS in comparisons [PR106373]

2022-07-20 Thread David Malcolm via Gcc-patches
Doing so fixes various false positives from -Wanalyzer-tainted-array-index at -O1 and above (e.g. seen on the Linux kernel) Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-1768-g5e830693dd3356. gcc/analyzer/ChangeLog: PR analyzer/106373 * sm-t

Re: Supporting RISC-V Vendor Extensions in the GNU Toolchain

2022-07-20 Thread Palmer Dabbelt
On Tue, 10 May 2022 17:01:26 PDT (-0700), Palmer Dabbelt wrote: [Sorry for cross-posting to a bunch of lists, I figured it'd be best to have all the discussions in one thread.] We currently only support what is defined by official RISC-V specifications in the various GNU toolchain projects. The

[PATCH, committed] Fortran: fix parsing of omp task affinity iterator clause [PR101330]

2022-07-20 Thread Harald Anlauf via Gcc-patches
Dear all, there was some left-over code - likely from development - that could lead to a compiler segfault when given invalid input. Steve found the offending line. Removing it solves the issue. The fix was acknowledged by Tobias in the PR. Regtested on x86_64-pc-linux-gnu. Pushed as: r13-176

Re: [PATCH] Adding three new function attributes for static analysis of file descriptors

2022-07-20 Thread Mir Immad via Gcc-patches
> Sorry to nitpick -- I assume stmt here refers to a call stmt ? > In that case, I suppose it'd be better to use const gcall *stmt ? Thanks for the catch, Prathamesh. Immad. On Wed, Jul 20, 2022 at 11:59 PM Prathamesh Kulkarni < prathamesh.kulka...@linaro.org> wrote: > On Wed, 20 Jul 2022 at

Re: [PATCH] Adding three new function attributes for static analysis of file descriptors

2022-07-20 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 20 Jul 2022 at 23:31, Immad Mir via Gcc-patches wrote: > > This patch adds three new function attributes to GCC that > are used for static analysis of usage of file descriptors: > > 1) __attribute__ ((fd_arg(N))): The attributes may be applied to a function > that > takes on open file des

Re: [PATCH] Adding three new function attributes for static analysis of file descriptors

2022-07-20 Thread David Malcolm via Gcc-patches
On Wed, 2022-07-20 at 23:29 +0530, Immad Mir wrote: > This patch adds three new function attributes to GCC that > are used for static analysis of usage of file descriptors: Thanks for the updated patch. Some very minor spelling/grammar/whitespace nits... > > 1) __attribute__ ((fd_arg(N))): Th

[PATCH] Adding three new function attributes for static analysis of file descriptors

2022-07-20 Thread Immad Mir via Gcc-patches
This patch adds three new function attributes to GCC that are used for static analysis of usage of file descriptors: 1) __attribute__ ((fd_arg(N))): The attributes may be applied to a function that takes on open file descriptor at refrenced argument N. It indicates that the passed filedescriptor

[r13-1762 Regression] FAIL: gcc.dg/pr56837.c scan-tree-dump-times optimized "memset ..c, 68, 16384.; " 1 on Linux/x86_64

2022-07-20 Thread skpandey--- via Gcc-patches
On Linux/x86_64, f9d4c3b45c5ed5f45c8089c990dbd4e181929c3d is the first bad commit commit f9d4c3b45c5ed5f45c8089c990dbd4e181929c3d Author: liuhongt Date: Tue Jul 19 17:24:52 2022 +0800 Lower complex type move to enable vectorization for complex type load&store. caused FAIL: gcc.dg/pr23911

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-07-20 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 18 Jul 2022 at 11:57, Richard Biener wrote: > > On Fri, Jul 15, 2022 at 3:49 PM Prathamesh Kulkarni > wrote: > > > > On Thu, 14 Jul 2022 at 17:22, Richard Sandiford > > wrote: > > > > > > Richard Biener writes: > > > > On Thu, Jul 14, 2022 at 9:55 AM Prathamesh Kulkarni > > > > wrote:

[PATCH V2] arm: add -static-pie support

2022-07-20 Thread Lance Fredrickson via Gcc-patches
This patch adds -static-pie support for the arm architecture. aarch64 had the appropriate code for handling -static-pie, so this just mirrors the code found there.  Tested with uclibc-ng and musl c-standard libraries to produce static-pie binaries.  Re-submitted with minor spell check fix.From

Re: [PATCH 2/2] Avoid registering __builtin_setjmp_receiver label twice [PR101347]

2022-07-20 Thread Alexander Monakov via Gcc-patches
On Wed, 20 Jul 2022, Eric Botcazou wrote: > > Eric is probably most familiar with this, but can you make sure to bootstrap > > and test this on a SJLJ EH target? I'm not sure --enable-sjlj-exceptions > > is well tested anywhere but on targets not supporting DWARF EH and the > > configury is a b

Re: [PATCH v2] ipa-visibility: Optimize TLS access [PR99619]

2022-07-20 Thread Alexander Monakov via Gcc-patches
Ping. On Thu, 7 Jul 2022, Alexander Monakov via Gcc-patches wrote: > From: Artem Klimov > > Fix PR99619, which asks to optimize TLS model based on visibility. > The fix is implemented as an IPA optimization: this allows to take > optimized visibility status into account (as well as avoid modi

[PING^3] nvptx: Allow '--with-arch' to override the default '-misa' (was: nvptx multilib setup)

2022-07-20 Thread Thomas Schwinge
Hi Tom! Ping. Grüße Thomas On 2022-07-13T10:42:44+0200, I wrote: > Hi Tom! > > Ping. > > > Grüße > Thomas > > > On 2022-07-05T16:59:23+0200, I wrote: >> Hi Tom! >> >> Ping. >> >> >> Grüße >> Thomas >> >> >> On 2022-06-15T23:18:10+0200, I wrote: >>> Hi Tom! >>> >>> On 2022-05-13T16:20:14+020

[PING^4] nvptx: forward '-v' command-line option to assembler, linker

2022-07-20 Thread Thomas Schwinge
Hi Tom! Ping. Grüße Thomas On 2022-07-13T10:41:23+0200, I wrote: > Hi Tom! > > Ping. > > > Grüße > Thomas > > > On 2022-07-05T16:58:54+0200, I wrote: >> Hi Tom! >> >> Ping. >> >> >> Grüße >> Thomas >> >> >> On 2022-06-07T17:41:16+0200, I wrote: >>> Hi! >>> >>> On 2022-05-30T09:06:21+0200, T

[PATCH] Improve SLP codegen, avoiding unnecessary TREE_ADDRESSABLE

2022-07-20 Thread Richard Biener via Gcc-patches
The following adjusts vectorizer code generation to avoid splitting out address increments for invariant addresses which causes objects to get TREE_ADDRESSABLE when not necessary. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vect-data-refs.cc (bump_vector_ptr): Retu

[PATCH] rs6000/test: Update some cases with -mdejagnu-tune

2022-07-20 Thread Kewen.Lin via Gcc-patches
Hi, As PR106345 shows, some test cases should be updated with -mdejagnu-tune, since their test points are sensitive to rs6000_tune, such as: group_ending_nop, loop align (ic), float conversion cost etc. This patch is to replace -mdejagnu-cpu with -mdejagnu-tune or append -mdejagnu-tune (keep the

Re: [PATCH] Fortran: error recovery on invalid array reference of non-array [PR103590]

2022-07-20 Thread Mikael Morin
Le 19/07/2022 à 23:34, Harald Anlauf a écrit : Committed: r13-1757-gf838d15641d256e21ffc126c3277b290ed743928 Thanks.

[PATCH] rs6000/test: Fix empty TU in some cases of effective targets

2022-07-20 Thread Kewen.Lin via Gcc-patches
Hi, As the failure of test case gcc.target/powerpc/pr92398.p9-.c in PR106345 shows, some test sources for some powerpc effective targets use empty translation unit wrongly. The test sources could go with options like "-ansi -pedantic-errors", then those effective target checkings will fail unexpe

[PATCH] rs6000: Suggest unroll factor for loop vectorization

2022-07-20 Thread Kewen.Lin via Gcc-patches
Hi, Commit r12-6679-g7ca1582ca60dc8 made vectorizer accept one unroll factor to be applied to vectorization factor when vectorizing the main loop, it would be suggested by target when doing costing. This patch introduces function determine_suggested_unroll_factor for rs6000 port, to make it be ab

Re: [COMMITTED] [PATCH 1/2] Remove recursion from range_from_dom.

2022-07-20 Thread Mikael Morin
Hello, I spotted a few nits. See below. Le 20/07/2022 à 00:10, Andrew MacLeod via Gcc-patches a écrit : diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc index da7b8055d42..20dd5ead3bc 100644 --- a/gcc/gimple-range-cache.cc +++ b/gcc/gimple-range-cache.cc @@ -1312,6 +1312,38 @

Re: [PATCH 2/2] Avoid registering __builtin_setjmp_receiver label twice [PR101347]

2022-07-20 Thread Eric Botcazou via Gcc-patches
> Eric is probably most familiar with this, but can you make sure to bootstrap > and test this on a SJLJ EH target? I'm not sure --enable-sjlj-exceptions > is well tested anywhere but on targets not supporting DWARF EH and the > configury is a bit odd suggesting the option is mostly ignored ... T

Re: [PATCH v2.1 3/4] aarch64: Consolidate simd type lookup functions

2022-07-20 Thread Richard Sandiford via Gcc-patches
Andrew Carlotti writes: > On Wed, Jul 13, 2022 at 05:36:04PM +0100, Richard Sandiford wrote: >> I like the part about getting rid of: >> >> static tree >> aarch64_simd_builtin_type (machine_mode mode, >> bool unsigned_p, bool poly_p) >> >> and the flow of the new function

Re: [PATCH] Move pass_cse_sincos after vectorizer.

2022-07-20 Thread Hongtao Liu via Gcc-patches
On Wed, Jul 20, 2022 at 3:59 PM Richard Biener via Gcc-patches wrote: > > On Wed, Jul 20, 2022 at 4:20 AM liuhongt wrote: > > > > __builtin_cexpi can't be vectorized since there's gap between it and > > vectorized sincos version(In libmvec, it passes a double and two > > double pointer and return

gcc-patches@gcc.gnu.org

2022-07-20 Thread Hongtao Liu via Gcc-patches
On Wed, Jul 20, 2022 at 4:00 PM Richard Biener via Gcc-patches wrote: > > On Wed, Jul 20, 2022 at 4:46 AM liuhongt wrote: > > > > > My original comments still stand (it feels like this should be more > > > generic). > > > Can we go the way lowering complex loads/stores first? A large part > > >

gcc-patches@gcc.gnu.org

2022-07-20 Thread Richard Biener via Gcc-patches
On Wed, Jul 20, 2022 at 4:46 AM liuhongt wrote: > > > My original comments still stand (it feels like this should be more > > generic). > > Can we go the way lowering complex loads/stores first? A large part > > of the testcases > > added by the patch should pass after that. > > This is the patc

Re: [PATCH] Move pass_cse_sincos after vectorizer.

2022-07-20 Thread Richard Biener via Gcc-patches
On Wed, Jul 20, 2022 at 4:20 AM liuhongt wrote: > > __builtin_cexpi can't be vectorized since there's gap between it and > vectorized sincos version(In libmvec, it passes a double and two > double pointer and returns nothing.) And it will lose some > vectorization opportunity if sin & cos are opti

Re: [PATCH 2/2] Avoid registering __builtin_setjmp_receiver label twice [PR101347]

2022-07-20 Thread Richard Biener via Gcc-patches
On Tue, Jul 19, 2022 at 5:17 PM Alexander Monakov via Gcc-patches wrote: > > The testcase in the PR demonstrates how it is possible for one > __builtin_setjmp_receiver label to appear in > nonlocal_goto_handler_labels list twice (after the block with > __builtin_setjmp_setup referring to it was du

Re: [PATCH 1/2] Remove unused remove_node_from_expr_list

2022-07-20 Thread Richard Biener via Gcc-patches
On Tue, Jul 19, 2022 at 5:16 PM Alexander Monakov via Gcc-patches wrote: > > This function remains unused since remove_node_from_insn_list was cloned > from it. OK. > gcc/ChangeLog: > > * rtl.h (remove_node_from_expr_list): Remove declaration. > * rtlanal.cc (remove_node_from_exp

Re: [committed] .gitignore: do not ignore config.h

2022-07-20 Thread Richard Biener via Gcc-patches
On Tue, Jul 19, 2022 at 4:09 PM Alexander Monakov via Gcc-patches wrote: > > GCC does not support in-tree builds at the moment, so .gitignore > concealing artifacts of accidental in-tree ./configure run may cause > confusion. Un-ignore config.h, which is known to break the build. OK > ChangeLog:

Re: [PATCH V2] Extend 16/32-bit vector bit_op patterns with (m, 0, i) alternative.

2022-07-20 Thread Hongtao Liu via Gcc-patches
On Wed, Jul 20, 2022 at 3:18 PM Uros Bizjak wrote: > > On Wed, Jul 20, 2022 at 8:54 AM Hongtao Liu wrote: > > > > On Wed, Jul 20, 2022 at 2:18 PM Uros Bizjak wrote: > > > > > > On Wed, Jul 20, 2022 at 8:14 AM Uros Bizjak wrote: > > > > > > > > On Wed, Jul 20, 2022 at 4:37 AM Hongtao Liu wrote:

Re: [PATCH] doc: Clarify FENV_ACCESS pragma semantics WRT `-ftrapping-math'

2022-07-20 Thread Richard Biener via Gcc-patches
On Tue, Jul 19, 2022 at 2:24 PM Maciej W. Rozycki wrote: > > Our documentation indicates that it is the `-frounding-math' invocation > option that controls whether we respect what the FENV_ACCESS pragma > would imply, should we implement it, regarding the floating point > environment. It is only

Re: [PATCH V2] Extend 16/32-bit vector bit_op patterns with (m, 0, i) alternative.

2022-07-20 Thread Uros Bizjak via Gcc-patches
On Wed, Jul 20, 2022 at 8:54 AM Hongtao Liu wrote: > > On Wed, Jul 20, 2022 at 2:18 PM Uros Bizjak wrote: > > > > On Wed, Jul 20, 2022 at 8:14 AM Uros Bizjak wrote: > > > > > > On Wed, Jul 20, 2022 at 4:37 AM Hongtao Liu wrote: > > > > > > > > On Tue, Jul 19, 2022 at 5:37 PM Uros Bizjak wrote: