* [PATCH, rs6000, testsuite] Fix PR87306
@ 2019-01-16 9:29 Kewen.Lin
2019-01-16 12:52 ` Bill Schmidt
2019-01-16 17:16 ` Segher Boessenkool
0 siblings, 2 replies; 3+ messages in thread
From: Kewen.Lin @ 2019-01-16 9:29 UTC (permalink / raw)
To: gcc-patches; +Cc: wschmidt, segher
Hi,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87306, it's older POWER
hardware specific test case issue. On POWER7 and earlier, we implicitly
set flag -mno-allow-movmisalign which disables vectorization when to
vectorize the code requires that misaligned loads and stores. For POWER8
and upper, the opposite value is implicitly set(-mallow-movmisalign),
then the vectorization performs as expected.
Similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65484, the proposed
fix is to make dg-final checks whether vect_hw_misalign support on powerpc,
only further verify the dump pattern when it's on to consitent to the
behavior.
Tested on trunk for POWER8 LE and POWER7 BE systems.
Is this ok for trunk?
---
gcc/testsuite/ChangeLog
2019-01-16 Kewen Lin <linkw@gcc.gnu.org>
PR target/87306
* gcc.dg/vect/bb-slp-pow-1.c : Modify to reflect that the loop is not
vectorized on POWER unless hardware misaligned loads are available.
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c
index 5a05bd4..6742e12 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c
@@ -25,4 +25,8 @@ main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" } } */
+/* On older powerpc hardware (POWER7 and earlier), the default flag
+ -mno-allow-movmisalign prevents vectorization. On POWER8 and later,
+ when vect_hw_misalign is true, vectorization occurs. */
+
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" { target {{ ! powerpc*-*-* } || { powerpc*-*-* && vect_hw_misalign }} } } } */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH, rs6000, testsuite] Fix PR87306
2019-01-16 9:29 [PATCH, rs6000, testsuite] Fix PR87306 Kewen.Lin
@ 2019-01-16 12:52 ` Bill Schmidt
2019-01-16 17:16 ` Segher Boessenkool
1 sibling, 0 replies; 3+ messages in thread
From: Bill Schmidt @ 2019-01-16 12:52 UTC (permalink / raw)
To: Kewen.Lin, gcc-patches; +Cc: wschmidt, segher
I can't approve the patch, but I agree this is the right fix.
Bill
On 1/16/19 3:29 AM, Kewen.Lin wrote:
> Hi,
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87306, it's older POWER
> hardware specific test case issue. On POWER7 and earlier, we implicitly
> set flag -mno-allow-movmisalign which disables vectorization when to
> vectorize the code requires that misaligned loads and stores. For POWER8
> and upper, the opposite value is implicitly set(-mallow-movmisalign),
> then the vectorization performs as expected.
>
> Similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65484, the proposed
> fix is to make dg-final checks whether vect_hw_misalign support on powerpc,
> only further verify the dump pattern when it's on to consitent to the
> behavior.
>
> Tested on trunk for POWER8 LE and POWER7 BE systems.
> Is this ok for trunk?
>
> ---
>
> gcc/testsuite/ChangeLog
>
> 2019-01-16 Kewen Lin <linkw@gcc.gnu.org>
>
> PR target/87306
> * gcc.dg/vect/bb-slp-pow-1.c : Modify to reflect that the loop is not
> vectorized on POWER unless hardware misaligned loads are available.
>
> diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c
> index 5a05bd4..6742e12 100644
> --- a/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c
> +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c
> @@ -25,4 +25,8 @@ main (void)
> return 0;
> }
>
> -/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" } } */
> +/* On older powerpc hardware (POWER7 and earlier), the default flag
> + -mno-allow-movmisalign prevents vectorization. On POWER8 and later,
> + when vect_hw_misalign is true, vectorization occurs. */
> +
> +/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" { target {{ ! powerpc*-*-* } || { powerpc*-*-* && vect_hw_misalign }} } } } */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH, rs6000, testsuite] Fix PR87306
2019-01-16 9:29 [PATCH, rs6000, testsuite] Fix PR87306 Kewen.Lin
2019-01-16 12:52 ` Bill Schmidt
@ 2019-01-16 17:16 ` Segher Boessenkool
1 sibling, 0 replies; 3+ messages in thread
From: Segher Boessenkool @ 2019-01-16 17:16 UTC (permalink / raw)
To: Kewen.Lin; +Cc: gcc-patches, wschmidt, segher
Hi!
On Wed, Jan 16, 2019 at 05:29:30PM +0800, Kewen.Lin wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87306, it's older POWER
> hardware specific test case issue. On POWER7 and earlier, we implicitly
> set flag -mno-allow-movmisalign which disables vectorization when to
> vectorize the code requires that misaligned loads and stores. For POWER8
> and upper, the opposite value is implicitly set(-mallow-movmisalign),
> then the vectorization performs as expected.
>
> Similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65484, the proposed
> fix is to make dg-final checks whether vect_hw_misalign support on powerpc,
> only further verify the dump pattern when it's on to consitent to the
> behavior.
> 2019-01-16 Kewen Lin <linkw@gcc.gnu.org>
>
> PR target/87306
> * gcc.dg/vect/bb-slp-pow-1.c : Modify to reflect that the loop is not
No space before the colon.
> vectorized on POWER unless hardware misaligned loads are available.
>
> diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c
> index 5a05bd4..6742e12 100644
> --- a/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c
> +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c
> @@ -25,4 +25,8 @@ main (void)
> return 0;
> }
>
> -/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" } } */
> +/* On older powerpc hardware (POWER7 and earlier), the default flag
> + -mno-allow-movmisalign prevents vectorization. On POWER8 and later,
> + when vect_hw_misalign is true, vectorization occurs. */
Two spaces after a full stop.
> +/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" { target {{ ! powerpc*-*-* } || { powerpc*-*-* && vect_hw_misalign }} } } } */
Okay for trunk with those things fixed. Thanks!
Segher
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-16 17:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-16 9:29 [PATCH, rs6000, testsuite] Fix PR87306 Kewen.Lin
2019-01-16 12:52 ` Bill Schmidt
2019-01-16 17:16 ` Segher Boessenkool
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).