* [Patch] Testsuite fixes for failures caused by patch for PR 80925 - loop peeling and alignment
@ 2017-07-27 22:16 Steve Ellcey
2017-07-28 7:47 ` Richard Biener
0 siblings, 1 reply; 6+ messages in thread
From: Steve Ellcey @ 2017-07-27 22:16 UTC (permalink / raw)
To: gcc-patches; +Cc: rdapp
[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]
I was looking at the latest aarch64 failures and noticed PR 80925.  There
seems to be a consensus to change the tests to reflect the current loop
peeling behaviour so I have created a patch to do that.  There are three
issues with this patch that might need fixing before it can be checked in.
One, I fixed this for aarch64 but not power8.  I don't have a power system
and I am not sure how to specify it in check_effective_target_vect_peel_align.
Maybe someone on the power side can update and test the patch to address
that.
Two, I tried to include a change to gcc.dg/vect/vect-93.c which is one ofÂ
the tests that started failing and I could never get it to pass cleanly,
no matter how many times I tweaked the dg-final statements, so I gave up
and left that test out.
Three, I was a little concerned about the test g++.dg/vect/slp-pr56812.cc,
it looks different than the others and does not mention peeling, but it
was affected by the same checkins as the others.
Any comments from the power and/or vectorizer folks?
Steve Ellcey
sellcey@cavium.com
2017-07-27  Steve Ellcey  <sellcey@cavium.com>
PR tree-optimization/80925
* gcc.dg/vect/no-section-anchors-vect-69.c: Add vect_peel_align target
and xfail.
* g++.dg/vect/slp-pr56812.cc: Add vect_peel_align target.
* gcc.dg/vect/section-anchors-vect-69.c: Ditto.
* gcc.dg/vect/vect-28.c: Ditto.
* gcc.dg/vect/vect-33-big-array.c: Ditto.
* gcc.dg/vect/vect-70.c: Ditto.
* gcc.dg/vect/vect-87.c: Ditto.
* gcc.dg/vect/vect-91.c: Ditto.
* lib/target-supports.exp (check_effective_target_vect_peel_align):
New.
[-- Attachment #2: gcc-vect-tests.patch --]
[-- Type: text/x-patch, Size: 10386 bytes --]
diff --git a/gcc/testsuite/g++.dg/vect/slp-pr56812.cc b/gcc/testsuite/g++.dg/vect/slp-pr56812.cc
index 80bdcdd..3040341 100644
--- a/gcc/testsuite/g++.dg/vect/slp-pr56812.cc
+++ b/gcc/testsuite/g++.dg/vect/slp-pr56812.cc
@@ -17,4 +17,4 @@ void mydata::Set (float x)
data[i] = x;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp1" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp1" { target { vect_peel_align } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
index fe968de..63f3bc4 100644
--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
+++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
@@ -114,7 +114,7 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { {! vector_alignment_reachable} || { vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { vect_peel_align } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_peel_align || { {! vector_alignment_reachable} || { vect_sizes_32B_16B} } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { vect_peel_align || { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/section-anchors-vect-69.c b/gcc/testsuite/gcc.dg/vect/section-anchors-vect-69.c
index 8c88e5f..873af82 100644
--- a/gcc/testsuite/gcc.dg/vect/section-anchors-vect-69.c
+++ b/gcc/testsuite/gcc.dg/vect/section-anchors-vect-69.c
@@ -112,8 +112,8 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" { target vect_int } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target vect_peel_align } } } */
/* Alignment forced using versioning until the pass that increases alignment
is extended to handle structs. */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target {vect_int && vector_alignment_reachable } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { { vect_int && vect_peel_align } && vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 4 "vect" { target {vect_int && {! vector_alignment_reachable} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-28.c b/gcc/testsuite/gcc.dg/vect/vect-28.c
index b28fbd9..0e5aaa5 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-28.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-28.c
@@ -39,6 +39,6 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { vector_alignment_reachable } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { vect_peel_align } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { vect_peel_align && vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-33-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-33-big-array.c
index 5ad3953..5843f8e 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-33-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-33-big-array.c
@@ -38,6 +38,6 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target vector_alignment_reachable } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" target { vect_peel_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { vect_peel_align && vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-70.c b/gcc/testsuite/gcc.dg/vect/vect-70.c
index 0ec06a2..181d898 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-70.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-70.c
@@ -63,6 +63,6 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" {target { vector_alignment_reachable} } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target vect_peel_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" {target { vect_peel_align && vector_alignment_reachable} } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" {target {{! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-87.c b/gcc/testsuite/gcc.dg/vect/vect-87.c
index 4f74397..fca9f55 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-87.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-87.c
@@ -50,6 +50,6 @@ int main (void)
/* Fails for targets that don't vectorize PLUS (e.g alpha). */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" {target vector_alignment_reachable} } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target vect_peel_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" {target { vect_peel_align && vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" {target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-88.c b/gcc/testsuite/gcc.dg/vect/vect-88.c
index f35c525..991c632 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-88.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-88.c
@@ -50,6 +50,6 @@ int main (void)
/* Fails for targets that don't vectorize PLUS (e.g alpha). */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" {target vector_alignment_reachable } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target vect_peel_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" {target { vect_peel_align && vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" {target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-91.c b/gcc/testsuite/gcc.dg/vect/vect-91.c
index de9d5d1..67749cb 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-91.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-91.c
@@ -60,5 +60,5 @@ main3 ()
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" { xfail vect_no_int_add } } } */
/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 3 "vect" { target { { vect_aligned_arrays } && {! vect_sizes_32B_16B} } } } } */
/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 2 "vect" { target { {! vect_aligned_arrays } && {vect_sizes_32B_16B} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" {target { vector_alignment_reachable } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" {target { vect_peel_align && vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" {target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 5a65627..21dd085 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -8284,6 +8284,25 @@ proc check_effective_target_vect_max_reduc { } {
return 0
}
+# Return 1 if the target does not support inexpensive unaligned vector stores
+# and loops should be peeled for better performance.
+
+proc check_effective_target_vect_peel_align { } {
+ global et_vect_peel_align_saved
+
+ if [info exists et_vect_peel_align_saved] {
+ verbose "check_effective_target_vect_peel_align: using cached result" 2
+ } else {
+ set et_vect_peel_align_saved 1
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_peel_align_saved 0
+ }
+ }
+ verbose "check_effective_target_vect_unaligned:\
+ returning $et_vect_peel_align_saved" 2
+ return $et_vect_peel_align_saved
+}
+
# Return 1 if there is an nvptx offload compiler.
proc check_effective_target_offload_nvptx { } {
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Patch] Testsuite fixes for failures caused by patch for PR 80925 - loop peeling and alignment
2017-07-27 22:16 [Patch] Testsuite fixes for failures caused by patch for PR 80925 - loop peeling and alignment Steve Ellcey
@ 2017-07-28 7:47 ` Richard Biener
2017-07-28 18:22 ` Steve Ellcey
0 siblings, 1 reply; 6+ messages in thread
From: Richard Biener @ 2017-07-28 7:47 UTC (permalink / raw)
To: sellcey; +Cc: gcc-patches, rdapp
On Fri, Jul 28, 2017 at 12:16 AM, Steve Ellcey <sellcey@cavium.com> wrote:
> I was looking at the latest aarch64 failures and noticed PR 80925. There
> seems to be a consensus to change the tests to reflect the current loop
> peeling behaviour so I have created a patch to do that. There are three
> issues with this patch that might need fixing before it can be checked in.
>
> One, I fixed this for aarch64 but not power8. I don't have a power system
> and I am not sure how to specify it in check_effective_target_vect_peel_align.
> Maybe someone on the power side can update and test the patch to address
> that.
>
> Two, I tried to include a change to gcc.dg/vect/vect-93.c which is one of
> the tests that started failing and I could never get it to pass cleanly,
> no matter how many times I tweaked the dg-final statements, so I gave up
> and left that test out.
>
> Three, I was a little concerned about the test g++.dg/vect/slp-pr56812.cc,
> it looks different than the others and does not mention peeling, but it
> was affected by the same checkins as the others.
>
> Any comments from the power and/or vectorizer folks?
On one side I'm inclined to simplify the testsuite by adding
--param vect-max-peeling-for-alignment=0 in addition to
-fno-vect-cost-model we already pass and override that in the
tests that specifically exercise peeling for alignment (do we have any?).
OTOH that would remove quite some testing coverage of prologue
peeling.
So ideally testresults would be clean with both no such --param
and that --param added...
I think most of the testcases you needed to adjust have nothing
to do with peeling for alignment thus adding this --param just for
those (and simplifying their dump scanning accordingly) is another
pragmatic option.
Adding yet another target (vect_peel_align) is IMHO not good,
especially as this one depends on cost tuning and not HW
features, so it's impossible(?) to dynamically compute it
with a test compile for example (we _do_ want a clean
vect.exp with any vector HW / tuning switch you add).
Richard.
> Steve Ellcey
> sellcey@cavium.com
>
>
> 2017-07-27 Steve Ellcey <sellcey@cavium.com>
>
> PR tree-optimization/80925
> * gcc.dg/vect/no-section-anchors-vect-69.c: Add vect_peel_align target
> and xfail.
> * g++.dg/vect/slp-pr56812.cc: Add vect_peel_align target.
> * gcc.dg/vect/section-anchors-vect-69.c: Ditto.
> * gcc.dg/vect/vect-28.c: Ditto.
> * gcc.dg/vect/vect-33-big-array.c: Ditto.
> * gcc.dg/vect/vect-70.c: Ditto.
> * gcc.dg/vect/vect-87.c: Ditto.
> * gcc.dg/vect/vect-91.c: Ditto.
> * lib/target-supports.exp (check_effective_target_vect_peel_align):
> New.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Patch] Testsuite fixes for failures caused by patch for PR 80925 - loop peeling and alignment
2017-07-28 7:47 ` Richard Biener
@ 2017-07-28 18:22 ` Steve Ellcey
2017-07-31 8:43 ` Richard Biener
0 siblings, 1 reply; 6+ messages in thread
From: Steve Ellcey @ 2017-07-28 18:22 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc-patches, rdapp
[-- Attachment #1: Type: text/plain, Size: 1658 bytes --]
On Fri, 2017-07-28 at 09:47 +0200, Richard Biener wrote:
> On Fri, Jul 28, 2017 at 12:16 AM, Steve Ellcey <sellcey@cavium.com> wrote:
> >Â
> > Any comments from the power and/or vectorizer folks?
> On one side I'm inclined to simplify the testsuite by adding
> --param vect-max-peeling-for-alignment=0 in addition to
> -fno-vect-cost-model we already pass and override that in the
> tests that specifically exercise peeling for alignment (do we have
> any?).
> OTOH that would remove quite some testing coverage of prologue
> peeling.
>
> So ideally testresults would be clean with both no such --param
> and that --param added...
>
> I think most of the testcases you needed to adjust have nothing
> to do with peeling for alignment thus adding this --param just for
> those (and simplifying their dump scanning accordingly) is another
> pragmatic option.
>
> Adding yet another target (vect_peel_align) is IMHO not good,
> especially as this one depends on cost tuning and not HW
> features, so it's impossible(?) to dynamically compute it
> with a test compile for example (we _do_ want a clean
> vect.exp with any vector HW / tuning switch you add).
How about something like the following. Â I only fixed two of the tests,
I can follow up with more if this approach seems reasonable. Â I tested
this on aarch64 and x86_64.
Steve Ellcey
sellcey@cavium.com
2017-07-28  Steve Ellcey  <sellcey@cavium.com>
PR tree-optimization/80925
* gcc.dg/vect/no-section-anchors-vect-69.c: AddÂ
--param vect-max-peeling-for-alignment=0 option.
Remove unaligned access and peeling checks.
* gcc.dg/vect/section-anchors-vect-69.c: Ditto.
[-- Attachment #2: gcc-vect.patch --]
[-- Type: text/x-patch, Size: 2324 bytes --]
diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
index fe968de..1458ba6 100644
--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
+++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
@@ -1,5 +1,6 @@
/* { dg-require-effective-target vect_int } */
/* { dg-add-options bind_pic_locally } */
+/* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -114,7 +115,4 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { {! vector_alignment_reachable} || { vect_sizes_32B_16B} } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/section-anchors-vect-69.c b/gcc/testsuite/gcc.dg/vect/section-anchors-vect-69.c
index 8c88e5f..26bcf4b0 100644
--- a/gcc/testsuite/gcc.dg/vect/section-anchors-vect-69.c
+++ b/gcc/testsuite/gcc.dg/vect/section-anchors-vect-69.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target section_anchors } */
+/* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -112,8 +113,6 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" { target vect_int } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
/* Alignment forced using versioning until the pass that increases alignment
is extended to handle structs. */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target {vect_int && vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 4 "vect" { target {vect_int && {! vector_alignment_reachable} } } } } */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Patch] Testsuite fixes for failures caused by patch for PR 80925 - loop peeling and alignment
2017-07-28 18:22 ` Steve Ellcey
@ 2017-07-31 8:43 ` Richard Biener
2017-08-04 14:27 ` Rainer Orth
0 siblings, 1 reply; 6+ messages in thread
From: Richard Biener @ 2017-07-31 8:43 UTC (permalink / raw)
To: sellcey; +Cc: gcc-patches, rdapp
On Fri, Jul 28, 2017 at 8:22 PM, Steve Ellcey <sellcey@cavium.com> wrote:
> On Fri, 2017-07-28 at 09:47 +0200, Richard Biener wrote:
>> On Fri, Jul 28, 2017 at 12:16 AM, Steve Ellcey <sellcey@cavium.com> wrote:
>> >
>> > Any comments from the power and/or vectorizer folks?
>> On one side I'm inclined to simplify the testsuite by adding
>> --param vect-max-peeling-for-alignment=0 in addition to
>> -fno-vect-cost-model we already pass and override that in the
>> tests that specifically exercise peeling for alignment (do we have
>> any?).
>> OTOH that would remove quite some testing coverage of prologue
>> peeling.
>>
>> So ideally testresults would be clean with both no such --param
>> and that --param added...
>>
>> I think most of the testcases you needed to adjust have nothing
>> to do with peeling for alignment thus adding this --param just for
>> those (and simplifying their dump scanning accordingly) is another
>> pragmatic option.
>>
>> Adding yet another target (vect_peel_align) is IMHO not good,
>> especially as this one depends on cost tuning and not HW
>> features, so it's impossible(?) to dynamically compute it
>> with a test compile for example (we _do_ want a clean
>> vect.exp with any vector HW / tuning switch you add).
>
> How about something like the following. I only fixed two of the tests,
> I can follow up with more if this approach seems reasonable. I tested
> this on aarch64 and x86_64.
Looks good to me.
Richard.
> Steve Ellcey
> sellcey@cavium.com
>
>
> 2017-07-28 Steve Ellcey <sellcey@cavium.com>
>
> PR tree-optimization/80925
> * gcc.dg/vect/no-section-anchors-vect-69.c: Add
> --param vect-max-peeling-for-alignment=0 option.
> Remove unaligned access and peeling checks.
> * gcc.dg/vect/section-anchors-vect-69.c: Ditto.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Patch] Testsuite fixes for failures caused by patch for PR 80925 - loop peeling and alignment
2017-07-31 8:43 ` Richard Biener
@ 2017-08-04 14:27 ` Rainer Orth
2017-08-07 22:28 ` Steve Ellcey
0 siblings, 1 reply; 6+ messages in thread
From: Rainer Orth @ 2017-08-04 14:27 UTC (permalink / raw)
To: Richard Biener; +Cc: sellcey, gcc-patches, rdapp
Richard Biener <richard.guenther@gmail.com> writes:
> On Fri, Jul 28, 2017 at 8:22 PM, Steve Ellcey <sellcey@cavium.com> wrote:
>> On Fri, 2017-07-28 at 09:47 +0200, Richard Biener wrote:
>>> On Fri, Jul 28, 2017 at 12:16 AM, Steve Ellcey <sellcey@cavium.com> wrote:
>>> >
>>> > Any comments from the power and/or vectorizer folks?
>>> On one side I'm inclined to simplify the testsuite by adding
>>> --param vect-max-peeling-for-alignment=0 in addition to
>>> -fno-vect-cost-model we already pass and override that in the
>>> tests that specifically exercise peeling for alignment (do we have
>>> any?).
>>> OTOH that would remove quite some testing coverage of prologue
>>> peeling.
>>>
>>> So ideally testresults would be clean with both no such --param
>>> and that --param added...
>>>
>>> I think most of the testcases you needed to adjust have nothing
>>> to do with peeling for alignment thus adding this --param just for
>>> those (and simplifying their dump scanning accordingly) is another
>>> pragmatic option.
>>>
>>> Adding yet another target (vect_peel_align) is IMHO not good,
>>> especially as this one depends on cost tuning and not HW
>>> features, so it's impossible(?) to dynamically compute it
>>> with a test compile for example (we _do_ want a clean
>>> vect.exp with any vector HW / tuning switch you add).
>>
>> How about something like the following. I only fixed two of the tests,
>> I can follow up with more if this approach seems reasonable. I tested
>> this on aarch64 and x86_64.
>
> Looks good to me.
>
> Richard.
>
>> Steve Ellcey
>> sellcey@cavium.com
>>
>>
>> 2017-07-28 Steve Ellcey <sellcey@cavium.com>
>>
>> PR tree-optimization/80925
>> * gcc.dg/vect/no-section-anchors-vect-69.c: Add
>> --param vect-max-peeling-for-alignment=0 option.
>> Remove unaligned access and peeling checks.
>> * gcc.dg/vect/section-anchors-vect-69.c: Ditto.
This broke the test on Solaris/SPARC:
+FAIL: gcc.dg/vect/no-section-anchors-vect-69.c scan-tree-dump-times vect "vectorized 4 loops" 1
both 32 and 64-bit. The dump now has
no-section-anchors-vect-69.c:39:5: note: vectorized 3 loops in function.
and (compared to the gcc-7 branch)
no-section-anchors-vect-69.c:44:3: note: not vectorized: unsupported unaligned store.tmp1[2].a.n[1][2][i_74]
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Patch] Testsuite fixes for failures caused by patch for PR 80925 - loop peeling and alignment
2017-08-04 14:27 ` Rainer Orth
@ 2017-08-07 22:28 ` Steve Ellcey
0 siblings, 0 replies; 6+ messages in thread
From: Steve Ellcey @ 2017-08-07 22:28 UTC (permalink / raw)
To: Rainer Orth, Richard Biener; +Cc: gcc-patches, rdapp
I am not sure why this is failing on Solaris/SPARC, do you have the
vector dump file from the test so we can see what it says about the
loop it stopped vectorizing? Â I don't have a Solaris/SPARC system here,
I tried to build an 'initial' gcc for sparc-sun-solaris2.11 but IÂ
could not reproduce the error using that. Â I am not sure why.
Steve Ellcey
sellcey@cavium.com
On Fri, 2017-08-04 at 16:27 +0200, Rainer Orth wrote:
> Richard Biener <richard.guenther@gmail.com> writes:
>
> >
> > On Fri, Jul 28, 2017 at 8:22 PM, Steve Ellcey <sellcey@cavium.com>
> > wrote:
> > >
> > > On Fri, 2017-07-28 at 09:47 +0200, Richard Biener wrote:
> > > >
> > > > On Fri, Jul 28, 2017 at 12:16 AM, Steve Ellcey <sellcey@cavium.
> > > > com> wrote:
> > > > >
> > > > >
> > > > > Any comments from the power and/or vectorizer folks?
> > > > On one side I'm inclined to simplify the testsuite by adding
> > > > --param vect-max-peeling-for-alignment=0 in addition to
> > > > -fno-vect-cost-model we already pass and override that in the
> > > > tests that specifically exercise peeling for alignment (do we
> > > > have
> > > > any?).
> > > > OTOH that would remove quite some testing coverage of prologue
> > > > peeling.
> > > >
> > > > So ideally testresults would be clean with both no such --param
> > > > and that --param added...
> > > >
> > > > I think most of the testcases you needed to adjust have nothing
> > > > to do with peeling for alignment thus adding this --param just
> > > > for
> > > > those (and simplifying their dump scanning accordingly) is
> > > > another
> > > > pragmatic option.
> > > >
> > > > Adding yet another target (vect_peel_align) is IMHO not good,
> > > > especially as this one depends on cost tuning and not HW
> > > > features, so it's impossible(?) to dynamically compute it
> > > > with a test compile for example (we _do_ want a clean
> > > > vect.exp with any vector HW / tuning switch you add).
> > > How about something like the following.  I only fixed two of the
> > > tests,
> > > I can follow up with more if this approach seems reasonable.  I
> > > tested
> > > this on aarch64 and x86_64.
> > Looks good to me.
> >
> > Richard.
> >
> > >
> > > Steve Ellcey
> > > sellcey@cavium.com
> > >
> > >
> > > 2017-07-28  Steve Ellcey  <sellcey@cavium.com>
> > >
> > > Â Â Â Â Â Â Â Â PR tree-optimization/80925
> > > Â Â Â Â Â Â Â Â * gcc.dg/vect/no-section-anchors-vect-69.c: Add
> > > Â Â Â Â Â Â Â Â --param vect-max-peeling-for-alignment=0 option.
> > > Â Â Â Â Â Â Â Â Remove unaligned access and peeling checks.
> > > Â Â Â Â Â Â Â Â * gcc.dg/vect/section-anchors-vect-69.c: Ditto.
> This broke the test on Solaris/SPARC:
>
> +FAIL: gcc.dg/vect/no-section-anchors-vect-69.c scan-tree-dump-times
> vect "vectorized 4 loops" 1
>
> both 32 and 64-bit.  The dump now has
>
> no-section-anchors-vect-69.c:39:5: note: vectorized 3 loops in
> function.
>
> and (compared to the gcc-7 branch)
>
> no-section-anchors-vect-69.c:44:3: note: not vectorized: unsupported
> unaligned store.tmp1[2].a.n[1][2][i_74]
>
> Rainer
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-08-07 22:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-27 22:16 [Patch] Testsuite fixes for failures caused by patch for PR 80925 - loop peeling and alignment Steve Ellcey
2017-07-28 7:47 ` Richard Biener
2017-07-28 18:22 ` Steve Ellcey
2017-07-31 8:43 ` Richard Biener
2017-08-04 14:27 ` Rainer Orth
2017-08-07 22:28 ` Steve Ellcey
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).