diff mbox

Gate vect-mask-store-move-1.c correctly, and actually output the dump

Message ID 1454936845-18517-1-git-send-email-james.greenhalgh@arm.com
State New
Headers show

Commit Message

James Greenhalgh Feb. 8, 2016, 1:07 p.m. UTC
Hi,

As far as I can tell, this testcase will only vectorize for x86_64/i?86
targets, so it should be gated to only check for vectorization on those.

Additionally, this test wants to scan the vectorizer dumps, so we ought
to add -fdump-tree-vect-all to the options.

Checked on aarch64 (cross/native) and x86 with no issues.

OK?

Thanks,
James

---
2016-02-08  James Greenhalgh  <james.greenhalgh@arm.com>

	* gcc.dg/vect/vect-mask-store-move-1.c: Add dump option, and gate
	check on x86_64/i?86.

Comments

Yuri Rumyantsev Feb. 8, 2016, 1:29 p.m. UTC | #1
Hi James,

Thanks for reporting this issue.
I prepared slightly different patch since we don't need to add
tree-vect dump option - it is on by default for all tests in /vect
directory.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/vect-mask-store-move-1.c: Gate dump with x86 target.

2016-02-08 16:07 GMT+03:00 James Greenhalgh <james.greenhalgh@arm.com>:
>
> Hi,
>
> As far as I can tell, this testcase will only vectorize for x86_64/i?86
> targets, so it should be gated to only check for vectorization on those.
>
> Additionally, this test wants to scan the vectorizer dumps, so we ought
> to add -fdump-tree-vect-all to the options.
>
> Checked on aarch64 (cross/native) and x86 with no issues.
>
> OK?
>
> Thanks,
> James
>
> ---
> 2016-02-08  James Greenhalgh  <james.greenhalgh@arm.com>
>
>         * gcc.dg/vect/vect-mask-store-move-1.c: Add dump option, and gate
>         check on x86_64/i?86.
>
James Greenhalgh Feb. 8, 2016, 1:40 p.m. UTC | #2
On Mon, Feb 08, 2016 at 04:29:31PM +0300, Yuri Rumyantsev wrote:
> Hi James,
> 
> Thanks for reporting this issue.
> I prepared slightly different patch since we don't need to add
> tree-vect dump option - it is on by default for all tests in /vect
> directory.

Hm, I added that line as my test runs were showing:

  UNRESOLVED: gcc.dg/vect/vect-mask-store-move-1.c: dump file does not exist

I would guess the explicit 

  /* { dg-options "-O3" } */

is clobbering the vect.exp setup of flags?

This also affects the x86-64 results H.J. Lu is sending out:

  https://gcc.gnu.org/ml/gcc-testresults/2016-02/msg00824.html

Thanks,
James

> 
> gcc/testsuite/ChangeLog:
> 
> * gcc.dg/vect/vect-mask-store-move-1.c: Gate dump with x86 target.
> 
> 2016-02-08 16:07 GMT+03:00 James Greenhalgh <james.greenhalgh@arm.com>:
> >
> > Hi,
> >
> > As far as I can tell, this testcase will only vectorize for x86_64/i?86
> > targets, so it should be gated to only check for vectorization on those.
> >
> > Additionally, this test wants to scan the vectorizer dumps, so we ought
> > to add -fdump-tree-vect-all to the options.
> >
> > Checked on aarch64 (cross/native) and x86 with no issues.
> >
> > OK?
> >
> > Thanks,
> > James
> >
> > ---
> > 2016-02-08  James Greenhalgh  <james.greenhalgh@arm.com>
> >
> >         * gcc.dg/vect/vect-mask-store-move-1.c: Add dump option, and gate
> >         check on x86_64/i?86.
> >
Yuri Rumyantsev Feb. 8, 2016, 2:23 p.m. UTC | #3
Sorry for troubles.
One line must be excluded from test:
-/* { dg-options "-O3" } */

Here is updated patch.

Best regards.
Yuri.

