public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH TEST]Rectify test case gcc.dg/tree-ssa/ivopt_mult_4.c
@ 2017-05-25 18:15 Bin Cheng
  2017-05-26 11:50 ` Richard Biener
  0 siblings, 1 reply; 4+ messages in thread
From: Bin Cheng @ 2017-05-25 18:15 UTC (permalink / raw)
  To: gcc-patches; +Cc: nd

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

Hi,
I believe this tests has been wrongly modified previously.  It is to test that the exit check on
pointer shouldn't be replaced by integer IV.  Somehow GCC starts replacing the check on
integer IV with pointer IV.  It's valid, though inefficient.  And somehow we starting checking
this iv replacement.   This patch rectifies it by specifically checking the check on pointer
shouldn't be replaced.  

Bootstrap and test in series on x86_64.  Is it OK?
Thanks,
bin
gcc/testsuite/ChangeLog
2017-05-11  Bin Cheng  <bin.cheng@arm.com>

	* gcc.dg/tree-ssa/ivopt_mult_4.c: Explicitly check comparison
	on pointer should not be replaced.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0008-rectify-ivopt_mult_4.txt.patch --]
[-- Type: text/x-patch; name="0008-rectify-ivopt_mult_4.txt.patch", Size: 797 bytes --]

From e011b6952cc70a9582df51b672937934d4b85f29 Mon Sep 17 00:00:00 2001
From: Bin Cheng <binche01@e108451-lin.cambridge.arm.com>
Date: Wed, 19 Apr 2017 14:24:30 +0100
Subject: [PATCH 8/9] rectify-ivopt_mult_4.txt

---
 gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_4.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_4.c
index effb052..321c786 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_4.c
@@ -21,4 +21,4 @@ long foo(long* p, long* p2, int N1, int N2)
   return s;
 }
 
-/* { dg-final { scan-tree-dump "Replacing exit test" "ivopts"} } */
+/* { dg-final { scan-tree-dump-not "Replacing exit test: if \\(p" "ivopts"} } */
-- 
1.9.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH TEST]Rectify test case gcc.dg/tree-ssa/ivopt_mult_4.c
  2017-05-25 18:15 [PATCH TEST]Rectify test case gcc.dg/tree-ssa/ivopt_mult_4.c Bin Cheng
@ 2017-05-26 11:50 ` Richard Biener
  2017-05-31 12:45   ` Bin.Cheng
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Biener @ 2017-05-26 11:50 UTC (permalink / raw)
  To: Bin Cheng; +Cc: gcc-patches, nd

On Thu, May 25, 2017 at 8:00 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
> Hi,
> I believe this tests has been wrongly modified previously.  It is to test that the exit check on
> pointer shouldn't be replaced by integer IV.  Somehow GCC starts replacing the check on
> integer IV with pointer IV.  It's valid, though inefficient.  And somehow we starting checking
> this iv replacement.   This patch rectifies it by specifically checking the check on pointer
> shouldn't be replaced.

So maybe it should then test that the pointer test prevails?  Or
rather that it doesn't replace
any exit test?  If 'p' changes for '_2' for unrelated reasons the
pattern will be not testing what
it is supposed to test...

Richard.

> Bootstrap and test in series on x86_64.  Is it OK?
> Thanks,
> bin
> gcc/testsuite/ChangeLog
> 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
>
>         * gcc.dg/tree-ssa/ivopt_mult_4.c: Explicitly check comparison
>         on pointer should not be replaced.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH TEST]Rectify test case gcc.dg/tree-ssa/ivopt_mult_4.c
  2017-05-26 11:50 ` Richard Biener
@ 2017-05-31 12:45   ` Bin.Cheng
  2017-05-31 13:34     ` Richard Biener
  0 siblings, 1 reply; 4+ messages in thread
From: Bin.Cheng @ 2017-05-31 12:45 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]

