[PATCH] MATCH: `(nop_convert)-(convert)a` into -(convert)a if we are converting from something smaller

2023-09-02 Thread Andrew Pinski via Gcc-patches
This allows removal of one conversion and in the case of booleans, might be able to remove the negate and the other conversion later on. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/107137 gcc/ChangeLog: * match.pd (`(nop_convert)-(c

[PATCH v2] LoongArch: Support storing floating-point zero into MEM[base + index].

2023-09-02 Thread Guo Jie
v2: Modify commit message. gcc/ChangeLog: * config/loongarch/loongarch.md: Support 'G' -> 'k' in movsf_hardfloat and movdf_hardfloat. gcc/testsuite/ChangeLog: * gcc.target/loongarch/const-double-zero-stx.c: New test. --- gcc/config/loongarch/loongarch.md |

Re: [committed] libstdc++: Fix compare_exchange_padding.cc test for std::atomic_ref

2023-09-02 Thread Eric Botcazou via Gcc-patches
> This should be fixed now. I rewrote the test to check the padding byte > directly, instead of inspecting a copy of it which might not preserve > the padding bits. Great, thanks! -- Eric Botcazou

Re: [PATCH 1/2] LoongArch: Optimize switch with sign-extended index.

2023-09-02 Thread WANG Xuerui
On 9/2/23 14:24, Lulu Cheng wrote: The patch refers to the submission of RISCV 7bbce9b50302959286381d9177818642bceaf301. gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_extend_comparands): In unsigned QImode test, check for sign extended subreg and/or constant

Re: [PATCH 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-09-02 Thread waffl3x via Gcc-patches
Hey Jakub, thanks for the response and criticism, as soon as I am back at a computer I will address the issues you raised, I have a few questions though. I apologize in advanced for any errors in formatting this message, I'm writing it from a hotel room on a phone so errors are inevitable, but I'l

[PATCH v1] RISC-V: Support FP MAX/MIN autovec for VLS mode

2023-09-02 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to allow the VLS mode autovec for the floating-point binary operation MAX/MIN. Given below code example: test (float *out, float *in1, float *in2) { for (int i = 0; i < 128; i++) out[i] = in1[i] > in2[i] ? in1[i] : in2[i]; // Or out[i] = fmax (in1[i]

Re: [PATCH 14/12] libgcc _BitInt helper documentation [PR102989]

2023-09-02 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 01, 2023 at 09:32:22PM +, Joseph Myers wrote: > This patch is OK with those fixes. Thanks, here is the updated patch. Queued with the rest of approved patches. 2023-09-02 Jakub Jelinek PR c/102989 gcc/ * doc/libgcc.texi (Bit-precise integer arithmetic function

Re: [PATCH 9/12] libgcc _BitInt support [PR102989]

2023-09-02 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 01, 2023 at 09:48:22PM +, Joseph Myers wrote: > This patch is OK with these fixes. Thanks, here is an updated patch, thanks for catching the _Decimal128 bug. Will post testsuite additions/adjustment patch as follow-up on Monday. 2023-09-02 Jakub Jelinek PR c/102989 li

[pushed] wwwdocs: *: Use "back end" instead of "backend"

2023-09-02 Thread Gerald Pfeifer
Per http://gcc.gnu.org/codingconventions.html#Spelling Pushed. Gerald --- htdocs/egcs-1.0/index.html| 2 +- htdocs/egcs-1.1/features.html | 2 +- htdocs/egcs-1.1/index.html| 2 +- htdocs/gcc-11/changes.html| 2 +- htdocs/gcc-12/changes.html| 2 +- htdocs/gcc-2.95/features.h

[PATCH 2/3] MATCH: Improve zero_one_valued_p by using ssa_name_has_boolean_range

2023-09-02 Thread Andrew Pinski via Gcc-patches
Currently zero_one_valued_p uses tree_nonzero_bits which uses the global ranges of the SSA Names. We can improve this via using ssa_name_has_boolean_range which uses the local ranges which are used while handling folding during VRP and other passes. OK? Bootstrapped and tested on x86_64 with no re

[PATCH 1/3] Improve ssa_name_has_boolean_range slightly

2023-09-02 Thread Andrew Pinski via Gcc-patches
Right now ssa_name_has_boolean_range compares the range to range_true_and_false but instead we would get the nonzero bits and compare that to 1 instead (<=u 1). The nonzerobits comparison can be done in similar fashion. Note I think get_nonzero_bits is redundant as the range queury will return a mo

[PATCH 3/3] MATCH: Replace all uses of ssa_name_has_boolean_range with zero_one_valued_p

2023-09-02 Thread Andrew Pinski via Gcc-patches
This replaces all uses of ssa_name_has_boolean_range with zero_one_valued_p except for the one in the definition of zero_one_valued_p. This simplifies the code in general and makes only one way of saying we have a range of [0,1]. Note this depends on the patch that adds ssa_name_has_boolean_range

Re: [PATCH v1] RISC-V: Support FP MAX/MIN autovec for VLS mode

2023-09-02 Thread Kito Cheng via Gcc-patches
Ok Pan Li via Gcc-patches 於 2023年9月2日 週六,16:54寫道: > From: Pan Li > > This patch would like to allow the VLS mode autovec for the > floating-point binary operation MAX/MIN. > > Given below code example: > > test (float *out, float *in1, float *in2) > { > for (int i = 0; i < 128; i++) > out[

RE: [PATCH v1] RISC-V: Support FP MAX/MIN autovec for VLS mode

2023-09-02 Thread Li, Pan2 via Gcc-patches
Committed, thanks Kito. Pan From: Kito Cheng Sent: Saturday, September 2, 2023 11:41 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; Wang, Yanzhang Subject: Re: [PATCH v1] RISC-V: Support FP MAX/MIN autovec for VLS mode Ok Pan Li via Gcc-patches mailto:gcc-patches@gcc.gn