[PATCH v4 4/4] tree-optimization/116024 - simplify some cases of X +- C1 cmp C2

2024-09-30 Thread Artemiy Volkov
d additionally regtested on riscv32. gcc/ChangeLog: PR tree-optimization/116024 * match.pd: New transformation around integer comparison. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr116024-2.c: New test. * gcc.dg/tree-ssa/pr116024-2-fwrapv.c: Ditto. * g

[PATCH v4 3/4] tree-optimization/116024 - simplify C1-X cmp C2 for wrapping signed types

2024-09-30 Thread Artemiy Volkov
4, x86_64, and i386, and additionally regtested on riscv32. gcc/ChangeLog: PR tree-optimization/116024 * match.pd: New transformation around integer comparison. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr116024-1-fwrapv.c: New test. Signed-off-by: Artemiy V

[PATCH v4 1/4] tree-optimization/116024 - simplify C1-X cmp C2 for UB-on-overflow types

2024-09-30 Thread Artemiy Volkov
ere necessary. gcc/ChangeLog: PR tree-optimization/116024 * match.pd: New transformation around integer comparison. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr116024.c: New test. * gcc.dg/pr67089-6.c: Adjust. Signed-off-by: Artemiy Volkov --- gcc/match

[PATCH v4 2/4] tree-optimization/116024 - simplify C1-X cmp C2 for unsigned types

2024-09-30 Thread Artemiy Volkov
parison. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr116024-1.c: New test. Signed-off-by: Artemiy Volkov --- gcc/match.pd | 23 +++- gcc/testsuite/gcc.dg/tree-ssa/pr116024-1.c | 65 ++ 2 files changed, 87 insertions(+), 1 deletion(-)

[PATCH v4 0/4] tree-optimization/116024 - match.pd: add 4 int-compare simplifications

2024-09-30 Thread Artemiy Volkov
of build_uniform_cst () in patch #4. The series has been reviewed and pre-approved by Richard contingent on the changes above, so assuming it looks good, could anyone please push it to trunk/14 on my behalf? Many thanks, Artemiy Artemiy Volkov (4): tree-optimization/116024 - simplify C1-X cmp C2

Re: [PATCH v3 3/4] tree-optimization/116024 - simplify C1-X cmp C2 for wrapping signed types

2024-09-27 Thread Artemiy Volkov
On 9/27/2024 1:24 PM, Richard Biener wrote: > On Mon, 23 Sep 2024, Artemiy Volkov wrote: > >> Implement a match.pd transformation inverting the sign of X in >> C1 - X cmp C2, where C1 and C2 are integer constants and X is >> of a wrapping signed type, by observing that: &

Re: [PATCH v3 4/4] tree-optimization/116024 - simplify some cases of X +- C1 cmp C2

2024-09-27 Thread Artemiy Volkov
On 9/27/2024 1:29 PM, Richard Biener wrote: > On Mon, 23 Sep 2024, Artemiy Volkov wrote: > >> Whenever C1 and C2 are integer constants, X is of a wrapping type, and >> cmp is a relational operator, the expression X +- C1 cmp C2 can be >> simplified in the following ca

Re: [PATCH v3 1/4] tree-optimization/116024 - simplify C1-X cmp C2 for UB-on-overflow types

2024-09-24 Thread Artemiy Volkov
On 9/24/2024 12:16 AM, Jeff Law wrote: > > > On 9/23/24 2:32 AM, Artemiy Volkov wrote: >> Implement a match.pd pattern for C1 - X cmp C2, where C1 and C2 are >> integer constants and X is of a UB-on-overflow type.  The pattern is >> simplified to X rcmp C1 - C2 by m

[PATCH v3 1/4] tree-optimization/116024 - simplify C1-X cmp C2 for UB-on-overflow types

2024-09-23 Thread Artemiy Volkov
ere necessary. gcc/ChangeLog: PR tree-optimization/116024 * match.pd: New transformation around integer comparison. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr116024.c: New test. * gcc.dg/pr67089-6.c: Adjust. Signed-off-by: Artemiy Volkov --- gcc/match

[PATCH v3 3/4] tree-optimization/116024 - simplify C1-X cmp C2 for wrapping signed types

2024-09-23 Thread Artemiy Volkov
4, x86_64, and i386, and additionally regtested on riscv32. gcc/ChangeLog: PR tree-optimization/116024 * match.pd: New transformation around integer comparison. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr116024-1-fwrapv.c: New test. Signed-off-by: Artemiy V

[PATCH v3 4/4] tree-optimization/116024 - simplify some cases of X +- C1 cmp C2

2024-09-23 Thread Artemiy Volkov
d additionally regtested on riscv32. gcc/ChangeLog: PR tree-optimization/116024 * match.pd: New transformation around integer comparison. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr116024-2.c: New test. * gcc.dg/tree-ssa/pr116024-2-fwrapv.c: Ditto. * g