On Fri, May 26, 2017 at 12:49 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Thu, May 25, 2017 at 8:00 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
>> Hi,
>> I believe this tests has been wrongly modified previously.  It is to test that the exit check on
>> pointer shouldn't be replaced by integer IV.  Somehow GCC starts replacing the check on
>> integer IV with pointer IV.  It's valid, though inefficient.  And somehow we starting checking
>> this iv replacement.   This patch rectifies it by specifically checking the check on pointer
>> shouldn't be replaced.
>
> So maybe it should then test that the pointer test prevails?  Or
> rather that it doesn't replace
> any exit test?  If 'p' changes for '_2' for unrelated reasons the
> pattern will be not testing what
> it is supposed to test...
Thanks for reviewing, I updated patch testing if condition on p_limit2
still exists before expanding.  Is it OK?

Thanks,
bin
>
> Richard.
>
>> Bootstrap and test in series on x86_64.  Is it OK?
>> Thanks,
>> bin
>> gcc/testsuite/ChangeLog
>> 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
>>
>>         * gcc.dg/tree-ssa/ivopt_mult_4.c: Explicitly check comparison
>>         on pointer should not be replaced.

[-- Attachment #2: rectify-ivopt_mult_4.txt --]
[-- Type: text/plain, Size: 804 bytes --]

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_4.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_4.c
index effb052..e69e416 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_4.c
@@ -1,6 +1,6 @@
 
 /* { dg-do compile { target {{ i?86-*-* x86_64-*-* } && lp64 } } } */
-/* { dg-options "-O2 -m64 -fdump-tree-ivopts-details" } */
+/* { dg-options "-O2 -m64 -fdump-tree-optimized" } */
 
 /* iv i's step 16 so its period is smaller than the max iterations
  * i.e. replacing if (p2 > p_limit2) with testing of i may result in
@@ -21,4 +21,4 @@ long foo(long* p, long* p2, int N1, int N2)
   return s;
 }
 
-/* { dg-final { scan-tree-dump "Replacing exit test" "ivopts"} } */
+/* { dg-final { scan-tree-dump "if \\(.*p_limit2.*\\)" "optimized"} } */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH TEST]Rectify test case gcc.dg/tree-ssa/ivopt_mult_4.c
  2017-05-31 12:45   ` Bin.Cheng
@ 2017-05-31 13:34     ` Richard Biener
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Biener @ 2017-05-31 13:34 UTC (permalink / raw)
  To: Bin.Cheng; +Cc: gcc-patches

On Wed, May 31, 2017 at 2:43 PM, Bin.Cheng <amker.cheng@gmail.com> wrote:
> On Fri, May 26, 2017 at 12:49 PM, Richard Biener
> <richard.guenther@gmail.com> wrote:
>> On Thu, May 25, 2017 at 8:00 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
>>> Hi,
>>> I believe this tests has been wrongly modified previously.  It is to test that the exit check on
>>> pointer shouldn't be replaced by integer IV.  Somehow GCC starts replacing the check on
>>> integer IV with pointer IV.  It's valid, though inefficient.  And somehow we starting checking
>>> this iv replacement.   This patch rectifies it by specifically checking the check on pointer
>>> shouldn't be replaced.
>>
>> So maybe it should then test that the pointer test prevails?  Or
>> rather that it doesn't replace
>> any exit test?  If 'p' changes for '_2' for unrelated reasons the
>> pattern will be not testing what
>> it is supposed to test...
> Thanks for reviewing, I updated patch testing if condition on p_limit2
> still exists before expanding.  Is it OK?

Ok.

Richard.

> Thanks,
> bin
>>
>> Richard.
>>
>>> Bootstrap and test in series on x86_64.  Is it OK?
>>> Thanks,
>>> bin
>>> gcc/testsuite/ChangeLog
>>> 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
>>>
>>>         * gcc.dg/tree-ssa/ivopt_mult_4.c: Explicitly check comparison
>>>         on pointer should not be replaced.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-31 13:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-25 18:15 [PATCH TEST]Rectify test case gcc.dg/tree-ssa/ivopt_mult_4.c Bin Cheng
2017-05-26 11:50 ` Richard Biener
2017-05-31 12:45   ` Bin.Cheng
2017-05-31 13:34     ` Richard Biener

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).