[PATCH] PR middle-end/100810: Penalize IV candidates with undefined value bases

2021-08-30 Thread Roger Sayle
egression). Hopefully, the tree-loop optimization experts agree with my analysis/fix. This patch has been tested on x86_64-pc-linux-gnu with a "make bootstrap" and "make -k check" with no new failures. Ok for mainline? 2021-08-31 Roger Sayle Andrew Pinski

[PATCH] C: PR c/79412: Poison decls with error_mark_node after type mismatch

2021-08-31 Thread Roger Sayle
h has been tested on x86_64-pc-linux-gnu with "make bootstrap" and "make -k check" with no new failures. Ok for mainline? 2020-08-31 Roger Sayle gcc/c/ChangeLog PR c/79412 * c-decl.c (duplicate_decls): On significant mismatches, mark the types of both

RE: [PATCH] Preserve SUBREG_PROMOTED_VAR_P on (extend:HI (subreg/s:QI (reg:SI)))

2021-08-31 Thread Roger Sayle
s earlier. Any help testing the attached patch on an affected target would be much appreciated. Sorry for the inconvenience. Roger -- -Original Message- From: Christophe LYON Sent: 31 August 2021 13:32 To: Roger Sayle ; 'GCC Patches' Subject: Re: [PATCH] Preserve SUBREG_PRO

[Committed] Fix subreg_promoted_mode breakage on various platforms

2021-08-31 Thread Roger Sayle
n x86_64-pc-linux-gnu (just in case), and confirmation/pre-approval from Jeff Law that this indeed fixes the build failures seen on several platforms. My humble apologies again. 2021-08-31 Roger Sayle gcc/ChangeLog * expr.c (convert_modes): Don't use subreg_promoted_mode on a

[PATCH] PR tree-optimization/71343: Value number X<<2 as X*4.

