[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

[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): Check

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

2022-02-21 Thread Roger Sayle
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't

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

2022-02-21 Thread Roger Sayle
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 Sayle > Cc: gcc-patc

[PATCH] Implement constant-folding simplifications of reductions.

2022-02-20 Thread Roger Sayle
. 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 (reduc

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

2022-02-20 Thread Roger Sayle
; 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 * tree-ssa-strlen.cc (h

[PATCH] Improved constant folding for scalar evolution.

2022-02-20 Thread Roger Sayle
lue 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 the linear ch

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

2022-02-18 Thread Roger Sayle
heck 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 chrec. (

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

2022-02-14 Thread Roger Sayle
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. Roger

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

2022-02-11 Thread Roger Sayle
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/nvptx

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

2022-02-10 Thread Roger Sayle
e 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): Use GFC_EQUIV_FMT here

[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] PR tree-optimization/104420: Fix checks for constant folding X*0.0

2022-02-08 Thread Roger Sayle
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 folding

[PATCH] nvptx: Tweak constraints on copysign instructions.

2022-02-08 Thread Roger Sayle
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 floa

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

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

2022-02-03 Thread Roger Sayle
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. Ok for ma

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

2022-02-03 Thread Roger Sayle
n. 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 splitting a parallel into two s

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

2022-02-01 Thread Roger Sayle
nsidered 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 gcc/Chan

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

2022-01-21 Thread Roger Sayle
d 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/ChangeLog * tree-ssa-m

[PATCH] nvptx: Fix and use BI mode logic instructions (e.g. and.pred).

2022-01-16 Thread Roger Sayle
-k check with no new failures. Ok for mainline? 2022-01-16 Roger Sayle gcc/ChangeLog * config/nvptx/nvptx.md (any_logic): Move code iterator earlier in machine description. (logic): Move code attribute earlier in machine description. (ilogic): New code attribute, li

[PATCH] nvptx: Add support for 64-bit mul.hi (and other) instructions.

2022-01-14 Thread Roger Sayle
een tested on nvptx-none hosted on x86_64-pc-linux-gnu (including newlib) with a make and make -k check with no new failures. Ok for mainline? 2022-01-14 Roger Sayle gcc/ChangeLog * config/nvptx/nvptx.md (UNSPEC_ISINF): New UNSPEC. (one_cmplbi2): New define_insn for not.pred.

RE: [PATCH] x86_64: Improvements to arithmetic right shifts of V1TImode values.

2022-01-14 Thread Roger Sayle
. 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? 2022-01-14 Roger Sayle Uroš Bizjak gcc/ChangeLog * config/i386/i386-expand.c (ix86_expand_v1ti_to_ti): Use force_reg. (ix86_expand_ti_to_v1ti

[PATCH] x86_64: Improvements to arithmetic right shifts of V1TImode values.

2022-01-11 Thread Roger Sayle
idiom is safe to use for shifts by 127, but that case gets handled by a two operation sequence earlier in this function. 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? 2022-01-11 Roger Sayle gcc/Cha

[PATCH] nvptx: Expand QI mode operations using SI mode instructions.

2022-01-10 Thread Roger Sayle
selp.u32%r38, 1, 0, %r34; and.b32 %value, %r37, %r38; This patch has been tested on nvptx-none hosted on x86_64-pc-linux-gnu (including newlib) with a make and make -k check with no new failures. Ok for mainline? 2022-01-10 Roger Sayle gcc/ChangeLog * config/nvptx/

[PATCH] nvptx: Improved support for HFMode including neghf2 and abshf2.

2022-01-08 Thread Roger Sayle
th variant (or revisit this decision). This patch has been tested on nvptx-none hosted on x86_64-pc-linux-gnu (including newlib) with a make and make -k check with no new failures. Ok for mainline? 2022-01-08 Roger Sayle gcc/ChangeLog * config/nvptx/nvptx.md (*cmpf): New define_insn.

[PATCH take #3] Recognize MULT_HIGHPART_EXPR in tree-ssa-math-opts pass.

2022-01-06 Thread Roger Sayle
to work. This patch has been tested on x86_64-pc-linux-gnu with a make bootstrap and make -k check (both with and without --target_board='unix{-m32}') with no new regressions. Ok for mainline? 2022-01-06 Roger Sayle gcc/ChangeLog * tree-ssa-math-opts.c (struct w

[PATCH] x86_64: Improve (interunit) moves from TImode to V1TImode.

2022-01-06 Thread Roger Sayle
m0 ret Hence the solution (i.e. this patch) is to add a special case to ix86_expand_vector_move for TImode to V1TImode transfers. 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-01-06

[PATCH] nvptx: Add support for PTX's cnot instruction.

2022-01-06 Thread Roger Sayle
-linux-gnu (including newlib) with a make and make -k check with no new failures. Ok for mainline? 2022-01-06 Roger Sayle gcc/ChangeLog * config/nvptx/nvptx.md (*cnot2): New define_insn. gcc/testsuite/ChangeLog * gcc.target/nvptx/cnot-1.c: New test case. Thanks in advance

[PATCH take #3] PR target/103773: Fix wrong-code with -Oz from pop to memory.

2021-12-23 Thread Roger Sayle
and make -k check with no new failures, and the new testcase checked both with and without -m32. Ok for mainline? 2021-12-23 Roger Sayle Uroš Bizjak gcc/ChangeLog PR target/103773 * config/i386/i386.md (*mov_and): New define_insn for writing a zero to memory

RE: [PATCH] PR target/103773: Fix wrong-code with -Oz from pop to memory.

2021-12-22 Thread Roger Sayle
g included the 0/-1 write to memory changes). Tested (overnight) on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures. 2021-12-22 Roger Sayle gcc/ChangeLog PR target/103773 * config/i386/i386.md (*movdi_internal): Only use short push/po

[PATCH] x86: Shrink writing 0/-1 to memory using and/or with -Oz.

2021-12-21 Thread Roger Sayle
and the new testcase checked both with and without -m32. Ok for mainline? 2021-12-21 Roger Sayle gcc/ChangeLog * gcc/config/i386/i386.md (define_peephole2): With -Oz use andl $0,mem instead of movl $0,mem and orl $-1,mem instead of movl $-1,mem. gcc

[PATCH] PR target/103773: Fix wrong-code with -Oz from pop to memory.

2021-12-21 Thread Roger Sayle
and make -k check with no new failures. Ok for mainline? 2021-12-21 Roger Sayle gcc/ChangeLog PR target/103773 * config/i386/i386.md (*movdi_internal): Only use short push/pop sequence for register (non-memory) destinations. (*movsi_internal): Likewise. gcc/testsuite

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

2021-12-20 Thread Roger Sayle
(with and without RUNTESTFLAGS="--target_board='unix{-m32}'") with no new failures. Ok for mainline? 2021-12-20 Roger Sayle Uroš Bizjak gcc/ChangeLog * config/i386/i386.md (any_mul_highpart): New code iterator. (sgnprefix, s): Add attribute support for [su]mu

[PATCH] x86: PR target/103611: Splitter for DST:DI = (HI:SI<<32)|LO:SI.

2021-12-13 Thread Roger Sayle
reasonable (but this patch has been tested both with and without this last change, if it's consider controversial). This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check, both with and without "--target_board='unix{-m32}'" with no new failures. OK for mainl

[PATCH] PR target/103611: Avoid generating orb $0, %ah on x86.

2021-12-13 Thread Roger Sayle
t splitter, either eliminating the instruction or turning it into a simple move. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check, both with and without "--target_board='unix{-m32}'" with no new failures. OK for mainline? 2021-12-13 Roger Sayle gcc

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

2021-12-10 Thread Roger Sayle
3513 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. * lto

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

2021-12-10 Thread Roger Sayle
-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/mips/mips.c

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

2021-12-10 Thread Roger Sayle
l/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 clobbers that is eff

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

2021-12-10 Thread Roger Sayle
nsures 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. (mul3_hi

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

2021-12-10 Thread Roger Sayle
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): Zero width ac

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

2021-12-03 Thread Roger Sayle
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 gcc/Chan

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

2021-12-02 Thread Roger Sayle
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/43892

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 Richard Biener

[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

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

2021-11-29 Thread Roger Sayle
? 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/pr100711-1

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

2021-11-29 Thread Roger Sayle
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 gcc/Chang

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

2021-11-28 Thread Roger Sayle
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 conversion via V2

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

2021-11-28 Thread Roger Sayle
. 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/pr100711-1.c

[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 have

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

2021-11-25 Thread Roger Sayle
-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. Thanks

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

2021-11-22 Thread Roger Sayle
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_bswap::execute

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

2021-11-20 Thread Roger Sayle
-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 signed

[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 simpl

[PATCH] x86_64: Avoid rorx rotation instructions with -Os

2021-11-15 Thread Roger Sayle
-linux-gnu with make bootstrap and make -k check with no new failures. Ok for mainline? 2021-11-15 Roger Sayle gcc/ChangeLog * config/i386/i386.md (*bmi2_rorx_1): Make conditional on !optimize_function_for_size_p. (*3_1): Add preferred_for_size at

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

2021-11-15 Thread Roger Sayle
%rdx, (%rsi,%rax) addq$8, %rax cmpq%rax, %rcx jne .L3 .L1:ret 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-11-15 Roger Sayle gcc/ChangeLog * tree-ssa-loop-ivopts.

RE: Some PINGs

2021-11-08 Thread Roger Sayle
Hi Richard, >> I wonder if reviewers could take a look (or a second look) at some of >> my outstanding patches. >> PR middle-end/100810: Penalize IV candidates with undefined value >> bases >> https://gcc.gnu.org/pipermail/gcc-patches/2021-August/578441.html > > I did comment on this one,

RE: Some PINGs

2021-11-07 Thread Roger Sayle
>On 11/6/2021 4:20 PM, Roger Sayle wrote: >> Simplify paradoxical subreg extensions of TRUNCATE >> https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578848.html > So the discussion seemed to end with a recommendation to try and address this > earlier in the c

Some PINGs

2021-11-06 Thread Roger Sayle
I wonder if reviewers could take a look (or a second look) at some of my outstanding patches. Four nvptx backend patches: nvptx: Use cvt to perform sign-extension of truncation. https://gcc.gnu.org/pipermail/gcc-patches/2021-August/578256.html nvptx: Add (experimental) support for HFmode with

[PATCH] x86_64: Improved implementation of TImode rotations.

2021-11-01 Thread Roger Sayle
and make -k check with no new failures. Interestingly the correct behaviour is already tested by (amongst other tests) sse2-v1ti-shift-3.c that confirms V1TImode rotates by constants match rotlti3/rotrti3. Ok for mainline? 2021-11-01 Roger Sayle * config/i386/i386.md (ti3): Provi

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

2021-10-31 Thread Roger Sayle
Roger Sayle Jakub Jelinek gcc/ChangeLog PR target/102986 * config/i386/i386-expand.c (ix86_expand_v1ti_to_ti, ix86_expand_ti_to_v1ti): New helper functions. (ix86_expand_v1ti_shift): Check if the amount operand is an integer constant, and expand

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

2021-10-30 Thread Roger Sayle
, but the functionality overlaps and this patch was nearly ready to submit to gcc-patches when 102986 appeared in bugzilla. 2021-10-30 Roger Sayle gcc/ChangeLog PR target/102986 * config/i386/i386-expand.c (ix86_expand_v1ti_to_ti, ix86_expand_ti_to_v1ti): New helper functions

RE: [PATCH] x86_64: Implement V1TI mode shifts/rotates by a constant

2021-10-25 Thread Roger Sayle
bytes, shrinks to 5 bytes with this patch). Please let me know what you think. Roger -- -Original Message- From: Uros Bizjak Sent: 25 October 2021 09:02 To: Roger Sayle Cc: GCC Patches Subject: Re: [PATCH] x86_64: Implement V1TI mode shifts/rotates by a constant On Sun, Oct 24, 2021

[PATCH] Constant fold/simplify SS_ASHIFT and US_ASHIFT in simplify-rtx.c

2021-10-25 Thread Roger Sayle
rts; _stest_sat_min: nop; nop; nop; R0 = -32768 (X); rts; This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check with no new failures, and on a cross-compiler to bfin-elf with no regressions. Ok for mainline? 2021-

[PATCH] x86_64: Implement V1TI mode shifts/rotates by a constant

2021-10-24 Thread Roger Sayle
with no new failures. Ok for mainline? 2021-10-24 Roger Sayle gcc/ChangeLog * config/i386/i386-expand.c (ix86_expand_v1ti_shift): New helper function to expand V1TI mode logical shifts by integer constants. (ix86_expand_v1ti_rotate): New helper function to expand V1TI

[Committed] Correct testcase gcc.target/bfin/20090914-3.c

2021-10-24 Thread Roger Sayle
g the code into a function returning the final "fract32" result, as simply specifying an "int" return type for main, results in the entire function being optimized away, as the result is unused. Checked-in as obvious. 2021-10-24 Roger Sayle gcc/testsuite/ChangeLog

[PATCH] x86_64: Add insn patterns for V1TI mode logic operations.

2021-10-22 Thread Roger Sayle
check" with no new failures. Ok for mainline? 2021-10-22 Roger Sayle gcc/ChangeLog * config/i386/sse.md (v1ti3): New define_insn to implement V1TImode AND, IOR and XOR on TARGET_SSE2 (and above). (one_cmplv1ti2): New define expand. gcc/testsuite/ChangeLog

[PATCH] PR target/102785: Correct addsub/subadd patterns on bfin.

2021-10-18 Thread Roger Sayle
evaluating these expressions at compile-time, when the mismatch was caught by the testsuite. Many thanks to Jeff Law for confirming that this patch fixes these regressions on bfin-elf. Ok for mainline? 2021-10-18 Roger Sayle gcc/ChangeLog PR target/102785 * config/bfin/bfin.md

[PATCH] bfin: Popcount-related improvements to machine description.

2021-10-17 Thread Roger Sayle
); R0.L = ONES R0; R0 = R1 & R0; rts; This patch has been tested on a cross-compiler to bfin-elf hosted on x86_64-pc-linux-gnu, but without a toolchain, and shows no regressions in the compile-only parts of the testsuite. Ok for mainline? 2021-10-17 Roger Sayle gcc/Chang

[PATCH] Constant fold SS_NEG and SS_ABS in simplify-rtx.c

2021-10-17 Thread Roger Sayle
to: _foo: nop; nop; nop; R0 = 32767 (X); rts; _bar: nop; nop; R0 = -1 (X); R0.H = 32767; rts; This patch has been tested on x86_64-pc-linux-gnu with "make bootstrap" and "make -k check" with no new failures. Ok for

[PATCH] Allow early sets of SSE hard registers from standard_sse_constant_p

2021-10-15 Thread Roger Sayle
uot;make bootstrap" and "make -k check" on x86_64-pc-linux-gnu with no new failures. Ok for mainline? Sorry again for the temporary inconvenience. 2021-10-15 Roger Sayle gcc/ChangeLog * config/i386/i386.c (ix86_hardreg_mov_ok): For vector modes, allow standard_s

[PATCH v2] x86_64: Some SUBREG related optimization tweaks to i386 backend.

2021-10-13 Thread Roger Sayle
. I've left the existing behaviour the same, so that memory-to-memory moves (continue to) use ix86_gen_scatch_sse_rtx. 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-10-13 Roger Sa

[PATCH] x86_64: Some SUBREG related optimization tweaks to i386 backend.

2021-10-11 Thread Roger Sayle
-pc-linux-gnu with "make bootstrap" and "make -k check" with no new failures. In theory, my recent "obvious" regexp fix to accommodate -march=cascadelake is no longer required, but there's no harm leaving the testsuite as it is. Ok for mainline? 2021-10-11

[Committed] Tweak new test cases for -march=cascadelake strangeness.

2021-10-08 Thread Roger Sayle
of these differences. Tested on x86_64-pc-linux-gnu (with and without -march=cascadelake). 2021-10-08 Roger Sayle gcc/testsuite/ChangeLog * gcc.target/i386/sse2-mmx-paddsb-2.c: Test for -128 or 128. * gcc.target/i386/sse2-mmx-paddusb-2.c: Test for -1 or 255. * gcc.target

[PATCH] Transition nvptx backend to STORE_FLAG_VALUE = 1

2021-10-05 Thread Roger Sayle
sses to eventually generate a much shorter sequence using an and.pred instruction (just like Nvidia's nvcc compiler). This patch has been tested nvptx-none with a "make" and "make -k check" (including newlib) hosted on x86_64-pc-linux-gnu with no new failures. Ok for mainline? 20

[PATCH] Try placing RTL folded constants in constant pool

2021-10-03 Thread Roger Sayle
atch has been tested on x86_64-pc-linux-gnu with "make bootstrap" and "make -k check" with no new failures. Ok for mainline? 2021-10-03 Roger Sayle gcc/ChangeLog * combine.c (recog_for_combine): For an unrecognized move/set of a constant, try fo

[PATCH #2] Introduce smul_highpart and umul_highpart RTX for high-part multiplications

2021-09-29 Thread Roger Sayle
test cases. 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-09-29 Roger Sayle Richard Sandiford gcc/ChangeLog * gcc/rtl.def (SMUL_HIGHPART, UMUL_HIGH

RE: [PATCH] Make flag_trapping_math a non-binary Boolean.

2021-09-28 Thread Roger Sayle
middle-end. Indeed, if flag_trapping_math is restricted to only be FLAG_TRAPPING_DEFAULT in a front-end(s), they will be. Best regards, Roger -- -Original Message- From: Joseph Myers Sent: 27 September 2021 21:05 To: Roger Sayle Cc: 'GCC Patches' ; 'Eric Botcazou' Subject: Re: [PATCH] Make flag_trap

[RFC] Experimental __attribute__((saturating)) on integer types.

2021-09-26 Thread Roger Sayle
w C-family attribute is unsuitable, is my logic/implementation in handle_saturating_attribute correct? 2021-09-26 Roger Sayle gcc/c-family/ChangeLog * c-attribs (handle_saturating_attribute): New callback function for a "saturating" attribute to set the

[PATCH] Introduce sh_mul and uh_mul RTX codes for high-part multiplications

2021-09-25 Thread Roger Sayle
ref warnings in invoke.texi. 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-09-25 Roger Sayle gcc/ChangeLog * gcc/rtl.def (SH_MULT, UH_MULT): New RTX codes for representing

[PATCH] Make flag_trapping_math a non-binary Boolean.

2021-09-25 Thread Roger Sayle
4-pc-linux-gnu with "make bootstrap" and "make -k check", all languages including Ada, with no new failures. Ok for mainline? 2021-09-25 Roger Sayle gcc/ChangeLog * flag-types.h (trapping_math_model): New enumeration (of bits) specifying possible floating-

RE: [RFC/PATCH] C++ constexpr vs. floating point exceptions.

2021-09-21 Thread Roger Sayle
ember 2021 14:22 To: Roger Sayle ; Jason Merrill ; Jonathan Wakely Cc: 'Xi Ruoyao' ; 'GCC Patches' Subject: Re: [RFC/PATCH] C++ constexpr vs. floating point exceptions. On Tue, Sep 21, 2021 at 02:15:59PM +0100, Roger Sayle wrote: > Can you double check? Integer division by zero is undefined

RE: [RFC/PATCH] C++ constexpr vs. floating point exceptions.

2021-09-21 Thread Roger Sayle
Can you double check? Integer division by zero is undefined, but isn't floating point division by zero defined by the appropriate IEEE standards? Roger -- -Original Message- From: Xi Ruoyao Sent: 21 September 2021 14:07 To: Roger Sayle ; 'GCC Patches' Subject: Re: [RFC/PATCH] C

RE: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-21 Thread Roger Sayle
: Segher Boessenkool ; Richard Biener ; Roger Sayle Subject: Re: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE [Using this is a convenient place to reply to the thread as a whole] Richard Biener via Gcc-patches writes: > On Mon, Sep 6, 2021 at 12:15 PM Segher Boessenkool > w

[RFC/PATCH] C++ constexpr vs. floating point exceptions.

2021-09-21 Thread Roger Sayle
nd considers valid should be independent of whether the user specified -fno-trapping-math (or -ffast-math) to the middle-end. Thoughts? Ok for mainline? 2021-09-21 Roger Sayle gcc/cp/ChangeLog * constexpr.c (cxx_eval_outermost_const_expr): Temporarily disable the middle-end from honori

[PATCH] PR middle-end/88173: More constant folding of NaN comparisons.

2021-09-18 Thread Roger Sayle
k/research whether and why those checks may have been removed in the past]. 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-09-18 Roger Sayle gcc/ChangeLog PR middle-end/88

[PATCH] nvptx: Adds uses of -misa=sm_75 and -misa=sm_80

2021-09-17 Thread Roger Sayle
in future). Are both parts Ok for mainline? 2020-09-17 Roger Sayle gcc/ChangeLog * config/nvptx/nvptx.md (define_c_enum "unspec"): New UNSPEC_TANH. (define_mode_iterator HSFM): New iterator for HFmode and SFmode. (exp2hf2): New define_insn controlled by TARGE

[PATCH] nvptx: Add (experimental) support for HFmode with -misa=sm_53

2021-09-16 Thread Roger Sayle
description (follow-up patches) in future. I'm happy to defer these changes/hunks until later if reviewers prefer. The following 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? 2020-09-16 Roger Sa

[PATCH #2] PR c/102245: Disable sign-changing optimization for shifts by zero.

2021-09-14 Thread Roger Sayle
nd "make -k check" with no new failures. Note that test1 in the new testcase is changed from dg-bogus to dg-warning compared with version #1. Ok for mainline? 2021-09-14 Roger Sayle gcc/ChangeLog PR c/102245 * match.pd (shift optimizations): Disable recent sign

[PATCH] PR c/102245: Don't warn that ((_Bool)x<<0) isn't a truthvalue.

2021-09-13 Thread Roger Sayle
86_64-pc-linux-gnu with "make bootstrap" and "make -k check" with no new failures. Ok for mainline? 2021-09-13 Roger Sayle gcc/c-family/ChangeLog PR c/102245 * c-common.c (c_common_truthvalue_conversion) [LSHIFT_EXPR]: Special case (optimize) sh

[PATCH] Also preserve SUBREG_PROMOTED_VAR_P in expr.c's convert_move.

2021-09-11 Thread Roger Sayle
a problem) minimized the inconvenience]. This patch has been tested on x86_64-pc-linux-gnu with "make bootstrap" and "make -k check" with no new failures, and on a cross-compiler to nvptx-none, with no new failures in its testsuite. OK for mainline? 2021-09-11 Roger Sa

[PATCH Take 2] More NEGATE_EXPR folding in match.pd

2021-09-10 Thread Roger Sayle
t;make -k check" with no new failures. Ok for mainline? 2021-09-10 Roger Sayle Richard Biener gcc/ChangeLog * match.pd (negation simplifications): Implement some negation folding transformations from fold-const.c's fold_negate_expr.

[PATCH] More NEGATE_EXPR folding in match.pd

2021-09-09 Thread Roger Sayle
tested on x86_64-pc-linux-gnu with a "make bootstrap" and "make -k check" with no new failures. Ok for mainline? 2021-09-09 Roger Sayle gcc/ChangeLog * generic-match-head.c (single_use_is_op_p): New helper function. * gimple-match-head.c (single_use_is_

RE: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-06 Thread Roger Sayle
you think. Best regards, Roger -- -Original Message- From: Segher Boessenkool Sent: 06 September 2021 11:14 To: Roger Sayle Cc: 'GCC Patches' Subject: Re: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE On Sun, Sep 05, 2021 at 11:28:30PM +0100, Roger Sayle wrote: >

[PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-05 Thread Roger Sayle
gnu with "make bootstrap" and "make -k check" with no new failures, and also on nvptx-none with no new failures. Ok for mainline? 2021-09-05 Roger Sayle gcc/ChangeLog * simplify-rtx.c (simplify_subreg): Optimize paradoxical subreg extensions of TRUNCATE. R

[PATCH] Correct implementation of wi::clz

2021-09-05 Thread Roger Sayle
is a multiple of HOST_BITS_PER_WIDE_INT. The fix is simply to reorder/shuffle the existing tests. 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-09-05 Roger Sayle gcc/ChangeLog

[Committed] Fix subreg_promoted_mode breakage on various platforms

2021-08-31 Thread Roger Sayle
-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 SUBREG if it can't be

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

2021-08-31 Thread Roger Sayle
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_PROMOTED_VAR_P on (extend:HI

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

2021-08-31 Thread Roger Sayle
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 (non-function) decl

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

2021-08-31 Thread Roger Sayle
pefully, 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 gcc/ChangeLo

RE: [PATCH take 3] Experimental -fpreserve-traps option

2021-08-30 Thread Roger Sayle
, Roger -- -Original Message- From: Richard Biener Sent: 30 August 2021 08:13 To: Roger Sayle Cc: GCC Patches ; Eric Botcazou Subject: Re: [PATCH take 3] Experimental -fpreserve-traps option On Sun, Aug 29, 2021 at 11:28 AM Roger Sayle wrote: > > > This is another attempt to

<    1   2   3   4   5   6   7   >