2016-02-08 16:40 GMT+03:00 James Greenhalgh <james.greenhalgh@arm.com>:
> On Mon, Feb 08, 2016 at 04:29:31PM +0300, Yuri Rumyantsev wrote:
>> Hi James,
>>
>> Thanks for reporting this issue.
>> I prepared slightly different patch since we don't need to add
>> tree-vect dump option - it is on by default for all tests in /vect
>> directory.
>
> Hm, I added that line as my test runs were showing:
>
>   UNRESOLVED: gcc.dg/vect/vect-mask-store-move-1.c: dump file does not exist
>
> I would guess the explicit
>
>   /* { dg-options "-O3" } */
>
> is clobbering the vect.exp setup of flags?
>
> This also affects the x86-64 results H.J. Lu is sending out:
>
>   https://gcc.gnu.org/ml/gcc-testresults/2016-02/msg00824.html
>
> Thanks,
> James
>
>>
>> gcc/testsuite/ChangeLog:
>>
>> * gcc.dg/vect/vect-mask-store-move-1.c: Gate dump with x86 target.
>>
>> 2016-02-08 16:07 GMT+03:00 James Greenhalgh <james.greenhalgh@arm.com>:
>> >
>> > Hi,
>> >
>> > As far as I can tell, this testcase will only vectorize for x86_64/i?86
>> > targets, so it should be gated to only check for vectorization on those.
>> >
>> > Additionally, this test wants to scan the vectorizer dumps, so we ought
>> > to add -fdump-tree-vect-all to the options.
>> >
>> > Checked on aarch64 (cross/native) and x86 with no issues.
>> >
>> > OK?
>> >
>> > Thanks,
>> > James
>> >
>> > ---
>> > 2016-02-08  James Greenhalgh  <james.greenhalgh@arm.com>
>> >
>> >         * gcc.dg/vect/vect-mask-store-move-1.c: Add dump option, and gate
>> >         check on x86_64/i?86.
>> >
>
>
Richard Biener Feb. 8, 2016, 2:24 p.m. UTC | #4
On Mon, Feb 8, 2016 at 2:40 PM, James Greenhalgh
<james.greenhalgh@arm.com> wrote:
> On Mon, Feb 08, 2016 at 04:29:31PM +0300, Yuri Rumyantsev wrote:
>> Hi James,
>>
>> Thanks for reporting this issue.
>> I prepared slightly different patch since we don't need to add
>> tree-vect dump option - it is on by default for all tests in /vect
>> directory.
>
> Hm, I added that line as my test runs were showing:
>
>   UNRESOLVED: gcc.dg/vect/vect-mask-store-move-1.c: dump file does not exist
>
> I would guess the explicit
>
>   /* { dg-options "-O3" } */
>
> is clobbering the vect.exp setup of flags?

Yes.  Use { dg-additional-options "-O3" } instead.

> This also affects the x86-64 results H.J. Lu is sending out:
>
>   https://gcc.gnu.org/ml/gcc-testresults/2016-02/msg00824.html
>
> Thanks,
> James
>
>>
>> gcc/testsuite/ChangeLog:
>>
>> * gcc.dg/vect/vect-mask-store-move-1.c: Gate dump with x86 target.
>>
>> 2016-02-08 16:07 GMT+03:00 James Greenhalgh <james.greenhalgh@arm.com>:
>> >
>> > Hi,
>> >
>> > As far as I can tell, this testcase will only vectorize for x86_64/i?86
>> > targets, so it should be gated to only check for vectorization on those.
>> >
>> > Additionally, this test wants to scan the vectorizer dumps, so we ought
>> > to add -fdump-tree-vect-all to the options.
>> >
>> > Checked on aarch64 (cross/native) and x86 with no issues.
>> >
>> > OK?
>> >
>> > Thanks,
>> > James
>> >
>> > ---
>> > 2016-02-08  James Greenhalgh  <james.greenhalgh@arm.com>
>> >
>> >         * gcc.dg/vect/vect-mask-store-move-1.c: Add dump option, and gate
>> >         check on x86_64/i?86.
>> >
>
>
Jeff Law Feb. 8, 2016, 4:07 p.m. UTC | #5
On 02/08/2016 06:07 AM, James Greenhalgh wrote:
>
> Hi,
>
> As far as I can tell, this testcase will only vectorize for x86_64/i?86
> targets, so it should be gated to only check for vectorization on those.
>
> Additionally, this test wants to scan the vectorizer dumps, so we ought
> to add -fdump-tree-vect-all to the options.
>
> Checked on aarch64 (cross/native) and x86 with no issues.
>
> OK?
>
> Thanks,
> James
>
> ---
> 2016-02-08  James Greenhalgh  <james.greenhalgh@arm.com>
>
> 	* gcc.dg/vect/vect-mask-store-move-1.c: Add dump option, and gate
> 	check on x86_64/i?86.
OK.

Thanks,
Jeff
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.dg/vect/vect-mask-store-move-1.c b/gcc/testsuite/gcc.dg/vect/vect-mask-store-move-1.c
index e575f6d..3ef613d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-mask-store-move-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-mask-store-move-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O3" } */
+/* { dg-options "-O3 -fdump-tree-vect-all" } */
 /* { dg-additional-options "-mavx2" { target { i?86-*-* x86_64-*-* } } } */
 
 #define N 256
@@ -16,4 +16,4 @@  void foo (int n)
       }
 }
 
-/* { dg-final { scan-tree-dump-times "Move stmt to created bb" 6 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Move stmt to created bb" 6 "vect" { target { i?86-*-* x86_64-*-* } } } } */