2022-09-13 Thread Roger Sayle
ization/71343 * tree-ssa-sccvn.cc (visit_nary_op) : Make the value number of the expression X << C the same as the value number for the multiplication X * (1< -Original Message- > From: Richard Biener > Sent: 08 August 2022 12:42 > To: Roger Sayle &

[PATCH] Optimize (X<

2022-09-13 Thread Roger Sayle
This patch tweaks the match.pd transformation previously added to fold (X< gcc/ChangeLog * match.pd (op (lshift @0 @1) (lshift @2 @1)): Optimize the expression (X

[Committed] Restrict new testcase gcc.target/i386/pr80270.c to x86_64.

2022-03-01 Thread Roger Sayle
Committed as obvious (in hindsight). 2022-03-01 Roger Sayle gcc/testsuite/ChangeLog * gcc.target/i386/pr80270.c: Don't compile new test case on ia32. Sorry for the noise. Roger -- diff --git a/gcc/testsuite/gcc.target/i386/pr80270.c b/gcc/testsuite/gcc.target/i386/pr80270.c

[i386 PATCH] PR 104732: Simplify/fix DI mode logic expansion/splitting on -m32.

2022-03-04 Thread Roger Sayle
no-stv, allowing pandn to be used with V2DImode on Solaris/x86. Fingers-crossed this should reduce the number of discrepancies that Rainer Orth encounters supporting Solaris/x86. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check, with/without --target_board=

[Committed] Update gcc.dg/lower-subreg-1.c on ia32

2022-03-06 Thread Roger Sayle
[now corrected]. 2022-03-06 Roger Sayle gcc/testsuite/ChangeLog * gcc.dg/lower-subreg-1.c: Update test case. iordi3 is no longer lowered by the RTL subreg1 pass on ia32 [even with -mno-stv]. Sorry again, Roger -- > -Original Message- > From: sunil.k.pandey >

[PATCH] PR tree-optimization/98335: Improvements to DSE's compute_trims.

2022-03-07 Thread Roger Sayle
been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. I've also added new testcases for the original motivating PR tree-optimization/86010, to ensure that those remain optimized (in future). Ok for mainline? 2022-03-07 Roger Sayle gcc

[x86 PATCH] PR tree-optimization/98335: New peephole2 xorl; movb -> movzbl

2022-03-07 Thread Roger Sayle
with no new failures. Posted in pieces to simplify review. Ok for mainline? 2022-03-07 Roger Sayle gcc/ChangeLog PR tree-optimization/98335 * config/i386/i386.md (peephole2): Transform xorl followed by a suitable movb or movw into the equivalent movz[bw]l. gcc

RE: [x86 PATCH] PR tree-optimization/98335: New peephole2 xorl; movb -> movzbl

2022-03-07 Thread Roger Sayle
Hi Uros, > Is there a reason that only inserts to DImode registers are implemented? > IMO, these peepholes should also handle inserts to SImode. I wasn't able to construct a test case that produced a byte or word insert into an SImode register. The front-ends and middle-end end up producing di

[C++ PATCH] PR c++/96329: ICE-on-invalid-code error recovery.

2022-03-07 Thread Roger Sayle
This patch fixes PR c++/96329 which is an ICE-on-invalid-code regression affecting mainline. This patch has been tested on x86_64-pc-linux-gnu, enabling languages c and c++, with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-03-07 Roger Sayle gcc/cp/ChangeLog

[C++ PATCH] PR c++/96437: ICE-on-invalid-code error recovery.

2022-03-07 Thread Roger Sayle
This patch fixes PR c++/96437 which is an ICE-on-invalid-code regression affecting mainline. This patch has been tested on x86_64-pc-linux-gnu, enabling languages c and c++, with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-03-07 Roger Sayle gcc/cp/ChangeLog

[C++ PATCH] PR c++/96440: ICE-on-invalid-code error recovery.

2022-03-07 Thread Roger Sayle
This patch fixes PR c++/96440 which is an ICE-on-invalid-code regression affecting mainline. This patch has been tested on x86_64-pc-linux-gnu, enabling languages c and c++, with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-03-07 Roger Sayle gcc/cp/ChangeLog

[PATCH v2] PR tree-optimization/98335: Improvements to DSE's compute_trims.

2022-03-09 Thread Roger Sayle
ith a store of N' bytes where popcount(N') is one, if that isn't already the case. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Is this revised version ok for mainline? 2022-03-09 Roger Sayle R

RE: [x86 PATCH] PR tree-optimization/98335: New peephole2 xorl; movb -> movzbl

2022-03-09 Thread Roger Sayle
and make -k check with no new failures. Is this revised version (still) Ok for mainline? 2022-03-09 Roger Sayle gcc/ChangeLog PR tree-optimization/98335 * config/i386/i386.md (peephole2): Eliminate redundant insv. Combine movl followed by movb. Transform xorl followed by

RE: [C++ PATCH] PR c++/96437: ICE-on-invalid-code error recovery.

2022-03-09 Thread Roger Sayle
Hi Jason, Very many thanks for your reviews/approvals of these ICE-on-invalid-code fixes. > > + if (TREE_VALUE (new_parm) != error_mark_node) > > +DECL_VIRTUAL_P (TREE_VALUE (new_parm)) = true; > > Hmm, I wonder about returning early if there was an error, but this is fine > as is. The

RE: [PATCH v2] PR tree-optimization/98335: Improvements to DSE's compute_trims.

2022-03-09 Thread Roger Sayle
Hi Richard, > 2022-03-09 Roger Sayle > Richard Biener > > gcc/ChangeLog > PR tree-optimization/98335 > * builtins.cc (get_object_alignment_2): Export. > * builtins.h (get_object_alignment_2): Likewise. > * tree-ssa-alias.cc

[PATCH] PR middle-end/98420: Don't fold x - x to 0.0 with -frounding-math

2022-03-10 Thread Roger Sayle
ssion from GCC 4.1 (according to godbolt.org) so hopefully this patch is suitable during stage4. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-03-10 Roger Sayle gcc/ChangeLog PR middle

[Committed] Update g++.dg/other/pr84964.C for ia32 (and similar) targets.

2022-03-11 Thread Roger Sayle
mmitted as obvious. 2022-03-11 Roger Sayle gcc/testsuite/ChangeLog PR c++/84964 * g++.dg/other/pr84964.C: Tweak test to check for the ICE, not for the (target-dependent) sorry. Sorry for the noise. Roger -- diff --git a/gcc/testsuite/g++.dg/other/pr84964.C b/gcc/testsu

[PATCH] PR tree-optimization/101895: Fold VEC_PERM to help recognize FMA.

2022-03-11 Thread Roger Sayle
%xmm0 vfmadd213ps (%rdi), %xmm0, %xmm1 vmovups %xmm1, (%rdi) ret This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-03-11 Roger Sayle gcc/ChangeLog PR tree-optimization/

[x86 PATCH] Fix libitm.c/memset-1.c test fails with new peephole2s.

2022-03-12 Thread Roger Sayle
ith make bootstrap and make -k check with no new failures. Confirmed using RUNTESTFLAGS that this fixes the above failure, and the recently added testcase with -march=i486. Ok for mainline? 2022-03-12 Roger Sayle gcc/ChangeLog * config/i386/i386.md (peephole2 xorl;movb -> movzbl): Dis

[PATCH] PR middle-end/104885: Fix ICE with large stack frame on powerpc64.

2022-03-12 Thread Roger Sayle
-k check to confirm there are no surprises, and with the cc1plus of a cross-compiler to powerpc64-linux-gnu to confirm the new test case no longer ICEs. Ok for mainline? 2022-03-12 Roger Sayle gcc/ChangeLog PR middle-end/104885 * calls.cc (mark_stack_region_used): Check that t

RE: PING**4 - [PATCH] middle-end: Support ABIs that pass FP values as wider integers.

2022-03-14 Thread Roger Sayle
o: Jeff Law ; Richard Biener ; > Tobias Burnus > Cc: richard.sandif...@arm.com; Jeff Law ; gcc- > patc...@gcc.gnu.org; Roger Sayle > Subject: PING**4 - [PATCH] middle-end: Support ABIs that pass FP values as > wider integers. > > On 3/2/22 20:18, Jeff Law via Gcc-patches wrot

RE: PING**4 - [PATCH] middle-end: Support ABIs that pass FP values as wider integers.

2022-03-14 Thread Roger Sayle
to be able to support targets with slightly wacky parameter passing conventions". Thanks for thinking about this. Roger -- > -Original Message- > From: Richard Biener > Sent: 14 March 2022 09:09 > To: Roger Sayle > Cc: 'Tom de Vries' ; 'Jeff Law'

RE: PING**4 - [PATCH] middle-end: Support ABIs that pass FP values as wider integers.

2022-03-14 Thread Roger Sayle
de. Cheers, Roger -- > -Original Message- > From: Richard Biener > Sent: 14 March 2022 10:15 > To: Roger Sayle > Cc: 'Tom de Vries' ; 'Jeff Law' ; > 'Tobias Burnus' ; richard.sandif...@arm.com; 'Jeff > Law' ; gcc-patches@gcc.gnu.org > Subj

RE: PING**4 - [PATCH] middle-end: Support ABIs that pass FP values as wider integers.

2022-03-14 Thread Roger Sayle
de. Cheers, Roger -- > -Original Message- > From: Richard Biener > Sent: 14 March 2022 13:28 > To: Roger Sayle > Cc: 'Tom de Vries' ; 'Jeff Law' ; > 'Tobias Burnus' ; richard.sandif...@arm.com; 'Jeff > Law' ; gcc-patches@gcc

RE: [PATCH] middle-end: Support ABIs that pass FP values as wider integers.

2022-03-14 Thread Roger Sayle
- > -Original Message- > From: Jeff Law > Sent: 14 March 2022 15:30 > To: Roger Sayle ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] middle-end: Support ABIs that pass FP values as wider > integers. > > > > On 2/9/2022 1:12 PM, Roger Sayle wrote: > > Th

[PATCH] Ignore (possible) signed zeros in operands of FP comparisons.

2022-03-14 Thread Roger Sayle
folded to "0.0 < y" avoiding the multiplication at run-time. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures, and allows GCC to continue to optimize cases that we optimized in GCC 11 (without regard to correctness). Ok for

RE: [PATCH] PR tree-optimization/101895: Fold VEC_PERM to help recognize FMA.

2022-03-15 Thread Roger Sayle
uses in a pattern, so I have to manually confirm that there are no other uses of the mult using num_imm_uses. This revision has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-03-15 Roger Sayle M

[PATCH] Performance/size improvement to single_use when matching GIMPLE.

2022-03-15 Thread Roger Sayle
peeding up and shrinking this function should help offset the growth in match.pd for GCC 12. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-03-15 Roger Sayle gcc/ChangeLog * gimple-mat

RE: [PATCH] Ignore (possible) signed zeros in operands of FP comparisons.

2022-03-15 Thread Roger Sayle
> -Original Message- > From: Richard Biener > Sent: 15 March 2022 07:29 > To: Roger Sayle > Cc: GCC Patches > Subject: Re: [PATCH] Ignore (possible) signed zeros in operands of FP > comparisons. > > On Mon, Mar 14, 2022 at 8:26 PM Roger Sayle > wrote: &

RE: [PATCH] Performance/size improvement to single_use when matching GIMPLE.

2022-03-15 Thread Roger Sayle
improving the situation... stay tuned. Cheers, Roger -- > -Original Message- > From: Richard Biener > Sent: 15 March 2022 09:18 > To: Roger Sayle > Cc: 'GCC Patches' ; 'Marc Glisse' > > Subject: Re: [PATCH] Performance/size improvement to sin

[x86 PATCH] PR target/94680: Clear upper bits of V2DF using movq (like V2DI).

2022-03-15 Thread Roger Sayle
x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-03-15 Roger Sayle gcc/ChangeLog PR target/94680 * config/i386/sse.md (*sse2_movq128_2): A version of sse2_movq128 for V2DF mode. gcc/testsuite/ChangeLog

[PATCH v2] Performance/size improvement to single_use when matching GIMPLE.

2022-03-16 Thread Roger Sayle
the issue is with the size of debugging info (or something else?). This revised patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-03-16 Roger Sayle Richard Biener gcc/ChangeLog * gimple-match-h

[PATCH] Generate an if instead of a switch with one case in genmatch.

2022-03-16 Thread Roger Sayle
he size of gimple-match.o by 53K on x86_64-pc-linux-gnu. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-03-16 Roger Sayle gcc/ChangeLog * gcc/genmatch.cc (dt_node::gen_kids_1): Introduce use_switch

[PATCH] Avoid generating unused labels in genmatch.

2022-03-16 Thread Roger Sayle
and make -k check with no new failures. Ok for mainline? 2022-03-16 Roger Sayle gcc/ChangeLog * gcc/genmatch.cc (fail_label_used): New global variable. (expr::gen_transform): Set fail_label_used whenever a goto FAIL_LABEL is generated. (dt_simplify::gen_1): C

[C PATCH] PR c/98198: ICE-on-invalid-code error recovery.

2022-03-16 Thread Roger Sayle
This is Christophe Lyon's fix to PR c/98198, an ICE-on-invalid-code regression affecting mainline, and a suitable testcase. Tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-03-16 Christophe Lyon Roger Sayle

[x86_64 PATCH] PR 90356: Use xor to load const_double 0.0 on SSE (always)

2022-03-17 Thread Roger Sayle
nblocked this one. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -check with no new failures. Ok for mainline? 2022-03-17 Roger Sayle gcc/ChangeLog PR target/86722 PR tree-optimization/90356 * config/i386/i386.md

RE: [PATCH] Ignore (possible) signed zeros in operands of FP comparisons.

2022-03-18 Thread Roger Sayle
y were in place, I/the compiler would be able to make use of it. Cheers, Roger -- > -Original Message- > From: Jeff Law > Sent: 17 March 2022 23:28 > To: Roger Sayle ; 'Richard Biener' > > Cc: 'GCC Patches' > Subject: Re: [PATCH] Ignore (possible) si

RE: [PATCH] Ignore (possible) signed zeros in operands of FP comparisons.

2022-03-26 Thread Roger Sayle
22 05:56 > To: Jeff Law > Cc: Andrew MacLeod ; Roger Sayle > ; Richard Biener > ; GCC Patches > Subject: Re: [PATCH] Ignore (possible) signed zeros in operands of FP > comparisons. > > On Fri, Mar 18, 2022 at 7:33 PM Aldy Hernandez wrote: > > >

RE: Proposal to remove '--with-cuda-driver' (was: [wwwdocs][patch] gcc-12: Nvptx updates)

2022-04-05 Thread Roger Sayle
16:14 > To: Tom de Vries ; Jakub Jelinek > Cc: gcc-patches@gcc.gnu.org; Tobias Burnus ; > Roger Sayle > Subject: Proposal to remove '--with-cuda-driver' (was: [wwwdocs][patch] gcc- > 12: Nvptx updates) > > Hi! > > Still catching up with GCC/nvptx b

[x86_64 PATCH] Support pandn for V1TI mode (i.e. *andnotv1ti3).

2022-04-05 Thread Roger Sayle
make -k check with no new failures. Ok for mainline? 2022-04-05 Roger Sayle gcc/ChangeLog * config/i386/sse.md (ANDNOT_MODE): New mode iterator for TF and V1TI. (*andnottf3): Replace with... (*andnot3): New define_insn using ANDNOT_MODE. gcc/testsuite/ChangeLog * gcc.target/

[x86_64 PATCH] Avoid andb %dil when optimizing for size.

2022-04-12 Thread Roger Sayle
mainline? 2022-04-12 Roger Sayle gcc/ChangeLog * config/i386/i386.md (peephole2): Transform *and_qi_maybe_si into *andsi_2 with -Os when the instruction encoding is shorter. gcc/testsuite/ChangeLog * gcc.target/i386/and-1.c: New test case. Thanks in advance, Roger

[x86 PATCH] Peephole pand;pxor into pandn.

2022-04-12 Thread Roger Sayle
o trigger. Ok for mainline? 2022-04-12 Roger Sayle gcc/ChangeLog * config/i386/sse.md (peephole2): Convert suitable pand followed by pxor into pandn, i.e. (X&Y)^X into X & ~Y. Thanks in advance, Roger -- diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md i

RE: [x86_64 PATCH] Avoid andb %dil when optimizing for size.

2022-04-13 Thread Roger Sayle
Hi Uros, Many thanks for the speedy review. Here's the revised version of the patch incorporating all of your suggested fixes and improvements. This has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-04-13 Roger

[x86 PATCH] Avoid andn and generate shorter not;and with -Oz.

2022-04-13 Thread Roger Sayle
check, both with and without --target_board=unix{-m32}, with no new failures [and like the previous patch on CSiBE]. Ok for mainline? 2022-04-13 Roger Sayle gcc/ChangeLog * config/i386/i386.md (define_split): Split *andsi_1 and *andn_si_ccno after reload with -Oz. gcc

[x86 PATCH] PR target/70321: Split double word equality/inequality after STV.

2022-04-13 Thread Roger Sayle
or both the scalar and vector implementations before tweaking these parameters (patches to follow shortly). Ok for mainline? 2022-04-13 Roger Sayle gcc/ChangeLog PR target/70321 * config/i386/i386-expand.cc (ix86_expand_branch): Don't decompose DI mode equality

[x86_64 PATCH] PR middle-end/105135: Catch more cmov idioms in combine.

2022-04-19 Thread Roger Sayle
ithout --target_board=unix{-m32}, with no new failures. Ok for mainline? 2022-04-19 Roger Sayle gcc/ChangeLog PR target/105135 * config/i386/i386.md (*xor_cmov): Transform setcc, negate then and into mov $0, followed by a cmov. (*lea_cmov): Transform set

[x86 PATCH] Improved V1TI (and V2DI) mode equality/inequality.

2022-04-20 Thread Roger Sayle
w failures. Is this OK for when we return to stage 1? 2022-04-20 Roger Sayle gcc/ChangeLog * config/i386/sse.md (vec_cmpeqv2div2di): Enable for TARGET_SSE2. For !TARGET_SSE4_1, expand as a V4SI vector comparison, followed by a pshufd and pand. (vec_cmpeqv1tiv1

RE: [x86 PATCH] Improved V1TI (and V2DI) mode equality/inequality.

2022-04-20 Thread Roger Sayle
Doh! ENOPATCH. > -Original Message- > From: Roger Sayle > Sent: 20 April 2022 18:50 > To: 'gcc-patches@gcc.gnu.org' > Subject: [x86 PATCH] Improved V1TI (and V2DI) mode equality/inequality. > > > This patch (for when the compiler returns to stag

[PATCH] PR middle-end/98865: Optimize (a>>63)*b as -(a>>63)&b in match.pd.

2022-04-20 Thread Roger Sayle
6.c as before. Ok, either for mainline or when stage 1 reopens? 2022-04-20 Roger Sayle Andrew Pinski Jakub Jelinek gcc/ChangeLog PR middle-end/98865 * match.pd (match zero_one_valued_p): New predicate. (mult @0 @1): Use zero_one_valued_p for

RE: [x86_64 PATCH] PR middle-end/105135: Catch more cmov idioms in combine.

2022-04-21 Thread Roger Sayle
Hi Uros, Many thanks for the review, feedback and suggestions. Here's a revised patch incorporating all of the requested changes. Bootstrapped and regression tested on x86_64-pc-linux-gnu, both -m64 and -m32, with no new failures. Ok for mainline? 2022-04-21 Roger Sayle

[PATCH] PR middle-end/104140: bootstrap ICE on riscv.

2022-01-21 Thread Roger Sayle
xed as below. This patch has been tested both on x86_64-pc-linux-gnu with a full make bootstrap and make -k check, and on a cross-compiler to riscv-unknown-linux-gnu where I was able to confirm the new test case now passes. Ok for mainline? 2022-01-22 Roger Sayle gcc/ChangeLo

[PATCH] PR tree-optimization/102950: Improved EVRP for signed BIT_XOR_EXPR.

2022-02-01 Thread Roger Sayle
as considered VARYING, but with the above changes now has the range [-256, -1][1, 255], which is sufficient to optimize away the call to foo. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-02-01 Roger Sayle

[PATCH] PR rtl-optimization/101885: Prevent combine from clobbering flags

2022-02-03 Thread Roger Sayle
er set0's or set1's destination. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-02-03 Roger Sayle gcc/ChangeLog PR rtl-optimization/101885 * combine.c (try_combine): When splittin

[PATCH] PR target/104345: Use nvptx "set" instruction for cond ? -1 : 0.

2022-02-03 Thread Roger Sayle
and "make -k check" with no new failures. Unfortunately, the exact register usage of a nvptx kernel depends upon the version of the Cuda drivers being used (and the hardware), but I believe this change should resolve the PR (for Thomas) by improving code generation for the cases that regressed.

RE: [PATCH] PR target/104345: Use nvptx "set" instruction for cond ? -1 : 0.

2022-02-04 Thread Roger Sayle
Hi Thomas, Very many thanks for your help investigating this problem. > > This patch addresses the "increased register pressure" regression > > on nvptx-none caused by my change to transition the backend to > > a STORE_FLAG_VALUE = 1 target. > > Yes, "addresses", but unfortunately doesn't "res

[PATCH] nvptx: Tweak constraints on copysign instructions.

2022-02-08 Thread Roger Sayle
rnel, for a net performance win. This patch has been tested on nvptx-none hosted on x86_64-pc-linux-gnu with a "make" and "make -k check" with no new failures. Ok for mainline? 2022-02-08 Roger Sayle gcc/ChangeLog * config/nvptx/nvptx.md (copysign3): Allow immediate

[PATCH] PR tree-optimization/104420: Fix checks for constant folding X*0.0

2022-02-08 Thread Roger Sayle
wrong behaviour. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check no new failures. Ok for mainline? 2022-02-08 Roger Sayle gcc/ChangeLog PR tree-optimization/104420 * match.pd (mult @0 real_zerop): Tweak conditions for constant fo

[PATCH] middle-end: Support ABIs that pass FP values as wider integers.

2022-02-09 Thread Roger Sayle
check with no new failures, and on nvptx-none, where it is the middle-end portion of a pair of patches to allow the default ISA to be advanced. Ok for mainline? 2022-02-09 Roger Sayle gcc/ChangeLog * cfgexpand.cc (expand_value_return): Allow backends to promote a scalar floating

[PATCH] gfortran: Respect target's NO_DOT_IN_LABEL in trans-common.cc

2022-02-10 Thread Roger Sayle
fewer failures in the gfortran testsuite described above. Ok for mainline? 2022-02-10 Roger Sayle gcc/fortran/ChangeLog * trans-common.cc (GFC_EQUIV_FMT): New macro respecting the target's NO_DOT_IN_LABEL and NO_DOLLAR_IN_LABEL preferences. (build_equiv_decl):

[PATCH] nvptx: Back-end portion of a fix for PR target/104489.

2022-02-11 Thread Roger Sayle
k for mainline? 2022-02-11 Roger Sayle gcc/ChangeLog PR target/104489 * config/nvptx/nvptx.md (*movhf_insn): Add subregs_ok attribute. Thanks in advance, Roger -- diff --git a/gcc/config/nvptx/nvptx.md b/gcc/config/nvptx/nvptx.md index 92768dd..3f1a4a6 100644 --- a/gcc/config/

[PATCH] PR c/104506: Tolerate error_mark_node in useless_type_conversion_p.

2022-02-14 Thread Roger Sayle
bootstrap and make -k check with no new failures. Ok for mainline? 2022-02-14 Roger Sayle gcc/ChangeLog PR c/104506 * gimple-expr.cc (useless_type_conversion_p): Add a check for error_mark_node. gcc/testsuite/ChangeLog PR c/104506 * gcc.dg/pr104506.c: New test case.

[PATCH] PR middle-end/65855: Scalar evolution for quadratic chrecs

2022-02-18 Thread Roger Sayle
ap and make -k check with no new failures. Ok for mainline? 2022-02-18 Roger Sayle Richard Biener gcc/ChangeLog PR target/65855 PR c/80852 * tree-chrec.cc (chrec_fold_divide_by_2): New function to divide a chrec by two, honoring the type of the

[PATCH] Improved constant folding for scalar evolution.

2022-02-20 Thread Roger Sayle
fied further: final value replacement: with expr: x_3(D) * x_3(D) This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-02-20 Roger Sayle gcc/ChangeLog * tree-chrec.cc (chrec_apply): Attempt to fold

[PATCH] PR tree-optimization/83907: Improved memset handling in strlen pass.

2022-02-20 Thread Roger Sayle
stored "string" starts with a zero byte but also contains non-zero bytes. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-02-20 Roger Sayle gcc/ChangeLog PR tree-optimization/83907

[PATCH] Implement constant-folding simplifications of reductions.

2022-02-20 Thread Roger Sayle
lures. Ok for mainline? 2022-02-21 Roger Sayle gcc/ChangeLog * fold-const.cc (ctor_single_nonzero_element): New function to return the single non-zero element of a (vector) constructor. * fold-const.h (ctor_single_nonzero_element): Prototype here. * match.pd (

RE: [PATCH] Implement constant-folding simplifications of reductions.

2022-02-21 Thread Roger Sayle
istinguish negative zeros from positive zeros in ctor_single_nonzero_element (but it's perhaps something to beware of in uses of VECTOR_CST's single_nonzero_element). Cheers, Roger -- > -Original Message- > From: Marc Glisse > Sent: 21 February 2022 08:21 > To: Roger Sayl

[PATCH] c++: PR c++/95999: Improved error recovery in enumeration lists.

2022-02-21 Thread Roger Sayle
es as though they are error_mark_node. This patch has been tested on x86_64-pc-linunx-gnu with make bootstrap and make -k check with no new (unexpected) failures. Ok for mainline? 2022-02-21 Roger Sayle gcc/cp/ChangeLog PR c++/95999 * decl.cc (finish_enum_value_list): If VALUE isn

[C++ PATCH] PR c++/96442: Another improved error recovery in enumerations.

2022-02-22 Thread Roger Sayle
in a variable makes the change look a little bigger. This patch has been tested on x86_64-pc-linunx-gnu with make bootstrap and make -k check with no new (unexpected) failures. Ok for mainline? 2022-02-22 Roger Sayle gcc/cp/ChangeLog PR c++/96442 * decl.cc (build_enumeration):

[PATCH] Restore bootstrap on x86_64-pc-linux-gnu

2022-02-22 Thread Roger Sayle
This patch resolves the bootstrap failure on x86_64-pc-linux-gnu. Is this sufficiently "obvious" in stage4, or should I wait for the bootstrap and regression testing to complete? 2022-02-22 Roger Sayle gcc/ChangeLog * config/i386/i386-expand.cc (ix86_expand_cmpxchg_loop

RE: [PATCH] middle-end: Support ABIs that pass FP values as wider integers.

2022-02-22 Thread Roger Sayle
UBREGs was tightened up, so this might be considered a regression. Cheers, Roger -- > -Original Message- > From: Tom de Vries > Sent: 22 February 2022 15:43 > To: Roger Sayle ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] middle-end: Support ABIs that pass FP values as w

RE: [PATCH] middle-end: Support ABIs that pass FP values as wider integers.

2022-02-22 Thread Roger Sayle
>> Anyway, I checked what cuda does for HF, and it passes a byte array: >>> .param .align 2 .b8 _Z5helloPj6__halfs_param_1[2], ... > > > > The one precedent that I can point to is that LLVM's nvptx backend passes > > HFmode values in SImode regs, see https://reviews.llvm.org/D28540 > > Interes

[PATCH] PR middle-end/95126: Expand small const structs as immediate constants.

2022-02-26 Thread Roger Sayle
mainline? 2022-02-26 Roger Sayle gcc/ChangeLog PR middle-end/95126 * calls.cc (load_register_parameters): When loading a suitable immediate_const_ctor_p VAR_DECL into a single word_mode register, construct it directly in a pseudo rather than read it (by parts

[PATCH] PR c++/39751: ICE-on-invalid parsing regression.

2022-02-26 Thread Roger Sayle
d on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new (unexpected) failures. Ok for mainline? 2022-02-26 Roger Sayle gcc/cp/ChangeLog PR c++/39751 * parser.cc (cp_parser_late_parsing_for_member): Confirm the token stream hasn't been

[PATCH] PR middle-end/80270: ICE in extract_bit_field_1

2022-02-27 Thread Roger Sayle
re calling simplify_gen_subreg. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2022-02-27 Roger Sayle gcc/ChangeLog PR middle-end/80270 * expmed.cc (extract_integral_bit_field): If OP0

[PATCH] PR c++/84964: Middle-end patch to expand_call for ICE after sorry.

2022-02-27 Thread Roger Sayle
with no new failures. Ok for mainline? 2022-02-28 Roger Sayle gcc/ChangeLog PR c++/84964 * calls.cc (expand_call): Ignore stack adjustments after sorry. gcc/testsuite/ChangeLog PR c++/84964 * g++.dg/pr84964.C: New test case. Thanks in advance, Roger

[x86_64 PATCH] PR tree-opt/91384: peephole2 to eliminate testl after negl.

2022-02-28 Thread Roger Sayle
egression) during peephole2 to eliminate the unnecessary testl in: movl%edi, %ebx negl%ebx testl %edi, %edi je .L2 Tested on x86_64-pc-linux-gnu with make bootstrap and make -k check, both with and without --target_board='unix{-m32\ -march=cascadelake}

[PATCH take 2] ivopts: Improve code generated for very simple loops.

2021-11-18 Thread Roger Sayle
Hi Richard, Many thanks for the patch review. On Tue, Nov 16, 2021 at 12:38 Richard Biener wrote: > On Mon, Nov 15, 2021 at 2:04 PM Roger Sayle > wrote: > > > > This patch tidies up the code that GCC generates for simple loops, by > > selecting/generating a simpler

[PATCH] Tweak tree-ssa-math-opts.c to solve PR target/102117

2021-11-20 Thread Roger Sayle
4-pc-linux-gnu with a bootstrap and regression test just to confirm that there are no unanticipated side-effects. Ok for mainline? 2021-11-20 Roger Sayle Robin Dapp gcc/ChangeLog PR target/102117 * tree-ssa-math-opts.c (convert_mult_to_widen): Recognize

[PATCH] tree-optimization/103345: Improved load merging

2021-11-22 Thread Roger Sayle
an targets. Ok for mainline? 2021-11-22 Roger Sayle gcc/ChangeLog PR tree-optimization/98953 PR tree-optimization/103345 * gimple-ssa-store-merging.c (find_bswap_or_nop_1): Handle BIT_XOR_EXPR and PLUS_EXPR the same as BIT_IOR_EXPR. (pass_optimize

[PATCH] PR middle-end/103406: Check for Inf before simplifying x-x.

2021-11-25 Thread Roger Sayle
p and make -k check with no new failures. Ok for mainline? 2021-11-25 Roger Sayle gcc/ChangeLog PR middle-end/103406 * match.pd (minus @0 @0): Check tree_expr_maybe_infinite_p. gcc/testsuite/ChangeLog PR middle-end/103406 * gcc.dg/pr103406.c: New test case.

[PATCH take 3] ivopts: Improve code generated for very simple loops.

2021-11-25 Thread Roger Sayle
On Tue, Nov 23, 2021 at 12:46PM Richard Biener < richard.guent...@gmail.com> wrote: > On Thu, Nov 18, 2021 at 4:18 PM Roger Sayle > wrote: > > > The patch doesn't add any testcase. > > > > The three new attached tests check that the critical invariants

[PATCH] x86_64: PR target/100711: Splitters for pandn

2021-11-28 Thread Roger Sayle
lures. Ok for mainline? 2021-11-28 Roger Sayle gcc/ChangeLog PR target/100711 * config/i386/sse.md (define_split): New splitters to simplify not;vec_duplicate;and as vec_duplicate;andn. gcc/testsuite/ChangeLog PR target/100711 * gcc.target/i386/pr10071

[PATCH] x86_64: Improved V1TImode rotations by non-constant amounts.

2021-11-28 Thread Roger Sayle
mm0, %xmm0 ret This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2021-11-28 Roger Sayle gcc/ChangeLog * config/i386/i386-expand.c (ix86_expand_v1ti_to_ti): Perform the convers

[PATCH] Final value replacement improvements for until-wrap loops.

2021-11-29 Thread Roger Sayle
t": (X + 1) > Y ? -X : 1 simplifies to X >= Y ? -X : 1 when X is unsigned, as when X + 1 overflows, X is -1, so -X == 1. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2021-11-29 Roger Sayle

[PATCH take #2] x86_64: PR target/100711: Splitters for pandn

2021-11-29 Thread Roger Sayle
nline? 2021-11-29 Roger Sayle Uroš Bizjak gcc/ChangeLog PR target/100711 * config/i386/sse.md (define_split): New splitters to simplify not;vec_duplicate;and as vec_duplicate;andn. gcc/testsuite/ChangeLog PR target/100711 * gcc.target/i386/pr100

[Committed] PR testsuite/103477: Fix big-endian mistake in new test case.

2021-11-30 Thread Roger Sayle
I missed a spot when adding the "#if __BYTE_ORDER__ == ..." guards to the new test case for PR tree-optimization/103345. Committed as obvious. 2021-11-30 Roger Sayle gcc/testsuite/ChangeLog PR testsuite/103477 * gcc.dg/tree-ssa/pr103345.c: Correct xor test for

RE: [PATCH] Final value replacement improvements for until-wrap loops.

2021-12-01 Thread Roger Sayle
Hi Richard, Many thanks for the review. Here's the final version that I've committed, including your suggested improvements, following another make bootstrap and make -k check on x86_64-pc-linux-gnu with no new failures. Thanks again. 2021-12-01 Roger Sayle Rich

[PATCH] PR target/43892: Some carry flag (CA) optimizations on PowerPC.

2021-12-02 Thread Roger Sayle
addze 3,3 blr This patch has been tested on powerpc64-unknown-linux-gnu (many thanks to gcc203.fsffrance.org on the GCC compile farm) with a make bootstrap and make -k check with now new failures. Ok for mainline? 2021-12-02 Roger Sayle gcc/ChangeLog PR target/

[PATCH take #2] PR target/43892: Some carry flag (CA) optimizations on PowerPC.

2021-12-03 Thread Roger Sayle
blr add_geu: subfc 5,5,4 addze 3,3 blr This patch has been tested on powerpc64-unknown-linux-gnu (many thanks to gcc203.fsffrance.org on the GCC compile farm) with a make bootstrap and make -k check with now new failures. Ok for mainline? 2021-12-03 Roger Sayle

[PATCH] PR ipa/103601: ICE compiling CSiBE in ipa-modref's insert_kill

2021-12-10 Thread Roger Sayle
ation [but I'm happy to change this]. This patch has been tested on x86_64-pc-linux-gnu with a make bootstrap and make -k check with no new failures. Ok for mainline? 2021-12-10 Roger Sayle gcc/ChangeLog PR ipa/103601 * ipa-modref-tree.h (useful_for_kill_p)

[PATCH] x86_64: Improve code expanded for highpart multiplications.

2021-12-10 Thread Roger Sayle
passes, ensures that the code we generate isn't adversely affected by changes outside the backend. Ok for mainline? 2021-12-10 Roger Sayle gcc/ChangeLog * config/i386/i386.md (any_mul_highpart): New code iterator. (sgnprefix, s): Add attribute support for [su]mul_highpart.

[PATCH] Improved handling of REG_UNUSED notes on PARALLEL in try_combine.

2021-12-10 Thread Roger Sayle
ps://gcc.gnu.org/pipermail/gcc-patches/2021-December/585977.html) I'll include a testcase for this functionality with the final rs6000 backend patch in the series. Ok for mainline? 2021-12-10 Roger Sayle gcc/ChangeLog * combine.c (try_combine): When I2 or I3 is PARALLEL without

[PATCH] mips: Improved RTL representation of wsbh/dsbh/dshd

2021-12-10 Thread Roger Sayle
nable-multilib --enable-targets=all --with-arch-32=mips32r2 --with-arch-64=mips64r2 (thanks to the compile farm's gcc230.fsffrance.org) and a cross-compiler to mips64-linux-gnu hosted on x86_64-pc-linux-gnu. Ok for mainline? 2021-12-10 Roger Sayle gcc/ChangeLog * config/m

[PATCH] PR target/32803: Add -Oz option for improved clang compatibility.

2021-12-10 Thread Roger Sayle
ement (3703513 bytes total down to 3668516 bytes). This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2021-12-10 Roger Sayle gcc/ChangeLog PR target/32803 * common.opt (Oz): New command line option.

[x86 PATCH] PR target/106577: force_reg may clobber operands during split.

2022-08-12 Thread Roger Sayle
-m32}, with no new failures. Ok for mainline? 2022-08-12 Roger Sayle gcc/ChangeLog PR target/106577 * config/i386/i386.md (*testti_doubleword): Preserve a copy of operands[0], and move initialization of operands[2] later, as the call to force_reg may clobber the c

[x86 PATCH take #2] Move V1TI shift/rotate lowering from expand to pre-reload split.

2022-08-12 Thread Roger Sayle
lures. Ok for mainline? 2022-08-12 Roger Sayle Uroš Bizjak gcc/ChangeLog * config/i386/predicates.md (const_0_to_255_not_mul_8_operand): New predicate for values between 0/1 and 255, not multiples of 8. * config/i386/sse.md (ashlv1ti3): Delay lowering

<    1   2   3   4   5   6   7   >