[PATCH v3 2/4] tree-optimization/116024 - simplify C1-X cmp C2 for unsigned types

2024-09-23 Thread Artemiy Volkov
parison. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr116024-1.c: New test. Signed-off-by: Artemiy Volkov --- gcc/match.pd | 23 ++- gcc/testsuite/gcc.dg/tree-ssa/pr116024-1.c | 73 ++ 2 files changed, 95 insertions(+), 1 deletion(-)

[PATCH v3 0/4] tree-optimization/116024 - match.pd: add 4

2024-09-23 Thread Artemiy Volkov
error in patch #4 (switch sign of INF in computation of c1_cst and use c2 instead of max/min). - Multiple smaller cosmetic improvements. Could someone please help out with review and/or pushing this to trunk/14? Many thanks in advance, Artemiy Artemiy Volkov (4): tree-optimization/116024

Re: [PATCH v2] tree-optimization/116024 - match.pd: add 4 int-compare simplifications

2024-08-23 Thread Artemiy Volkov
On 8/22/2024 3:15 PM, Richard Biener wrote: > On Wed, 21 Aug 2024, Artemiy Volkov wrote: > >> Hi, >> >> sending a v2 of >> https://gcc.gnu.org/pipermail/gcc-patches/2024-August/659851.html after >> changing variable types in all new testcases from sta

[PATCH v2] tree-optimization/116024 - match.pd: add 4 int-compare simplifications

2024-08-21 Thread Artemiy Volkov
cc.dg/tree-ssa/pr116024-1-fwrapv.c: Ditto. * gcc.dg/tree-ssa/pr116024-2.c: Ditto. * gcc.dg/tree-ssa/pr116024-2-fwrapv.c: Ditto. * gcc.dg/pr67089-6.c: Adjust. * gcc.target/aarch64/gtu_to_ltu_cmp_1.c: Ditto. Signed-off-by: Artemiy Volkov --- gcc/match

[PATCH] tree-optimization/116024 - match.pd: add 4 int-compare simplifications

2024-08-08 Thread Artemiy Volkov
Ditto. * gcc.dg/tree-ssa/pr116024-2.c: Ditto. * gcc.dg/tree-ssa/pr116024-2-fwrapv.c: Ditto. * gcc.dg/pr67089-6.c: Adjust. * gcc.target/aarch64/gtu_to_ltu_cmp_1.c: Ditto. Signed-off-by: Artemiy Volkov --- gcc/match.pd | 75

[PATCH] RISC-V: Fix unrecognizable pattern in riscv_expand_conditional_move()

2024-06-21 Thread Artemiy Volkov
above is also included in this patch as a new Zicond testcase. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_expand_conditional_move): Add a CONST0_RTX check. gcc/testsuite/ChangeLog: * gcc.target/riscv/zicond-ice-3.c: New test. Signed-off-by: Artemiy Volkov --- gcc

Re: [PATCH] libiberty: support demangling of rvalue reference typenames

2016-01-05 Thread Artemiy Volkov
On Tue, Jan 05, 2016 at 07:26:36AM -0800, Ian Lance Taylor wrote: > On Tue, Jan 5, 2016 at 5:59 AM, Artemiy Volkov wrote: > > On Tue, Jan 05, 2016 at 05:26:28AM -0800, Ian Lance Taylor wrote: > >> Artemiy Volkov writes: > >> > >> > On Mon, Jan 04, 2016 at 1

Re: [PATCH] libiberty: support demangling of rvalue reference typenames

2016-01-05 Thread Artemiy Volkov
On Tue, Jan 05, 2016 at 05:26:28AM -0800, Ian Lance Taylor wrote: > Artemiy Volkov writes: > > > On Mon, Jan 04, 2016 at 10:06:44PM -0800, Ian Lance Taylor wrote: > >> Artemiy Volkov writes: > >> > >> > This patch adds handling of 'O'

Re: [PATCH] libiberty: support demangling of rvalue reference typenames

2016-01-04 Thread Artemiy Volkov
On Mon, Jan 04, 2016 at 10:06:44PM -0800, Ian Lance Taylor wrote: > Artemiy Volkov writes: > > > This patch adds handling of 'O' (rvalue ref) type codes in the C++ > > demangling > > code which is done similarly to the 'R' (regular references) cas

[PATCH] libiberty: support demangling of rvalue reference typenames

2016-01-04 Thread Artemiy Volkov
ces demangling tests. libiberty/ChangeLog: 2016-01-04 Artemiy Volkov * cplus-dem.c (enum type_kind_t): Add tk_rvalue_reference constant. (demangle_template_value_parm): Handle tk_rvalue_reference type kind. (do_type): Support 'O' type id (rvalue ref