gfortran.dg/vect failures at -m64 on darwin fix
Jack Howarth
howarth@bromo.msbb.uc.edu
Tue Aug 7 02:46:00 GMT 2007
For those who are interested, attached are the
patches Dorit proposed that eliminate the false
failures in the vect testsuite tests on
powerpc-apple-darwin8/9 at -m64.
Jack
-------------- next part --------------
Index: gcc.dg/vect/vect-50.c
===================================================================
*** gcc.dg/vect/vect-50.c (revision 127202)
--- gcc.dg/vect/vect-50.c (working copy)
*************** int main (void)
*** 61,66 ****
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target vect_no_align } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
--- 61,67 ----
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target vect_no_align } } } */
+ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && {! vect_no_align} } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-33.c
===================================================================
*** gcc.dg/vect/vect-33.c (revision 127202)
--- gcc.dg/vect/vect-33.c (working copy)
*************** int main (void)
*** 38,42 ****
/* { 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" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
--- 38,43 ----
/* { 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 "Alignment of access forced using versioning" 1 "vect" { target { ! vector_alignment_reachable } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/no-section-anchors-vect-69.c
===================================================================
*** gcc.dg/vect/no-section-anchors-vect-69.c (revision 127202)
--- gcc.dg/vect/no-section-anchors-vect-69.c (working copy)
*************** int main1 ()
*** 37,43 ****
{
int i,j;
! /* 1. unaligned */
for (i = 0; i < N; i++)
{
tmp1[2].a.n[1][2][i] = 5;
--- 37,43 ----
{
int i,j;
! /* 1. unaligned (known misalignment) */
for (i = 0; i < N; i++)
{
tmp1[2].a.n[1][2][i] = 5;
*************** int main1 ()
*** 82,88 ****
}
}
! /* 4. unaligned */
for (i = 0; i < N-4; i++)
{
for (j = 0; j < N-4; j++)
--- 82,88 ----
}
}
! /* 4. unaligned (unknown misalignment) */
for (i = 0; i < N-4; i++)
{
for (j = 0; j < N-4; j++)
*************** int main (void)
*** 113,117 ****
/* { 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" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
--- 113,119 ----
/* { 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} } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target {! vector_alignment_reachable} } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target {! vector_alignment_reachable} } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-42.c
===================================================================
*** gcc.dg/vect/vect-42.c (revision 127202)
--- gcc.dg/vect/vect-42.c (working copy)
*************** int main (void)
*** 55,61 ****
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target vect_no_align } } } */
! /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
--- 55,61 ----
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { vect_no_align || { ! vector_alignment_reachable } } } } } */
! /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || { ! vector_alignment_reachable } } } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail {vect_no_align || { ! vector_alignment_reachable } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-93.c
===================================================================
*** gcc.dg/vect/vect-93.c (revision 127202)
--- gcc.dg/vect/vect-93.c (working copy)
*************** int main (void)
*** 67,78 ****
/* 2 loops vectorized in main1, 2 loops vectorized in main:
the first loop in main requires vectorization of conversions,
! the second loop in main requires vectorization of misaliged load. */
/* main && main1 together: */
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 2 "vect" { target powerpc*-*-* i?86-*-* x86_64-*-* } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target vect_no_align } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail vect_no_align } } } */
/* in main1: */
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target !powerpc*-*-* !i?86-*-* !x86_64-*-* } } } */
--- 67,78 ----
/* 2 loops vectorized in main1, 2 loops vectorized in main:
the first loop in main requires vectorization of conversions,
! the second loop in main requires vectorization of misaligned load. */
/* main && main1 together: */
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 2 "vect" { target powerpc*-*-* i?86-*-* x86_64-*-* } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { vect_no_align && {! vector_alignment_reachable} } } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } } */
/* in main1: */
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target !powerpc*-*-* !i?86-*-* !x86_64-*-* } } } */
Index: gcc.dg/vect/section-anchors-vect-69.c
===================================================================
*** gcc.dg/vect/section-anchors-vect-69.c (revision 127202)
--- gcc.dg/vect/section-anchors-vect-69.c (working copy)
*************** int main (void)
*** 115,119 ****
/* { 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" 4 "vect" { target vect_int } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
--- 115,120 ----
/* { 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" 4 "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} } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-44.c
===================================================================
*** gcc.dg/vect/vect-44.c (revision 127202)
--- gcc.dg/vect/vect-44.c (working copy)
*************** int main (void)
*** 65,70 ****
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target vect_no_align } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
--- 65,71 ----
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target vect_no_align } } } */
+ /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && {! vect_no_align} } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-70.c
===================================================================
*** gcc.dg/vect/vect-70.c (revision 127202)
--- gcc.dg/vect/vect-70.c (working copy)
*************** int main (void)
*** 63,67 ****
/* { 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" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
--- 63,68 ----
/* { 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 "Alignment of access forced using versioning" 1 "vect" {target {! vector_alignment_reachable} } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-28.c
===================================================================
*** gcc.dg/vect/vect-28.c (revision 127202)
--- gcc.dg/vect/vect-28.c (working copy)
*************** int main (void)
*** 39,43 ****
/* { 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" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
--- 39,44 ----
/* { 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 "Alignment of access forced using versioning" 1 "vect" { target { ! vector_alignment_reachable } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-87.c
===================================================================
*** gcc.dg/vect/vect-87.c (revision 127202)
--- gcc.dg/vect/vect-87.c (working copy)
*************** int main (void)
*** 50,54 ****
/* 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" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
--- 50,55 ----
/* 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 "Alignment of access forced using versioning" 1 "vect" {target {! vector_alignment_reachable} } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-71.c
===================================================================
*** gcc.dg/vect/vect-71.c (revision 127202)
--- gcc.dg/vect/vect-71.c (working copy)
***************
*** 5,11 ****
#define N 16
! /* unaligned load. */
int main1 ()
{
--- 5,11 ----
#define N 16
! /* indirect access. */
int main1 ()
{
Index: gcc.dg/vect/vect-96.c
===================================================================
*** gcc.dg/vect/vect-96.c (revision 127202)
--- gcc.dg/vect/vect-96.c (working copy)
*************** int main (void)
*** 42,48 ****
For targets that don't support unaligned loads, version for the store. */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
! /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target vect_no_align } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
--- 42,48 ----
For targets that don't support unaligned loads, version for the store. */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
! /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { {! vect_no_align} && vector_alignment_reachable } } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align || {! vector_alignment_reachable} } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-88.c
===================================================================
*** gcc.dg/vect/vect-88.c (revision 127202)
--- gcc.dg/vect/vect-88.c (working copy)
*************** int main (void)
*** 50,54 ****
/* 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" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
--- 50,55 ----
/* 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 "Alignment of access forced using versioning" 1 "vect" {target {! vector_alignment_reachable} } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/pr25413.c
===================================================================
*** gcc.dg/vect/pr25413.c (revision 127202)
--- gcc.dg/vect/pr25413.c (working copy)
*************** int main (void)
*** 31,38 ****
return 0;
}
! /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vector_alignment_reachable } } } */
! /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vector_alignment_reachable } } } } */
! /* { dg-final { scan-tree-dump-times "vector alignment may not be reachable" 1 "vect" { target { ! vector_alignment_reachable } } } } */
! /* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 1 "vect" { target { ! vector_alignment_reachable } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
--- 31,38 ----
return 0;
}
! /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vector_alignment_reachable_for_double } } } */
! /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vector_alignment_reachable_for_double } } } } */
! /* { dg-final { scan-tree-dump-times "vector alignment may not be reachable" 1 "vect" { target { ! vector_alignment_reachable_for_double } } } } */
! /* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 1 "vect" { target { ! vector_alignment_reachable_for_double } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: gcc.dg/vect/vect-91.c
===================================================================
*** gcc.dg/vect/vect-91.c (revision 127202)
--- gcc.dg/vect/vect-91.c (working copy)
*************** main3 ()
*** 58,64 ****
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" { xfail vect_no_int_add } } } */
- /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 3 "vect" } } */
! /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
--- 58,64 ----
}
/* { 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" } } */
! /* { 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 versioning" 3 "vect" {target {! vector_alignment_reachable} } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: lib/target-supports.exp
===================================================================
*** lib/target-supports.exp (revision 127202)
--- lib/target-supports.exp (working copy)
*************** proc check_effective_target_natural_alig
*** 2110,2118 ****
if [info exists et_natural_alignment_saved] {
verbose "check_effective_target_natural_alignment: using cached result" 2
} else {
! set et_natural_alignment_saved 0
! if { [istarget spu-*-*] } {
! set et_natural_alignment_saved 1
}
}
verbose "check_effective_target_natural_alignment: returning $et_natural_alignment_saved" 2
--- 2110,2119 ----
if [info exists et_natural_alignment_saved] {
verbose "check_effective_target_natural_alignment: using cached result" 2
} else {
! # FIXME: 32bit powerpc: guaranteed only if MASK_ALIGN_NATURAL/POWER.
! set et_natural_alignment_saved 1
! if { ([istarget *-*-darwin*] && [is-effective-target lp64]) } {
! set et_natural_alignment_saved 0
}
}
verbose "check_effective_target_natural_alignment: returning $et_natural_alignment_saved" 2
*************** proc check_effective_target_vector_align
*** 2140,2145 ****
--- 2141,2166 ----
return $et_vector_alignment_reachable_saved
}
+ # Return 1 if vector alignment for soubles is reachable, 0 otherwise.
+ #
+ # This won't change for different subtargets so cache the result.
+
+ proc check_effective_target_vector_alignment_reachable_for_double { } {
+ global et_vector_alignment_reachable_for_double
+
+ if [info exists et_vector_alignment_reachable_for_double_saved] {
+ verbose "check_effective_target_vector_alignment_reachable_for_double: using cached result" 2
+ } else {
+ if { [check_effective_target_vect_aligned_arrays] } {
+ set et_vector_alignment_reachable_for_double_saved 1
+ } else {
+ set et_vector_alignment_reachable_for_double_saved 0
+ }
+ }
+ verbose "check_effective_target_vector_alignment_reachable_for_double: returning $et_vector_alignment_reachable_for_double_saved" 2
+ return $et_vector_alignment_reachable_for_double_saved
+ }
+
# Return 1 if the target supports vector conditional operations, 0 otherwise.
proc check_effective_target_vect_condition { } {
Index: gfortran.dg/vect/vect-4.f90
===================================================================
*** gfortran.dg/vect/vect-4.f90 (revision 127202)
--- gfortran.dg/vect/vect-4.f90 (working copy)
*************** Y = Y + A * X
*** 10,16 ****
END
! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } }
! ! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } }
! { dg-final { scan-tree-dump-times "accesses have the same alignment." 1 "vect" } }
! { dg-final { cleanup-tree-dump "vect" } }
--- 10,17 ----
END
! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } }
! ! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } }
! ! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target {! vector_alignment_reachable} } } }
! { dg-final { scan-tree-dump-times "accesses have the same alignment." 1 "vect" } }
! { dg-final { cleanup-tree-dump "vect" } }
Index: gfortran.dg/vect/vect-5.f90
===================================================================
*** gfortran.dg/vect/vect-5.f90 (revision 127202)
--- gfortran.dg/vect/vect-5.f90 (working copy)
***************
*** 36,51 ****
end
! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align } } } }
! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } }
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { ilp32 && vect_no_align } } } }
!
! ! We also expect to vectorize one loop for lp64 targets that support
! ! misaligned access:
! ! scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { lp64 && !vect_no_align } }
! ! scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { lp64 && !vect_no_align } }
! ! scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { lp64 && !vect_no_align } }
! ! but we currently can't combine logical operators. (Could define
! ! a keyword for "not_vect_no_align" if desired).
!
! { dg-final { cleanup-tree-dump "vect" } }
--- 36,43 ----
end
! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } }
! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } }
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align } } } }
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target {! vector_alignment_reachable} } } }
! { dg-final { cleanup-tree-dump "vect" } }
Index: gfortran.dg/vect/vect-2.f90
===================================================================
*** gfortran.dg/vect/vect-2.f90 (revision 127202)
--- gfortran.dg/vect/vect-2.f90 (working copy)
*************** END
*** 15,22 ****
! support unaligned loads).
! { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } }
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail vect_no_align } } }
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target vect_no_align } } }
! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } }
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" {target vect_no_align } } }
! { dg-final { cleanup-tree-dump "vect" } }
--- 15,22 ----
! support unaligned loads).
! { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } }
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } }
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { vect_no_align && {! vector_alignment_reachable} } } } }
! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } }
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" {target { vect_no_align || {! vector_alignment_reachable} } } } }
! { dg-final { cleanup-tree-dump "vect" } }
Index: gfortran.dg/vect/vect-3.f90
===================================================================
*** gfortran.dg/vect/vect-3.f90 (revision 127202)
--- gfortran.dg/vect/vect-3.f90 (working copy)
*************** DIMENSION X(N), Y(N)
*** 6,11 ****
Y = Y + A * X
END
! ! fail to vectorize due to failure to compute number of iterations (PR tree-optimization/18527)
! ! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail *-*-* } } }
! { dg-final { cleanup-tree-dump "vect" } }
--- 6,18 ----
Y = Y + A * X
END
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target vect_no_align } } }
! ! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target vect_no_align } } }
!
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vect_no_align} && {! vector_alignment_reachable} } } } }
! ! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { {! vect_no_align} && {! vector_alignment_reachable} } } } }
!
! ! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } }
! ! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } }
!
! { dg-final { cleanup-tree-dump "vect" } }
-------------- next part --------------
Index: costmodel-vect-33.c
===================================================================
--- costmodel-vect-33.c (revision 126889)
+++ costmodel-vect-33.c (working copy)
@@ -35,5 +35,9 @@
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */
+/* Peeling to align the store is used. Overhead of peeling is too high. */
+/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target vector_alignment_reachable } } } */
+
+/* Versioning to align the store is used. Overhead of versioning is not too high. */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target {! vector_alignment_reachable} } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
Index: costmodel-vect-76b.c
===================================================================
--- costmodel-vect-76b.c (revision 126889)
+++ costmodel-vect-76b.c (working copy)
@@ -42,6 +42,10 @@
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */
+/* Peeling to align the store is used. Overhead of peeling is too high. */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target vector_alignment_reachable } } } */
+/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target { vector_alignment_reachable && {! vect_no_align} } } } } */
+
+/* Versioning to align the store is used. Overhead of versioning is not too high. */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align || {! vector_alignment_reachable} } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
More information about the Fortran
mailing list