== 0): New pattern.
((a == b) & (a | b) == 0): New pattern.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr117760-1.c: New test.
* gcc.dg/tree-ssa/pr117760-2.c: New test.
* gcc.dg/tree-ssa/pr117760.c: New test.
Signed-off-by: Eikansh Gupta
---
/testsuite/ChangeLog:
* gcc.target/aarch64/pr114528.c: New test.
Signed-off-by: Eikansh Gupta
---
gcc/config/aarch64/aarch64.cc | 44 -
gcc/testsuite/gcc.target/aarch64/pr114528.c | 53 +
2 files changed, 95 insertions(+), 2 deletions
> On Thu, Nov 14, 2024 at 11:59 AM Eikansh Gupta
> wrote:
> >
> > This patch simplify `(trunc)copysign ((extend)x, CST)` to `copysign
> > (x, -1.0/1.0)` depending on the sign of CST. Previously, it was simplified
> > to
> `copysign (x, CST)`.
> > It
: Eikansh Gupta ; Eikansh Gupta (QUIC)
; gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v2] MATCH: Simplify `min(a, b) op max(a, b)` to `a op b`
[PR109401]
WARNING: This email originated from outside of Qualcomm. Please be wary of any
links or attachments, and do not enable macros.
On Thu, Nov 14
off-by: Eikansh Gupta
---
gcc/match.pd | 25 +++-
gcc/testsuite/gcc.dg/tree-ssa/pr112472.c | 22 +
2 files changed, 42 insertions(+), 5 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr112472.c
diff --git a/gcc/matc
Hi,
> It seems to me this ought to work when the min/max reversed as well,
> or
>am I missing something?
Yes, it should work when min/max are reversed.
Regards,
Eikansh
From: Jeff Law
Sent: Tuesday, November 12, 2024 12:55 AM
To: Eika
:
* match.pd (min(a,b) op max(a,b) -> a op b): New pattern.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr109401.c: New test.
* gcc.dg/tree-ssa/pr109401-1.c: New test.
Signed-off-by: Eikansh Gupta
---
gcc/match.pd | 7 +++
gcc/testsuite/gcc.dg/t
ux-gnu with no regressions.
PR tree-optimization/109906
gcc/ChangeLog:
* match.pd (a rrotate (32-b) -> a lrotate b): New pattern
(a lrotate (32-b) -> a rrotate b): New pattern
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr109906.c: New test.
Signed-off
ux-gnu with no regressions.
PR tree-optimization/109906
gcc/ChangeLog:
* match.pd (a rrotate (32-b) -> a lrotate b): New pattern
(a lrotate (32-b) -> a rrotate b): New pattern
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr109906.c: New test.
Signed-off
off-by: Eikansh Gupta
---
gcc/match.pd | 20 +---
gcc/testsuite/gcc.dg/tree-ssa/pr112472.c | 22 ++
2 files changed, 39 insertions(+), 3 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr112472.c
diff --git a/gcc/match.pd
This patch simplify `min(a,b) op max(a,b)` to `a op b`. This optimization
will work for all the binary commutative operations. So, the `op` here can
be one of {plus, mult, bit_and, bit_xor, bit_ior, eq, ne, min, max}.
PR tree-optimization/109878
PR 109401
gcc/ChangeLog:
*
This patch simplify `(trunc)copysign ((extend)x, CST)` to `copysign (x,
-1.0/1.0)`
depending on the sign of CST. Previously, it was simplified to `copysign (x,
CST)`.
It can be optimized as the sign of the CST matters, not the value.
The patch also simplify `(trunc)abs (extend x)` to `abs (x)`.
The pattern `a rrotate (32-b)` should be optimized to `a lrotate b`.
The same is also true for `a lrotate (32-b)`. It can be optimized to
`a rrotate b`.
This patch adds following patterns:
a rrotate (32-b) -> a lrotate b
a lrotate (32-b) -> a rrotate b
PR tree-optimization/109906
gcc/Cha
The pattern `a rrotate (32-b)` should be optimized to `a lrotate b`.
The same is also true for `a lrotate (32-b)`. It can be optimized to
`a rrotate b`.
This patch adds following patterns:
a rrotate (32-b) -> a lrotate b
a lrotate (32-b) -> a rrotate b
PR tree-optimization/109906
gcc/Cha
match.pd min/max (a & CST0, a & CST1): New pattern.
min/max (a, a & CST): New pattern.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr109878-1.c: New test.
* gcc.dg/tree-ssa/pr109878-2.c: New test.
* gcc.dg/tree-ssa/pr109878-3.c: New test.
* g
pd min/max (a & CST0, a & CST1): New pattern.
min/max (a, a & 1): New pattern.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr109878.c: New test.
* gcc.dg/tree-ssa/pr109878-1.c: New test.
* gcc.dg/tree-ssa/pr109878-2.c: New test.
* gcc.dg/tree-
igned-off-by: Eikansh Gupta
---
gcc/match.pd | 15 +
gcc/testsuite/g++.dg/tree-ssa/pr50.C | 33 ++
gcc/testsuite/gcc.dg/tree-ssa/pr50-1.c | 72 ++
gcc/testsuite/gcc.dg/tree-ssa/pr50.c | 22 +++
4 files changed, 14
w test.
Signed-off-by: Eikansh Gupta
---
gcc/match.pd | 18 ++
gcc/testsuite/gcc.dg/tree-ssa/pr50.c | 19 +++
2 files changed, 37 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr50.c
diff --git a/gcc/match.pd
18 matches
Mail list logo