Re: [PATCH v2] RISC-V: Set the natural size of constant vector mask modes to one RVV data vector.

2023-06-19 Thread juzhe.zh...@rivai.ai
LGTM. Thanks! juzhe.zh...@rivai.ai From: Li Xu Date: 2023-06-20 14:46 To: gcc-patches CC: kito.cheng; palmer; juzhe.zhong; Li Xu Subject: [PATCH v2] RISC-V: Set the natural size of constant vector mask modes to one RVV data vector. If reinterpret vnx2bi as vnx16qi, vnx16qi must occupy no more

[PATCH v2] RISC-V: Set the natural size of constant vector mask modes to one RVV data vector.

2023-06-19 Thread Li Xu
If reinterpret vnx2bi as vnx16qi, vnx16qi must occupy no more of the underlying registers than vnx2bi. Consider this following case: void test_vreinterpret_v_b64_i8m1 (uint8_t *in, int8_t *out) { vbool64_t vmask = __riscv_vlm_v_b64 (in, 2); vint8m1_t vout = __riscv_vreinterpret_v_b64_i8m1 (vma

Re: [PATCH] [i386] Reject too large vectors for partial vector vectorization

2023-06-19 Thread Hongtao Liu via Gcc-patches
On Mon, Jun 19, 2023 at 8:35 PM Richard Biener via Gcc-patches wrote: > > The following works around the lack of the x86 backend making the > vectorizer compare the costs of the different possible vector > sizes the backed advertises through the vector_modes hook. When > enabling masked epilogues

Re: [PATCH] RISC-V: Set the natural size of constant vector mask modes to one RVV data vector.

2023-06-19 Thread juzhe.zh...@rivai.ai
Good catch ! Thanks for fixing this. Some nit coments: Could you add some comments above. like: /* RVV mask modes always consume a single register. */ if (GET_MODE_CLASS (mode) == MODE_VECTOR_BOOL) return BYTES_PER_RISCV_VECTOR; If reinterpret vnx2bi as vnx16bi, vnx16bi must occupy no mor

[PATCH] RISC-V: Set the natural size of constant vector mask modes to one RVV data vector.

2023-06-19 Thread Li Xu
If reinterpret vnx2bi as vnx16bi, vnx16bi must occupy no more of the underlying registers than vnx2bi. Consider this following case: void test_vreinterpret_v_b64_i8m1 (uint8_t *in, int8_t *out) { vbool64_t vmask = __riscv_vlm_v_b64 (in, 2); vint8m1_t vout = __riscv_vreinterpret_v_b64_i8m1 (vma

Re: [PATCHv3, rs6000] Add two peephole2 patterns for mr. insn

2023-06-19 Thread Kewen.Lin via Gcc-patches
Hi Haochen, on 2023/6/13 16:49, HAO CHEN GUI wrote: > Hi, > This patch adds two peephole2 patterns which help convert certain insn > sequences to "mr." instruction. These insn sequences can't be combined in > combine pass. > > Compared to last version, it changes the new mode iterator name fr

Re: [PATCH] VECT: Apply LEN_MASK_{LOAD,STORE} into vectorizer

2023-06-19 Thread juzhe.zh...@rivai.ai
Bootstrap && Regression on X86 no surprise difference. juzhe.zh...@rivai.ai From: juzhe.zhong Date: 2023-06-20 00:17 To: gcc-patches CC: rguenther; richard.sandiford; Ju-Zhe Zhong Subject: [PATCH] VECT: Apply LEN_MASK_{LOAD,STORE} into vectorizer From: Ju-Zhe Zhong This patch is apply LEN_M

Re: [PATCH] Do not allow "x + 0.0" to "x" optimization with -fsignaling-nans

2023-06-19 Thread Toru Kisuki via Gcc-patches
Hi Jeff, Thank you for taking care of it. Toru From: Jeff Law Sent: Monday, June 19, 2023 7:55 PM To: Richard Biener; Toru Kisuki Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Do not allow "x + 0.0" to "x" optimization with -fsignaling-nans [EXTERNAL] Ca

Re: [PATCH 2/2] cprop_hardreg: Enable propagation of the stack pointer if possible.

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/19/23 22:52, Tamar Christina wrote: It's a bit hackish, but could we reject the stack pointer for operand1 in the stack-tie? And if we do so, does it help? Yeah this one I had to defer until later this week to look at closer because what I'm wondering about is whether the optimizatio

RE: [PATCH 2/2] cprop_hardreg: Enable propagation of the stack pointer if possible.

2023-06-19 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Jeff Law > Sent: Tuesday, June 20, 2023 3:17 AM > To: Andrew Pinski ; Thiago Jung Bauermann > > Cc: Manolis Tsamis ; Philipp Tomsich > ; Richard Biener ; > Palmer Dabbelt ; Kito Cheng ; > gcc-patches@gcc.gnu.org; Tamar Christina > Subject: Re: [PATCH 2/2] cpr

[PATCH] Change fma_reassoc_width tuning for ampere1

2023-06-19 Thread Di Zhao OS via Gcc-patches
This patch enables reassociation of floating-point additions on ampere1. This brings about 1% overall benefit on spec2017 fprate cases. (There are minor regressions in 510.parest_r and 508.namd_r, analyzed here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110279 .) Bootstrapped and tested on aarc

[PATCH] RISC-V: Optimize codegen of VLA SLP

2023-06-19 Thread Juzhe-Zhong
Recently, I figure out a better approach in case of codegen for VLA stepped vector. Here is the detail descriptions: Case 1: void f (uint8_t *restrict a, uint8_t *restrict b) { for (int i = 0; i < 100; ++i) { a[i * 8] = b[i * 8 + 37] + 1; a[i * 8 + 1] = b[i * 8 + 37] + 2;

Re: [PATCH, rs6000] Add two peephole2 patterns for mr. insn

2023-06-19 Thread HAO CHEN GUI via Gcc-patches
HP, It makes sense. I will update the patch. Thanks Gui Haochen 在 2023/6/20 8:07, Hans-Peter Nilsson 写道: > On Tue, 30 May 2023, HAO CHEN GUI via Gcc-patches wrote: > >> +++ b/gcc/config/rs6000/rs6000.md >> @@ -7891,6 +7891,36 @@ (define_insn "*mov_internal2" >> (set_attr "dot" "yes") >>

Re: [PATCH ver 6] rs6000: Add builtins for IEEE 128-bit floating point values

2023-06-19 Thread Kewen.Lin via Gcc-patches
Hi Carl, on 2023/6/20 02:54, Carl Love wrote: > > Kewen, GCC maintainers: > > Version 6, Fixed missing change log entry. Changed builtin id names as > requested. Missed making the change on the last version. Fixed > comment in the three test cases. Reran regression suite on Power 10, > no re

Re: [PATCH 2/2] cprop_hardreg: Enable propagation of the stack pointer if possible.

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/19/23 17:48, Andrew Pinski wrote: On Mon, Jun 19, 2023 at 4:40 PM Andrew Pinski wrote: On Mon, Jun 19, 2023 at 9:58 AM Thiago Jung Bauermann via Gcc-patches wrote: Hello Manolis, Philipp Tomsich writes: On Thu, 8 Jun 2023 at 00:18, Jeff Law wrote: On 5/25/23 06:35, Manolis T

RE: Re: [PATCH] RISC-V: Fix fails of testcases

2023-06-19 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of ??? Sent: Tuesday, June 20, 2023 7:15 AM To: Jeff Law ; gcc-patches Cc: kito.cheng ; palmer ; rdapp.gcc Subject: Re: Re: [PATCH] RISC-V: Fix fails of testcases >> Presumably the target selector in the dg-d

RE: [PATCH] RISC-V: Add tuple vector mode psABI checking and simplify code

2023-06-19 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Tuesday, June 20, 2023 2:04 AM To: 钟居哲 ; 丁乐华 ; gcc-patches Cc: Wang, Yanzhang ; kito.cheng ; palmer ; rdapp.gcc Subject: Re: [PATCH] RISC-V: Add tuple vector mode psABI checking

Re: [committed] libstdc++: Optimize std::to_array for trivial types [PR110167]

2023-06-19 Thread Patrick Palka via Gcc-patches
On Fri, 9 Jun 2023, Jonathan Wakely via Libstdc++ wrote: > Tested powerpc64le-linux. Pushed to trunk. > > This makes sense to backport after some soak time on trunk. > > -- >8 -- > > As reported in PR libstdc++/110167, std::to_array compiles extremely > slowly for very large arrays. It needs to

Re: [PATCH v6 0/4] P1689R5 support

2023-06-19 Thread Jason Merrill via Gcc-patches
On 6/17/23 10:43, Ben Boeckel wrote: On Fri, Jun 16, 2023 at 23:55:53 -0400, Jason Merrill wrote: I see the same thing with patch 4 on x86_64-pc-linux-gnu, e.g. FAIL: g++.dg/modules/ben-1_a.C -std=c++17 (test for excess errors) Excess errors: /home/jason/gt/gcc/testsuite/g++.dg/modules/ben-1_a.

Re: [PATCH, rs6000] Add two peephole2 patterns for mr. insn

2023-06-19 Thread Hans-Peter Nilsson
On Tue, 30 May 2023, HAO CHEN GUI via Gcc-patches wrote: > +++ b/gcc/config/rs6000/rs6000.md > @@ -7891,6 +7891,36 @@ (define_insn "*mov_internal2" > (set_attr "dot" "yes") > (set_attr "length" "4,4,8")]) > > +(define_peephole2 > + [(set (match_operand:CC 2 "cc_reg_operand" "") > + (

Re: [PATCH 2/2] cprop_hardreg: Enable propagation of the stack pointer if possible.

2023-06-19 Thread Andrew Pinski via Gcc-patches
On Mon, Jun 19, 2023 at 4:40 PM Andrew Pinski wrote: > > On Mon, Jun 19, 2023 at 9:58 AM Thiago Jung Bauermann via Gcc-patches > wrote: > > > > > > Hello Manolis, > > > > Philipp Tomsich writes: > > > > > On Thu, 8 Jun 2023 at 00:18, Jeff Law wrote: > > >> > > >> On 5/25/23 06:35, Manolis Tsami

Re: [PATCH 2/2] cprop_hardreg: Enable propagation of the stack pointer if possible.

2023-06-19 Thread Andrew Pinski via Gcc-patches
On Mon, Jun 19, 2023 at 9:58 AM Thiago Jung Bauermann via Gcc-patches wrote: > > > Hello Manolis, > > Philipp Tomsich writes: > > > On Thu, 8 Jun 2023 at 00:18, Jeff Law wrote: > >> > >> On 5/25/23 06:35, Manolis Tsamis wrote: > >> > Propagation of the stack pointer in cprop_hardreg is currenty

Re: Re: [PATCH] RISC-V: Fix fails of testcases

2023-06-19 Thread 钟居哲
>> Presumably the target selector in the dg-do ensures we only build/run >> these on the appropriate targets now and we don't need explicitly -march >> arguments? Yes. >> Assuming that's correct, this is fine for the trunk. Thanks. juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-06-20 07:13 To

Re: [PATCH] RISC-V: Fix fails of testcases

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/19/23 17:04, Juzhe-Zhong wrote: FAIL: gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-run.c -std=c99 -O3 -ftree-vectorize --param riscv-autovec-preference=fixed-vlmax (test for excess errors) Excess errors: xgcc: fatal error: Cannot find suitable multilib set for '-march=rv64imafdcv

[PATCH] RISC-V: Fix fails of testcases

2023-06-19 Thread Juzhe-Zhong
FAIL: gcc.target/riscv/rvv/autovec/vls-vlmax/vec_extract-run.c -std=c99 -O3 -ftree-vectorize --param riscv-autovec-preference=fixed-vlmax (test for excess errors) Excess errors: xgcc: fatal error: Cannot find suitable multilib set for '-march=rv64imafdcv_zicsr_zifencei_zve32f_zve32x_zve64d_zve64

[PR target/110201] Fix operand types for various scalar crypto insns

2023-06-19 Thread Jeff Law via Gcc-patches
A handful of the scalar crypto instructions are supposed to take a constant integer argument 0..3 inclusive. A suitable constraint was created and used for this purpose (D03), but the operand's predicate is "register_operand". That's just wrong. This patch adds a new predicate "const_0_3_o

Re: [PATCH] RISC-V: Add VLS modes for GNU vectors

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/19/23 15:45, 钟居哲 wrote: Hi, Jeff. Thanks for comment. I add INCLUDE_ALGORITHM since I use std:min. I failed to compile when I didn't add INCLUDE_ALGORITHM. Is INCLUDE_ALGORITHM expensive that you don't want it? It just stood out as unexpected. THere's no concerns with std::min and t

Re: [PATCH] VECT: Apply LEN_MASK_{LOAD,STORE} into vectorizer

2023-06-19 Thread 钟居哲
Hi, this patch refactors the codes in tree-vect-stmts.cc in case of gimple IR generation. I realize the codes change too much and I am not sure whether you are happy with it. Originally, the codes are like: if (final_mask) { generate IFN_MASK_LOAD... } else if (loop_len) { generate IF

Re: Re: [PATCH] RISC-V: Add VLS modes for GNU vectors

2023-06-19 Thread 钟居哲
Hi, Jeff. Thanks for comment. I add INCLUDE_ALGORITHM since I use std:min. I failed to compile when I didn't add INCLUDE_ALGORITHM. Is INCLUDE_ALGORITHM expensive that you don't want it? juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-06-20 02:25 To: Juzhe-Zhong; gcc-patches CC: kito.cheng; pa

Re: [PATCH v6 1/4] libcpp: reject codepoints above 0x10FFFF

2023-06-19 Thread Jason Merrill via Gcc-patches
On 6/6/23 16:50, Ben Boeckel wrote: Unicode does not support such values because they are unrepresentable in UTF-16. Pushed. libcpp/ * charset.cc: Reject encodings of codepoints above 0x10. UTF-16 does not support such codepoints and therefore all Unicode rejects

Re: [PATCH v5 3/5] p1689r5: initial support

2023-06-19 Thread Jason Merrill via Gcc-patches
On 5/12/23 10:24, Ben Boeckel wrote: On Tue, Feb 14, 2023 at 16:50:27 -0500, Jason Merrill wrote: I notice that the actual flags are all -fdep-*, though some of them are -fdeps-* here, and the internal variables all seem to be fdeps_*. I lean toward harmonizing on "deps", I think. Done. I d

[PATCH 12/14] OpenACC: "declare create" fixes wrt. "allocatable" variables

2023-06-19 Thread Julian Brown
This patch fixes a case revealed by the previous patch where a synthetic "acc data" region created for a "declare create" variable could interact strangely with lexical inheritance behaviour. In fact, it doesn't seem right to create the "acc data" region for allocatable variables at all -- doing s

[PATCH 11/14] OpenACC: Reimplement "inheritance" for lexically-nested offload regions

2023-06-19 Thread Julian Brown
This patch reimplements "lexical inheritance" for OpenACC offload regions inside "data" regions, allowing e.g. this to work: int *ptr; [...] #pragma acc data copyin(ptr[10:2]) { #pragma acc parallel { ... } } here, the "copyin" is mirrored on the inner "acc parallel" as "present

[PATCH 10/14] OpenMP/OpenACC: Reorganise OMP map clause handling in gimplify.cc

2023-06-19 Thread Julian Brown
This patch has been separated out from the C++ "declare mapper" support patch. It contains just the gimplify.cc rearrangement work, mostly moving gimplification from gimplify_scan_omp_clauses to gimplify_adjust_omp_clauses for map clauses. The motivation for doing this was that we don't know if w

[PATCH 08/14] OpenMP: Pointers and member mappings

2023-06-19 Thread Julian Brown
This patch changes the mapping node arrangement used for array components of derived types, e.g.: type T integer, pointer, dimension(:) :: arrptr end type T type(T) :: tvar [...] !$omp target map(tofrom: tvar%arrptr) This will currently be mapped using three mapping nodes: GOMP_MA

[PATCH 09/14] OpenMP/OpenACC: Unordered/non-constant component offset runtime diagnostic

2023-06-19 Thread Julian Brown
This patch adds support for non-constant component offsets in "map" clauses for OpenMP (and the equivalants for OpenACC), which are not able to be sorted into order at compile time. Normally struct accesses in such clauses are gathered together and sorted into increasing address order after a "GOM

[PATCH 14/14] OpenACC: Improve implicit mapping for non-lexically nested offload regions

2023-06-19 Thread Julian Brown
This patch enables use of the OMP_CLAUSE_RUNTIME_IMPLICIT_P flag for OpenACC. This allows code like this to work correctly: int arr[100]; [...] #pragma acc enter data copyin(arr[20:10]) /* No explicit mapping of 'arr' here. */ #pragma acc parallel { /* use of arr[20:10]... */ } #

[PATCH 13/14] OpenACC: Allow implicit uses of assumed-size arrays in offload regions

2023-06-19 Thread Julian Brown
This patch reimplements the functionality of the previously-reverted patch "Assumed-size arrays with non-lexical data mappings". The purpose is to support implicit uses of assumed-size arrays for Fortran when those arrays have already been mapped on the target some other way (e.g. by "acc enter dat

[PATCH 05/14] OpenMP/OpenACC: Reindent TO/FROM/_CACHE_ stanza in {c_}finish_omp_clause

2023-06-19 Thread Julian Brown
This patch trivially adds braces and reindents the OMP_CLAUSE_TO/OMP_CLAUSE_FROM/OMP_CLAUSE__CACHE_ stanza in c_finish_omp_clause and finish_omp_clause, in preparation for the following patch (to clarify the diff a little). 2022-09-13 Julian Brown gcc/c/ * c-typeck.cc (c_finish_omp_cla

[PATCH 07/14] OpenMP: implicitly map base pointer for array-section pointer components

2023-06-19 Thread Julian Brown
Following from discussion in: https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570075.html and: https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608100.html and also upstream OpenMP issue 342, this patch changes mapping for array sections of pointer components on compute regions li

[PATCH 03/14] Revert "Fix implicit mapping for array slices on lexically-enclosing data constructs (PR70828)"

2023-06-19 Thread Julian Brown
This reverts commit a84b89b8f070f1efe86ea347e98d57e6bc32ae2d. Relevant tests are temporarily disabled or XFAILed. 2023-06-16 Julian Brown gcc/ Revert: * gimplify.cc (oacc_array_mapping_info): New struct. (gimplify_omp_ctx): Add decl_data_clause hash map. (new_o

[PATCH 01/14] Revert "Assumed-size arrays with non-lexical data mappings"

2023-06-19 Thread Julian Brown
This reverts commit 72733f6e6f6ec1bb9884fea8bfbebd3de03d9374. 2023-06-16 Julian Brown gcc/ Revert: * gimplify.cc (gimplify_adjust_omp_clauses_1): Raise error for assumed-size arrays in map clauses for Fortran/OpenMP. * omp-low.cc (lower_omp_target): Set the size

[PATCH 02/14] Revert "Fix references declared in lexically-enclosing OpenACC data region"

2023-06-19 Thread Julian Brown
This reverts commit c9cd2bac6a5127a01c6f47e5636a926ac39b5e21. 2023-06-16 Julian Brown gcc/fortran/ Revert: * trans-openmp.cc (gfc_omp_finish_clause): Guard addition of clauses for pointers with DECL_P. gcc/ Revert: * gimplify.cc (oacc_array_mapping_info

[PATCH 04/14] Revert "openmp: Handle C/C++ array reference base-pointers in array sections"

2023-06-19 Thread Julian Brown
This reverts commit 3385743fd2fa15a2a750a29daf6d4f97f5aad0ae. 2023-06-16 Julian Brown Revert: 2022-02-24 Chung-Lin Tang gcc/c/ChangeLog: * c-typeck.cc (handle_omp_array_sections): Add handling for creating array-reference base-pointer attachment clause. gcc/cp/Cha

[PATCH 00/14] [og13] OpenMP/OpenACC: map clause and OMP gimplify rework

2023-06-19 Thread Julian Brown
This series (for the og13 branch) is a rebased and merged version of the first few patches of the series previously sent upstream for mainline: https://gcc.gnu.org/pipermail/gcc-patches/2022-December/609031.html The series contains patches 1-6 and the parts of 8 ("C++ "declare mapper" support)

Re: [PATCH] tree-optimization/110243 - kill off IVOPTs split_offset

2023-06-19 Thread Richard Sandiford via Gcc-patches
Jeff Law writes: > On 6/16/23 06:34, Richard Biener via Gcc-patches wrote: >> IVOPTs has strip_offset which suffers from the same issues regarding >> integer overflow that split_constant_offset did but the latter was >> fixed quite some time ago. The following implements strip_offset >> in terms

Re: [PATCH v2] RISC-V: Save and restore FCSR in interrupt functions to avoid program errors.

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/14/23 01:57, Jin Ma wrote: In order to avoid interrupt functions to change the FCSR, it needs to be saved and restored at the beginning and end of the function. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_compute_frame_info): Allocate frame for FCSR. (riscv_for_each_s

[PATCH ver 6] rs6000: Add builtins for IEEE 128-bit floating point values

2023-06-19 Thread Carl Love via Gcc-patches
Kewen, GCC maintainers: Version 6, Fixed missing change log entry. Changed builtin id names as requested. Missed making the change on the last version. Fixed comment in the three test cases. Reran regression suite on Power 10, no regressions. Version 5, Tested the patch on P9 BE per request

Re: [PATCH] Introduce hardbool attribute for C

2023-06-19 Thread Bernhard Reutner-Fischer via Gcc-patches
On 16 June 2023 07:35:27 CEST, Alexandre Oliva via Gcc-patches wrote: index 0..634feaed4deef --- /dev/null +++ b/gcc/testsuite/gcc.dg/hardbool-err.c @@ -0,0 +1,28 @@ +/* { dg-do compile } */ +/* { dg-options "" } */ + +typedef _Bool __attribute__ ((__hardbool__)) +hbbl; /* { dg-error

Re: [PATCH ver 5] rs6000: Add builtins for IEEE 128-bit floating point values

2023-06-19 Thread Carl Love via Gcc-patches
Kewen: On Mon, 2023-06-19 at 14:08 +0800, Kewen.Lin wrote: > > > Hi Carl, > > on 2023/6/17 01:57, Carl Love wrote: > > overloaded instance. Update comments. > > * config/rs6000/rs6000-overload.def > > (__builtin_vec_scalar_insert_exp): Add new overload definition > > with > >

Re: [PATCH] tree-optimization/110243 - kill off IVOPTs split_offset

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/16/23 06:34, Richard Biener via Gcc-patches wrote: IVOPTs has strip_offset which suffers from the same issues regarding integer overflow that split_constant_offset did but the latter was fixed quite some time ago. The following implements strip_offset in terms of split_constant_offset, r

Re: [PATCH] RISC-V: Add VLS modes for GNU vectors

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/18/23 17:06, Juzhe-Zhong wrote: This patch is a propsal patch is **NOT** ready to push since after this patch the total machine modes will exceed 255 which will create ICE in LTO: internal compiler error: in bp_pack_int_in_range, at data-streamer.h:290 Right. Note that an ack from Jak

Re: [PATCH] c-family: implement -ffp-contract=on

2023-06-19 Thread Richard Biener via Gcc-patches
> Am 19.06.2023 um 19:03 schrieb Alexander Monakov : > >  > Ping. OK for trunk? Ok if the FE maintainers do not object within 48h. Thanks, Richard >> On Mon, 5 Jun 2023, Alexander Monakov wrote: >> >> Ping for the front-end maintainers' input. >> >>> On Mon, 22 May 2023, Richard Biener w

Re: Tiny phiprop compile time optimization

2023-06-19 Thread Richard Biener via Gcc-patches
> Am 19.06.2023 um 20:08 schrieb Andrew Pinski via Gcc-patches > : > > On Mon, Jun 19, 2023 at 1:32 AM Richard Biener via Gcc-patches > wrote: >> >>> On Mon, 19 Jun 2023, Jan Hubicka wrote: >>> >>> Hi, >>> this patch avoids unnecessary post dominator and update_ssa in phiprop. >>> >>> Boo

Re: Tiny phiprop compile time optimization

2023-06-19 Thread Andrew Pinski via Gcc-patches
On Mon, Jun 19, 2023 at 1:32 AM Richard Biener via Gcc-patches wrote: > > On Mon, 19 Jun 2023, Jan Hubicka wrote: > > > Hi, > > this patch avoids unnecessary post dominator and update_ssa in phiprop. > > > > Bootstrapped/regtested x86_64-linux, OK? > > > > gcc/ChangeLog: > > > > * tree-ssa-p

Re: [PATCH] RISC-V: Add tuple vector mode psABI checking and simplify code

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/18/23 07:16, 钟居哲 wrote: Thanks for cleaning up codes for future's ABI support patch. Let's wait for Jeff or Robin comments. Looks reasonable to me given the state we're in WRT psabi and vectors. jeff

Re: [PATCH] Do not allow "x + 0.0" to "x" optimization with -fsignaling-nans

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/19/23 05:41, Richard Biener via Gcc-patches wrote: On Mon, Jun 19, 2023 at 12:33 PM Toru Kisuki via Gcc-patches wrote: Hi, With -O3 -fsignaling-nans -fno-signed-zeros, compiler should not simplify 'x + 0.0' to 'x'. OK if you bootstrapped / tested this change. I'm suspect Toru doe

Re: [PATCH] debug/110295 - mixed up early/late debug for member DIEs

2023-06-19 Thread Jason Merrill via Gcc-patches
On 6/19/23 06:15, Richard Biener wrote: When we process a scope typedef during early debug creation and we have already created a DIE for the type when the decl is TYPE_DECL_IS_STUB and this DIE is still in limbo we end up just re-parenting that type DIE instead of properly creating a DIE for the

Re: [PATCH 2/2] cprop_hardreg: Enable propagation of the stack pointer if possible.

2023-06-19 Thread Manolis Tsamis
On Mon, Jun 19, 2023 at 7:57 PM Thiago Jung Bauermann wrote: > > > Hello Manolis, > > Philipp Tomsich writes: > > > On Thu, 8 Jun 2023 at 00:18, Jeff Law wrote: > >> > >> On 5/25/23 06:35, Manolis Tsamis wrote: > >> > Propagation of the stack pointer in cprop_hardreg is currenty forbidden > >> >

Re: [PATCH] c-family: implement -ffp-contract=on

2023-06-19 Thread Alexander Monakov via Gcc-patches
Ping. OK for trunk? On Mon, 5 Jun 2023, Alexander Monakov wrote: > Ping for the front-end maintainers' input. > > On Mon, 22 May 2023, Richard Biener wrote: > > > On Thu, May 18, 2023 at 11:04 PM Alexander Monakov via Gcc-patches > > wrote: > > > > > > Implement -ffp-contract=on for C and C+

Re: [PATCH 2/2] cprop_hardreg: Enable propagation of the stack pointer if possible.

2023-06-19 Thread Thiago Jung Bauermann via Gcc-patches
Hello Manolis, Philipp Tomsich writes: > On Thu, 8 Jun 2023 at 00:18, Jeff Law wrote: >> >> On 5/25/23 06:35, Manolis Tsamis wrote: >> > Propagation of the stack pointer in cprop_hardreg is currenty forbidden >> > in all cases, due to maybe_mode_change returning NULL. Relax this >> > restrict

[PATCH] VECT: Apply LEN_MASK_{LOAD,STORE} into vectorizer

2023-06-19 Thread juzhe . zhong
From: Ju-Zhe Zhong This patch is apply LEN_MASK_{LOAD,STORE} into vectorizer. I refactor gimple IR build to make codes look cleaner. gcc/ChangeLog: * internal-fn.cc (expand_partial_store_optab_fn): Add LEN_MASK_{LOAD,STORE} vectorizer support. (internal_load_fn_p): Ditto.

Re: [libstdc++] Improve M_check_len

2023-06-19 Thread Jan Hubicka via Gcc-patches
> On Mon, 19 Jun 2023 at 12:20, Jakub Jelinek wrote: > > > On Mon, Jun 19, 2023 at 01:05:36PM +0200, Jan Hubicka via Gcc-patches > > wrote: > > > - if (max_size() - size() < __n) > > > - __throw_length_error(__N(__s)); > > > + const size_type __max_size = max_size(); > > > + // O

[PATCH] rs6000, __builtin_set_fpscr_rn add retrun value

2023-06-19 Thread Carl Love via Gcc-patches
GCC maintainers: The GLibC team requested a builtin to replace the mffscrn and mffscrniinline asm instructions in the GLibC code. Previously there was discussion on adding builtins for the mffscrn instructions. https://gcc.gnu.org/pipermail/gcc-patches/2023-May/620261.html In the end, it was

Re: [libstdc++] Improve M_check_len

2023-06-19 Thread Jonathan Wakely via Gcc-patches
On Mon, 19 Jun 2023 at 16:13, Jonathan Wakely wrote: > On Mon, 19 Jun 2023 at 12:20, Jakub Jelinek wrote: > >> On Mon, Jun 19, 2023 at 01:05:36PM +0200, Jan Hubicka via Gcc-patches >> wrote: >> > - if (max_size() - size() < __n) >> > - __throw_length_error(__N(__s)); >> > + const si

Re: [libstdc++] Improve M_check_len

2023-06-19 Thread Jonathan Wakely via Gcc-patches
P.S. please CC libstd...@gcc.gnu.org for all libstdc++ patches. On Mon, 19 Jun 2023 at 16:13, Jonathan Wakely wrote: > On Mon, 19 Jun 2023 at 12:20, Jakub Jelinek wrote: > >> On Mon, Jun 19, 2023 at 01:05:36PM +0200, Jan Hubicka via Gcc-patches >> wrote: >> > - if (max_size() - size() < __n)

Re: [libstdc++] Improve M_check_len

2023-06-19 Thread Jonathan Wakely via Gcc-patches
On Mon, 19 Jun 2023 at 12:20, Jakub Jelinek wrote: > On Mon, Jun 19, 2023 at 01:05:36PM +0200, Jan Hubicka via Gcc-patches > wrote: > > - if (max_size() - size() < __n) > > - __throw_length_error(__N(__s)); > > + const size_type __max_size = max_size(); > > + // On 64bit systems

[committed] recog: Change return type of predicate functions from int to bool

2023-06-19 Thread Uros Bizjak via Gcc-patches
Also change some internal variables to bool and change return type of split_all_insns_noflow to void. gcc/ChangeLog: * recog.h (check_asm_operands): Change return type from int to bool. (insn_invalid_p): Ditto. (verify_changes): Ditto. (apply_change_group): Ditto. (constrain_o

RE: [PATCH v2] RISC-V: Fix VWEXTF iterator requirement

2023-06-19 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Monday, June 19, 2023 9:10 PM To: juzhe.zh...@rivai.ai; Li Xu ; gcc-patches Cc: kito.cheng ; palmer Subject: Re: [PATCH v2] RISC-V: Fix VWEXTF iterator requirement On 6/19/

RE: [PATCH v2] RISC-V: Bugfix for RVV widenning reduction in ZVE32/64

2023-06-19 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Jeff Law Sent: Monday, June 19, 2023 7:45 PM To: juzhe.zh...@rivai.ai; Li, Pan2 ; gcc-patches Cc: Robin Dapp ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v2] RISC-V: Bugfix for RVV widenning reduction in ZVE32/64 On 6/19/2

[PATCH v2] combine: Narrow comparison of memory and constant

2023-06-19 Thread Stefan Schulze Frielinghaus via Gcc-patches
Comparisons between memory and constants might be done in a smaller mode resulting in smaller constants which might finally end up as immediates instead of in the literal pool. For example, on s390x a non-symmetric comparison like x <= 0x3fff results in the constant being spilled to

RE: [PATCH v2] RISC-V: Bugfix for RVV float reduction in ZVE32/64

2023-06-19 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Jeff Law Sent: Monday, June 19, 2023 9:51 PM To: 钟居哲 ; Li, Pan2 ; gcc-patches Cc: rdapp.gcc ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v2] RISC-V: Bugfix for RVV float reduction in ZVE32/64 On 6/18/23 07:14, 钟居哲 wrote: >

Re: ping: [PATCH] libcpp: Improve location for macro names [PR66290]

2023-06-19 Thread Lewis Hyatt via Gcc-patches
May I please ping this one? FWIW, it's 10 months old now without any feedback. https://gcc.gnu.org/pipermail/gcc-patches/2022-December/607647.html Most of the changes are just adapting the testsuite to look for the improved diagnostic location. Otherwise it's a handful of lines in libcpp and it ju

Re: [PATCH] combine: Narrow comparison of memory and constant

2023-06-19 Thread Stefan Schulze Frielinghaus via Gcc-patches
On Mon, Jun 12, 2023 at 03:29:00PM -0600, Jeff Law wrote: > > > On 6/12/23 01:57, Stefan Schulze Frielinghaus via Gcc-patches wrote: > > Comparisons between memory and constants might be done in a smaller mode > > resulting in smaller constants which might finally end up as immediates > > instead

Re: [PATCH] Improved SUBREG simplifications in simplify-rtx.cc's simplify_subreg.

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/18/23 04:22, Roger Sayle wrote: An x86 backend improvement that I'm working results in combine attempting to recognize: (set (reg:DI 87 [ xD.2846 ]) (ior:DI (subreg:DI (ashift:TI (zero_extend:TI (reg:DI 92)) (const_int 64 [0x40])) 0)

Re: [PATCH v2] RISC-V: Bugfix for RVV float reduction in ZVE32/64

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/18/23 07:14, 钟居哲 wrote: Thanks for fixing it for me. LGTM now. OK for the trunk. jeff

RE: [PATCH v2] RISC-V: Bugfix for RVV float reduction in ZVE32/64

2023-06-19 Thread Li, Pan2 via Gcc-patches
Ok for trunk? And a reminder to myself that this PATCH should be committed before the RVV widen reduction one. Pan From: 钟居哲 Sent: Sunday, June 18, 2023 9:15 PM To: Li, Pan2 ; gcc-patches Cc: rdapp.gcc ; Jeff Law ; Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v2] RISC-V: Bugf

RE: [PATCH] RISC-V: Fix out of range memory access of machine mode table

2023-06-19 Thread Li, Pan2 via Gcc-patches
Thanks Jakub for reviewing, sorry for misleading and will have a try for PATCH v3. Pan -Original Message- From: Jakub Jelinek Sent: Monday, June 19, 2023 5:17 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; rdapp@gmail.com; jeffreya...@gmail.com; Wang, Yanzhang

Re: [PATCH v2] RISC-V: Fix VWEXTF iterator requirement

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/19/23 00:05, juzhe.zh...@rivai.ai wrote: LGTM. OK jeff

RE: [PATCH v2] RISC-V: Bugfix for RVV widenning reduction in ZVE32/64

2023-06-19 Thread Li, Pan2 via Gcc-patches
Thanks Jeff, will commit this one after the RVV float reduction PATCH (reviewed by Juzhe already). Pan -Original Message- From: Jeff Law Sent: Monday, June 19, 2023 7:45 PM To: juzhe.zh...@rivai.ai; Li, Pan2 ; gcc-patches Cc: Robin Dapp ; Wang, Yanzhang ; kito.cheng Subject: Re: [P

[PATCH] [i386] Reject too large vectors for partial vector vectorization

2023-06-19 Thread Richard Biener via Gcc-patches
The following works around the lack of the x86 backend making the vectorizer compare the costs of the different possible vector sizes the backed advertises through the vector_modes hook. When enabling masked epilogues or main loops then this means we will select the prefered vector mode which is u

Re: [PATCH v2] RISC-V: Bugfix for RVV widenning reduction in ZVE32/64

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/19/23 01:01, juzhe.zh...@rivai.ai wrote: LGTM ACK for the trunk. jeff

Re: [PATCH] Do not allow "x + 0.0" to "x" optimization with -fsignaling-nans

2023-06-19 Thread Richard Biener via Gcc-patches
On Mon, Jun 19, 2023 at 12:33 PM Toru Kisuki via Gcc-patches wrote: > > Hi, > > > With -O3 -fsignaling-nans -fno-signed-zeros, compiler should not simplify 'x > + 0.0' to 'x'. > OK if you bootstrapped / tested this change. Thanks, Richard. > GCC Bugzilla : Bug 110305 > > > gcc/ChangeLog: > > 2

Re: [PATCH V6] VECT: Support LEN_MASK_{LOAD,STORE} ifn && optabs

2023-06-19 Thread Jeff Law via Gcc-patches
On 6/19/23 00:56, Robin Dapp wrote: If the pattern is not allowed to fail, then what code enforces the bias argument's restrictions?  I don't see it in the generic expander code. I have no ideal since this is just copied from len_load/len_store which is s390 target dependent stuff. I have s

Re: Do not account __builtin_unreachable guards in inliner

2023-06-19 Thread Richard Biener via Gcc-patches
On Mon, Jun 19, 2023 at 1:30 PM Richard Biener wrote: > > On Mon, Jun 19, 2023 at 12:15 PM Jan Hubicka wrote: > > > > > On Mon, Jun 19, 2023 at 9:52 AM Jan Hubicka via Gcc-patches > > > wrote: > > > > > > > > Hi, > > > > this was suggested earlier somewhere, but I can not find the thread. > > >

[committed] amdgcn: minimal V64TImode vector support

2023-06-19 Thread Andrew Stubbs
This patch adds just enough TImode vector support to use them for moving data about. This is primarily for the use of divmodv64di4, which will use TImode to return a pair of DImode values. The TImode vectors have no other operators defined, and there are no hardware instructions to support thi

[committed] amdgcn: Delete inactive libfuncs

2023-06-19 Thread Andrew Stubbs
There were implementations for HImode division in libgcc, but there were no matching libfuncs defined in the compiler, so the code was inactive (GCC only defines SImode and DImode, by default, and amdgcn only adds TImode explicitly). On trying to activate it I find that the definition of TARG

Re: Do not account __builtin_unreachable guards in inliner

2023-06-19 Thread Richard Biener via Gcc-patches
On Mon, Jun 19, 2023 at 12:15 PM Jan Hubicka wrote: > > > On Mon, Jun 19, 2023 at 9:52 AM Jan Hubicka via Gcc-patches > > wrote: > > > > > > Hi, > > > this was suggested earlier somewhere, but I can not find the thread. > > > C++ has assume attribute that expands int > > > if (conditional) > >

Re: [libstdc++] Improve M_check_len

2023-06-19 Thread Jakub Jelinek via Gcc-patches
On Mon, Jun 19, 2023 at 01:05:36PM +0200, Jan Hubicka via Gcc-patches wrote: > - if (max_size() - size() < __n) > - __throw_length_error(__N(__s)); > + const size_type __max_size = max_size(); > + // On 64bit systems vectors can not reach overflow by growing > + // by small si

RE: [PATCH] Remove -save-temps from tests using -flto

2023-06-19 Thread Richard Biener via Gcc-patches
On Mon, 19 Jun 2023, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Monday, June 19, 2023 11:19 AM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org > > Subject: RE: [PATCH] Remove -save-temps from tests using -flto > > > > On Mon, 19 Jun 2023, Ta

Re: [libstdc++] Improve M_check_len

2023-06-19 Thread Jan Hubicka via Gcc-patches
> > - if (max_size() - size() < __n) > > - __throw_length_error(__N(__s)); > > + // On 64bit systems vectors of small sizes can not > > + // reach overflow by growing by small sizes; before > > + // this happens, we will run out of memory. > > + if (__builtin_c

RE: [PATCH] Remove -save-temps from tests using -flto

2023-06-19 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Monday, June 19, 2023 11:19 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org > Subject: RE: [PATCH] Remove -save-temps from tests using -flto > > On Mon, 19 Jun 2023, Tamar Christina wrote: > > > > -Original Message- > >

[PATCH] Do not allow "x + 0.0" to "x" optimization with -fsignaling-nans

2023-06-19 Thread Toru Kisuki via Gcc-patches
Hi, With -O3 -fsignaling-nans -fno-signed-zeros, compiler should not simplify 'x + 0.0' to 'x'. GCC Bugzilla : Bug 110305 gcc/ChangeLog: 2023-06-19 Toru Kisuki * simplify-rtx.cc (simplify_context::simplify_binary_operation_1): --- gcc/simplify-rtx.cc | 3 ++- 1 file changed, 2 inserti

Fix DejaGnu directive syntax error in 'libgomp.c/target-51.c' (was: [committed] libgomp.c/target-51.c: Accept more error-msg variants in dg-output (was: Re: [committed] libgomp: Fix OMP_TARGET_OFFLOAD

2023-06-19 Thread Thomas Schwinge
Hi! On 2023-06-19T10:02:58+0200, Tobias Burnus wrote: > On 16.06.23 22:42, Thomas Schwinge wrote: >> I see the new tests PASS, but with offloading enabled (nvptx) also see: >> >> PASS: libgomp.c/target-51.c (test for excess errors) >> PASS: libgomp.c/target-51.c execution test >> [

RE: [PATCH] Remove -save-temps from tests using -flto

2023-06-19 Thread Richard Biener via Gcc-patches
On Mon, 19 Jun 2023, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Monday, June 19, 2023 7:28 AM > > To: gcc-patches@gcc.gnu.org > > Cc: Tamar Christina > > Subject: [PATCH] Remove -save-temps from tests using -flto > > > > The following removes -save-

Re: Do not account __builtin_unreachable guards in inliner

2023-06-19 Thread Jan Hubicka via Gcc-patches
> On Mon, Jun 19, 2023 at 9:52 AM Jan Hubicka via Gcc-patches > wrote: > > > > Hi, > > this was suggested earlier somewhere, but I can not find the thread. > > C++ has assume attribute that expands int > > if (conditional) > > __builtin_unreachable () > > We do not want to account the condit

[PATCH] debug/110295 - mixed up early/late debug for member DIEs

2023-06-19 Thread Richard Biener via Gcc-patches
When we process a scope typedef during early debug creation and we have already created a DIE for the type when the decl is TYPE_DECL_IS_STUB and this DIE is still in limbo we end up just re-parenting that type DIE instead of properly creating a DIE for the decl, eventually picking up the now compl

Re: [libstdc++] Improve M_check_len

2023-06-19 Thread Jonathan Wakely via Gcc-patches
On Sun, 18 Jun 2023 at 19:37, Jan Hubicka wrote: > Hi, > _M_check_len is used in vector reallocations. It computes __n + __s but > does > checking for case that (__n + __s) * sizeof (Tp) would overflow ptrdiff_t. > Since we know that __s is a size of already allocated memory block if __n > is > n

Re: [PATCH] [contrib] validate_failures.py: Don't consider summary line in wrong place

2023-06-19 Thread Thiago Jung Bauermann via Gcc-patches
Jeff Law writes: > On 6/16/23 06:02, Thiago Jung Bauermann via Gcc-patches wrote: >> contrib/ChangeLog: >> * testsuite-management/validate_failures.py (IsInterestingResult): >> Add result_set argument and use it. Adjust callers. > Thanks. I pushed this to the trunk. Thank you! --

RE: [PATCH] Remove -save-temps from tests using -flto

2023-06-19 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Monday, June 19, 2023 7:28 AM > To: gcc-patches@gcc.gnu.org > Cc: Tamar Christina > Subject: [PATCH] Remove -save-temps from tests using -flto > > The following removes -save-temps that doesn't seem to have any good > reason from tests

  1   2   >