* [PATCH] PR tree-optimization/96779 Adding a missing pattern to match.pd
@ 2021-11-16 22:50 Navid Rahimi
2021-11-19 11:43 ` Richard Biener
0 siblings, 1 reply; 6+ messages in thread
From: Navid Rahimi @ 2021-11-16 22:50 UTC (permalink / raw)
To: Navid Rahimi via Gcc-patches
[-- Attachment #1: Type: text/plain, Size: 495 bytes --]
Hi GCC community,
This patch will add the missed pattern described in bug 102232 [1] to the match.pd.
Tree-optimization/96779: Adding new optimization to match.pd:
* match.pd (-x == x) -> (x == 0): New optimization.
* gcc.dg/tree-ssa/pr96779.c: testcase for this optimization.
* gcc.dg/tree-ssa/pr96779-disabled.c: testcase for this optimization when -fwrapv passed.
1) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96779
Best wishes,
Navid.
[-- Attachment #2: 0001-tree-optimization-96779.patch --]
[-- Type: application/octet-stream, Size: 4791 bytes --]
From 61ac88290f435d2a4fe8ca99208eb75a3cfe1203 Mon Sep 17 00:00:00 2001
From: Navid Rahimi <navidrahimi@microsoft.com>
Date: Mon, 15 Nov 2021 21:08:16 -0800
Subject: [PATCH] tree-optimization/96779: Adding new optimization to match.pd:
* match.pd (-x == x) -> (x == 0): New optimization.
* gcc.dg/tree-ssa/pr96779.c: testcase for this optimization.
* gcc.dg/tree-ssa/pr96779-disabled.c: testcase for this optimization when -fwrapv passed.
---
gcc/match.pd | 8 ++
.../gcc.dg/tree-ssa/pr96779-disabled.c | 84 +++++++++++++++++++
gcc/testsuite/gcc.dg/tree-ssa/pr96779.c | 84 +++++++++++++++++++
3 files changed, 176 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr96779.c
diff --git a/gcc/match.pd b/gcc/match.pd
index a319aefa808..96b757ce1a3 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -240,6 +240,14 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(mult @0 integer_zerop@1)
@1)
+/* -x == x -> x == 0 */
+(for cmp (eq ne)
+ (simplify
+ (cmp:c @0 (negate @0))
+ (if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0))
+ && !TYPE_OVERFLOW_WRAPS (type))
+ (cmp:c @0 { build_zero_cst (TREE_TYPE(@0)); }))))
+
/* Maybe fold x * 0 to 0. The expressions aren't the same
when x is NaN, since x * 0 is also NaN. Nor are they the
same in modes with signed zeros, since multiplying a
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c
new file mode 100644
index 00000000000..205133d8e0c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c
@@ -0,0 +1,84 @@
+/* PR tree-optimization/96779 */
+/* { dg-do run } */
+/* { dg-options "-O -fdump-tree-optimized -fwrapv" } */
+
+#include <stdbool.h>
+
+bool __attribute__ ((noipa)) f_func(int a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) g_func(unsigned int a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) h_func(short a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) k_func(long a)
+{
+ return -a == a;
+}
+
+int
+main (void)
+{
+ // few randomly generated test cases
+ if (f_func (71856034))
+ {
+ __builtin_abort ();
+ }
+ if (g_func (71856034))
+ {
+ __builtin_abort ();
+ }
+ if (h_func (1744))
+ {
+ __builtin_abort ();
+ }
+ if (k_func (68268386))
+ {
+ __builtin_abort ();
+ }
+ if (f_func (-112237))
+ {
+ __builtin_abort ();
+ }
+ if (g_func (-787116))
+ {
+ __builtin_abort ();
+ }
+ if (h_func (-863))
+ {
+ __builtin_abort ();
+ }
+ if (k_func (-787116))
+ {
+ __builtin_abort ();
+ }
+ if (!f_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!g_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!h_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!k_func (0))
+ {
+ __builtin_abort ();
+ }
+
+ return 0;
+}
+
+/* Verify that we have *not* transfered "= -" pattern in any of those functions. */
+/* { dg-final { scan-tree-dump-times "= -" 4 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c
new file mode 100644
index 00000000000..af07529b88d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c
@@ -0,0 +1,84 @@
+/* PR tree-optimization/96779 */
+/* { dg-do run } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+#include <stdbool.h>
+
+bool __attribute__ ((noipa)) f_func(int a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) g_func(unsigned int a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) h_func(short a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) k_func(long a)
+{
+ return -a == a;
+}
+
+int
+main (void)
+{
+ // few randomly generated test cases
+ if (f_func (71856034))
+ {
+ __builtin_abort ();
+ }
+ if (g_func (71856034))
+ {
+ __builtin_abort ();
+ }
+ if (h_func (1744))
+ {
+ __builtin_abort ();
+ }
+ if (k_func (68268386))
+ {
+ __builtin_abort ();
+ }
+ if (f_func (-112237))
+ {
+ __builtin_abort ();
+ }
+ if (g_func (-787116))
+ {
+ __builtin_abort ();
+ }
+ if (h_func (-863))
+ {
+ __builtin_abort ();
+ }
+ if (k_func (-787116))
+ {
+ __builtin_abort ();
+ }
+ if (!f_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!g_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!h_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!k_func (0))
+ {
+ __builtin_abort ();
+ }
+
+ return 0;
+}
+
+/* Verify that we transfered to "= -" pattern from "_2 = -_1;". */
+/* { dg-final { scan-tree-dump-not "= -" "optimized" } } */
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] PR tree-optimization/96779 Adding a missing pattern to match.pd
2021-11-16 22:50 [PATCH] PR tree-optimization/96779 Adding a missing pattern to match.pd Navid Rahimi
@ 2021-11-19 11:43 ` Richard Biener
2021-11-19 22:33 ` [EXTERNAL] " Navid Rahimi
0 siblings, 1 reply; 6+ messages in thread
From: Richard Biener @ 2021-11-19 11:43 UTC (permalink / raw)
To: Navid Rahimi; +Cc: Navid Rahimi via Gcc-patches
On Tue, Nov 16, 2021 at 11:51 PM Navid Rahimi via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Hi GCC community,
>
> This patch will add the missed pattern described in bug 102232 [1] to the match.pd.
>
> Tree-optimization/96779: Adding new optimization to match.pd:
>
> * match.pd (-x == x) -> (x == 0): New optimization.
> * gcc.dg/tree-ssa/pr96779.c: testcase for this optimization.
> * gcc.dg/tree-ssa/pr96779-disabled.c: testcase for this optimization when -fwrapv passed.
>
> 1) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96779
+/* -x == x -> x == 0 */
+(for cmp (eq ne)
+ (simplify
+ (cmp:c @0 (negate @0))
+ (if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0))
+ && !TYPE_OVERFLOW_WRAPS (type))
you need to check TYPE_OVERFLOW_WRAPS on TREE_TYPE (@0),
otherwise you check on boolean.
+ (cmp:c @0 { build_zero_cst (TREE_TYPE(@0)); }))))
+
no need for :c on the result pattern. Otherwise it looks OK, but how
did you check the patch?
Thanks,
Richard.
> Best wishes,
> Navid.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [EXTERNAL] Re: [PATCH] PR tree-optimization/96779 Adding a missing pattern to match.pd
2021-11-19 11:43 ` Richard Biener
@ 2021-11-19 22:33 ` Navid Rahimi
2021-11-22 8:45 ` Richard Biener
0 siblings, 1 reply; 6+ messages in thread
From: Navid Rahimi @ 2021-11-19 22:33 UTC (permalink / raw)
To: Richard Biener; +Cc: Navid Rahimi via Gcc-patches
[-- Attachment #1: Type: text/plain, Size: 2794 bytes --]
Hi Richard,
Thanks for the detailed comment. I am attaching a newer version of the patch which does have required fixes included. Bellow you can see my response to your feedbacks:
> you need to check TYPE_OVERFLOW_WRAPS on TREE_TYPE (@0),
> otherwise you check on boolean.
Fixed it.
> no need for :c on the result pattern. Otherwise it looks OK, but how
> did you check the patch?
Fixed it. For checking the patch, I have script which builds and runs make check for 1) trunk and 2) trunk+patch in a separate directory and diffs the test results from each directory. My test script did had a subtle problem. The bug was, because of a typo in the path I introduced few days ago, it was diffing same trunk+patch test results against trunk+patch test results.
That was a good reminder to setup an account for myself here asap [1].
1) https://gcc.gnu.org/wiki/CompileFarm
Best wishes,
Navid.
________________________________________
From: Richard Biener <richard.guenther@gmail.com>
Sent: Friday, November 19, 2021 03:43
To: Navid Rahimi
Cc: Navid Rahimi via Gcc-patches
Subject: [EXTERNAL] Re: [PATCH] PR tree-optimization/96779 Adding a missing pattern to match.pd
[You don't often get email from richard.guenther@gmail.com. Learn why this is important at http://aka.ms/LearnAboutSenderIdentification.]
On Tue, Nov 16, 2021 at 11:51 PM Navid Rahimi via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Hi GCC community,
>
> This patch will add the missed pattern described in bug 102232 [1] to the match.pd.
>
> Tree-optimization/96779: Adding new optimization to match.pd:
>
> * match.pd (-x == x) -> (x == 0): New optimization.
> * gcc.dg/tree-ssa/pr96779.c: testcase for this optimization.
> * gcc.dg/tree-ssa/pr96779-disabled.c: testcase for this optimization when -fwrapv passed.
>
> 1) https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc.gnu.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D96779&data=04%7C01%7Cnavidrahimi%40microsoft.com%7C11c3214ef8164af4d50008d9ab51d9bc%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637729190792397989%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=mxYBk6rex%2Bq5UMot%2BWfJqXeTYEYuM16hrvLGyp4PGeI%3D&reserved=0
+/* -x == x -> x == 0 */
+(for cmp (eq ne)
+ (simplify
+ (cmp:c @0 (negate @0))
+ (if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0))
+ && !TYPE_OVERFLOW_WRAPS (type))
you need to check TYPE_OVERFLOW_WRAPS on TREE_TYPE (@0),
otherwise you check on boolean.
+ (cmp:c @0 { build_zero_cst (TREE_TYPE(@0)); }))))
+
no need for :c on the result pattern. Otherwise it looks OK, but how
did you check the patch?
Thanks,
Richard.
> Best wishes,
> Navid.
[-- Attachment #2: 0001-tree-optimization-96779-v2.patch --]
[-- Type: application/octet-stream, Size: 4714 bytes --]
From 5a09cefd02cc859d3b6f784324c3d09dfab11a32 Mon Sep 17 00:00:00 2001
From: Navid Rahimi <navidrahimi@microsoft.com>
Date: Mon, 15 Nov 2021 21:08:16 -0800
Subject: [PATCH] tree-optimization/96779: Adding new optimization to match.pd:
* match.pd (-x == x) -> (x == 0): New optimization.
* gcc.dg/tree-ssa/pr96779.c: testcase for this optimization.
* gcc.dg/tree-ssa/pr96779-disabled.c: testcase for this optimization when -fwrapv passed.
---
gcc/match.pd | 8 ++
.../gcc.dg/tree-ssa/pr96779-disabled.c | 84 +++++++++++++++++++
gcc/testsuite/gcc.dg/tree-ssa/pr96779.c | 79 +++++++++++++++++
3 files changed, 171 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr96779.c
diff --git a/gcc/match.pd b/gcc/match.pd
index a319aefa808..4e0171097cc 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -240,6 +240,14 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(mult @0 integer_zerop@1)
@1)
+/* -x == x -> x == 0 */
+(for cmp (eq ne)
+ (simplify
+ (cmp:c @0 (negate @0))
+ (if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0))
+ && !TYPE_OVERFLOW_WRAPS (TREE_TYPE(@0)))
+ (cmp @0 { build_zero_cst (TREE_TYPE(@0)); }))))
+
/* Maybe fold x * 0 to 0. The expressions aren't the same
when x is NaN, since x * 0 is also NaN. Nor are they the
same in modes with signed zeros, since multiplying a
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c
new file mode 100644
index 00000000000..205133d8e0c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c
@@ -0,0 +1,84 @@
+/* PR tree-optimization/96779 */
+/* { dg-do run } */
+/* { dg-options "-O -fdump-tree-optimized -fwrapv" } */
+
+#include <stdbool.h>
+
+bool __attribute__ ((noipa)) f_func(int a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) g_func(unsigned int a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) h_func(short a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) k_func(long a)
+{
+ return -a == a;
+}
+
+int
+main (void)
+{
+ // few randomly generated test cases
+ if (f_func (71856034))
+ {
+ __builtin_abort ();
+ }
+ if (g_func (71856034))
+ {
+ __builtin_abort ();
+ }
+ if (h_func (1744))
+ {
+ __builtin_abort ();
+ }
+ if (k_func (68268386))
+ {
+ __builtin_abort ();
+ }
+ if (f_func (-112237))
+ {
+ __builtin_abort ();
+ }
+ if (g_func (-787116))
+ {
+ __builtin_abort ();
+ }
+ if (h_func (-863))
+ {
+ __builtin_abort ();
+ }
+ if (k_func (-787116))
+ {
+ __builtin_abort ();
+ }
+ if (!f_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!g_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!h_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!k_func (0))
+ {
+ __builtin_abort ();
+ }
+
+ return 0;
+}
+
+/* Verify that we have *not* transfered "= -" pattern in any of those functions. */
+/* { dg-final { scan-tree-dump-times "= -" 4 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c
new file mode 100644
index 00000000000..0d46e8eeb15
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c
@@ -0,0 +1,79 @@
+/* PR tree-optimization/96779 */
+/* { dg-do run } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+#include <stdbool.h>
+
+bool __attribute__ ((noipa)) f_func(int a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) h_func(short a)
+{
+ return -a == a;
+}
+
+bool __attribute__ ((noipa)) k_func(long a)
+{
+ return -a == a;
+}
+
+int
+main (void)
+{
+ // few randomly generated test cases
+ if (f_func (71856034))
+ {
+ __builtin_abort ();
+ }
+ if (f_func (71856034))
+ {
+ __builtin_abort ();
+ }
+ if (h_func (1744))
+ {
+ __builtin_abort ();
+ }
+ if (k_func (68268386))
+ {
+ __builtin_abort ();
+ }
+ if (f_func (-112237))
+ {
+ __builtin_abort ();
+ }
+ if (f_func (-787116))
+ {
+ __builtin_abort ();
+ }
+ if (h_func (-863))
+ {
+ __builtin_abort ();
+ }
+ if (k_func (-787116))
+ {
+ __builtin_abort ();
+ }
+ if (!f_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!f_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!h_func (0))
+ {
+ __builtin_abort ();
+ }
+ if (!k_func (0))
+ {
+ __builtin_abort ();
+ }
+
+ return 0;
+}
+
+/* Verify that we transfered to "= -" pattern from "_2 = -_1;". */
+/* { dg-final { scan-tree-dump-not "= -" "optimized" } } */
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [EXTERNAL] Re: [PATCH] PR tree-optimization/96779 Adding a missing pattern to match.pd
2021-11-19 22:33 ` [EXTERNAL] " Navid Rahimi
@ 2021-11-22 8:45 ` Richard Biener
2021-11-23 0:48 ` Jeff Law
0 siblings, 1 reply; 6+ messages in thread
From: Richard Biener @ 2021-11-22 8:45 UTC (permalink / raw)
To: Navid Rahimi; +Cc: Navid Rahimi via Gcc-patches
On Fri, Nov 19, 2021 at 11:33 PM Navid Rahimi <navidrahimi@microsoft.com> wrote:
>
> Hi Richard,
>
> Thanks for the detailed comment. I am attaching a newer version of the patch which does have required fixes included. Bellow you can see my response to your feedbacks:
>
> > you need to check TYPE_OVERFLOW_WRAPS on TREE_TYPE (@0),
> > otherwise you check on boolean.
> Fixed it.
>
> > no need for :c on the result pattern. Otherwise it looks OK, but how
> > did you check the patch?
> Fixed it. For checking the patch, I have script which builds and runs make check for 1) trunk and 2) trunk+patch in a separate directory and diffs the test results from each directory. My test script did had a subtle problem. The bug was, because of a typo in the path I introduced few days ago, it was diffing same trunk+patch test results against trunk+patch test results.
OK, please indicate that in the future, like with "Bootstrapped and
tested on x86_64-linux" or so.
> That was a good reminder to setup an account for myself here asap [1].
>
> 1) https://gcc.gnu.org/wiki/CompileFarm
The updated patch is OK.
Thanks,
Richard.
> Best wishes,
> Navid.
>
> ________________________________________
> From: Richard Biener <richard.guenther@gmail.com>
> Sent: Friday, November 19, 2021 03:43
> To: Navid Rahimi
> Cc: Navid Rahimi via Gcc-patches
> Subject: [EXTERNAL] Re: [PATCH] PR tree-optimization/96779 Adding a missing pattern to match.pd
>
> [You don't often get email from richard.guenther@gmail.com. Learn why this is important at http://aka.ms/LearnAboutSenderIdentification.]
>
> On Tue, Nov 16, 2021 at 11:51 PM Navid Rahimi via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
> >
> > Hi GCC community,
> >
> > This patch will add the missed pattern described in bug 102232 [1] to the match.pd.
> >
> > Tree-optimization/96779: Adding new optimization to match.pd:
> >
> > * match.pd (-x == x) -> (x == 0): New optimization.
> > * gcc.dg/tree-ssa/pr96779.c: testcase for this optimization.
> > * gcc.dg/tree-ssa/pr96779-disabled.c: testcase for this optimization when -fwrapv passed.
> >
> > 1) https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc.gnu.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D96779&data=04%7C01%7Cnavidrahimi%40microsoft.com%7C11c3214ef8164af4d50008d9ab51d9bc%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637729190792397989%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=mxYBk6rex%2Bq5UMot%2BWfJqXeTYEYuM16hrvLGyp4PGeI%3D&reserved=0
>
> +/* -x == x -> x == 0 */
> +(for cmp (eq ne)
> + (simplify
> + (cmp:c @0 (negate @0))
> + (if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0))
> + && !TYPE_OVERFLOW_WRAPS (type))
>
> you need to check TYPE_OVERFLOW_WRAPS on TREE_TYPE (@0),
> otherwise you check on boolean.
>
> + (cmp:c @0 { build_zero_cst (TREE_TYPE(@0)); }))))
> +
>
> no need for :c on the result pattern. Otherwise it looks OK, but how
> did you check the patch?
>
> Thanks,
> Richard.
>
>
> > Best wishes,
> > Navid.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [EXTERNAL] Re: [PATCH] PR tree-optimization/96779 Adding a missing pattern to match.pd
2021-11-22 8:45 ` Richard Biener
@ 2021-11-23 0:48 ` Jeff Law
2021-11-23 3:09 ` Navid Rahimi
0 siblings, 1 reply; 6+ messages in thread
From: Jeff Law @ 2021-11-23 0:48 UTC (permalink / raw)
To: Richard Biener, Navid Rahimi; +Cc: Navid Rahimi via Gcc-patches
On 11/22/2021 1:45 AM, Richard Biener via Gcc-patches wrote:
> On Fri, Nov 19, 2021 at 11:33 PM Navid Rahimi <navidrahimi@microsoft.com> wrote:
>> Hi Richard,
>>
>> Thanks for the detailed comment. I am attaching a newer version of the patch which does have required fixes included. Bellow you can see my response to your feedbacks:
>>
>>> you need to check TYPE_OVERFLOW_WRAPS on TREE_TYPE (@0),
>>> otherwise you check on boolean.
>> Fixed it.
>>
>>> no need for :c on the result pattern. Otherwise it looks OK, but how
>>> did you check the patch?
>> Fixed it. For checking the patch, I have script which builds and runs make check for 1) trunk and 2) trunk+patch in a separate directory and diffs the test results from each directory. My test script did had a subtle problem. The bug was, because of a typo in the path I introduced few days ago, it was diffing same trunk+patch test results against trunk+patch test results.
> OK, please indicate that in the future, like with "Bootstrapped and
> tested on x86_64-linux" or so.
>
>> That was a good reminder to setup an account for myself here asap [1].
>>
>> 1) https://gcc.gnu.org/wiki/CompileFarm
> The updated patch is OK.
I don't think Navid has commit privs, so I fixed up the commit message
and committed the patch for Navid.
jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [EXTERNAL] Re: [PATCH] PR tree-optimization/96779 Adding a missing pattern to match.pd
2021-11-23 0:48 ` Jeff Law
@ 2021-11-23 3:09 ` Navid Rahimi
0 siblings, 0 replies; 6+ messages in thread
From: Navid Rahimi @ 2021-11-23 3:09 UTC (permalink / raw)
To: Jeff Law, Richard Biener; +Cc: Navid Rahimi via Gcc-patches
Thanks Jeff.
Best wishes,
Navid.
________________________________________
From: Jeff Law <jeffreyalaw@gmail.com>
Sent: Monday, November 22, 2021 16:48
To: Richard Biener; Navid Rahimi
Cc: Navid Rahimi via Gcc-patches
Subject: Re: [EXTERNAL] Re: [PATCH] PR tree-optimization/96779 Adding a missing pattern to match.pd
[You don't often get email from jeffreyalaw@gmail.com. Learn why this is important at http://aka.ms/LearnAboutSenderIdentification.]
On 11/22/2021 1:45 AM, Richard Biener via Gcc-patches wrote:
> On Fri, Nov 19, 2021 at 11:33 PM Navid Rahimi <navidrahimi@microsoft.com> wrote:
>> Hi Richard,
>>
>> Thanks for the detailed comment. I am attaching a newer version of the patch which does have required fixes included. Bellow you can see my response to your feedbacks:
>>
>>> you need to check TYPE_OVERFLOW_WRAPS on TREE_TYPE (@0),
>>> otherwise you check on boolean.
>> Fixed it.
>>
>>> no need for :c on the result pattern. Otherwise it looks OK, but how
>>> did you check the patch?
>> Fixed it. For checking the patch, I have script which builds and runs make check for 1) trunk and 2) trunk+patch in a separate directory and diffs the test results from each directory. My test script did had a subtle problem. The bug was, because of a typo in the path I introduced few days ago, it was diffing same trunk+patch test results against trunk+patch test results.
> OK, please indicate that in the future, like with "Bootstrapped and
> tested on x86_64-linux" or so.
>
>> That was a good reminder to setup an account for myself here asap [1].
>>
>> 1) https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc.gnu.org%2Fwiki%2FCompileFarm&data=04%7C01%7Cnavidrahimi%40microsoft.com%7C02e3c84f12dc48c34c7e08d9ae1b030e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637732253312568135%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=8virYthoelGhRKtjTo1g%2F9GV67I4rze5iv07XnpCpNk%3D&reserved=0
> The updated patch is OK.
I don't think Navid has commit privs, so I fixed up the commit message
and committed the patch for Navid.
jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-11-23 3:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 22:50 [PATCH] PR tree-optimization/96779 Adding a missing pattern to match.pd Navid Rahimi
2021-11-19 11:43 ` Richard Biener
2021-11-19 22:33 ` [EXTERNAL] " Navid Rahimi
2021-11-22 8:45 ` Richard Biener
2021-11-23 0:48 ` Jeff Law
2021-11-23 3:09 ` Navid Rahimi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).