public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed, testsuite] Fix vect/trapv-vect-reduc-4.c for sparc
@ 2015-08-12  5:57 Tom de Vries
  2015-08-12  6:34 ` [RFC] Add check_effective_target_vect_min_max Tom de Vries
  0 siblings, 1 reply; 7+ messages in thread
From: Tom de Vries @ 2015-08-12  5:57 UTC (permalink / raw)
  To: gcc-patches; +Cc: ro

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

Hi,

For sparc, the scan for 'vectorized 2 loops' in 
vect/trapv-vect-reduc-4.c fail because the vector instructions min and 
max are not supported.

Tested on x86_64. Tested on sparc by Rainer.

Committed as obvious.

Thanks,
- Tom

[-- Attachment #2: 0001-Fix-vect-trapv-vect-reduc-4.c-for-sparc.patch --]
[-- Type: text/x-patch, Size: 901 bytes --]

Fix vect/trapv-vect-reduc-4.c for sparc

2015-08-12  Tom de Vries  <tom@codesourcery.com>

	PR testsuite/67175
	* gcc.dg/vect/trapv-vect-reduc-4.c: Add reduction detection scan.
	Handle absence of vector min/max for sparc.
---
 gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c b/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
index 86f9b90..8fd353c 100644
--- a/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
+++ b/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
@@ -46,4 +46,5 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Detected reduction\\." 2 "vect"  } } */
+/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { ! { sparc*-*-* } } } } } */
-- 
1.9.1


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

* [RFC] Add check_effective_target_vect_min_max
  2015-08-12  5:57 [committed, testsuite] Fix vect/trapv-vect-reduc-4.c for sparc Tom de Vries
@ 2015-08-12  6:34 ` Tom de Vries
  2015-08-12  8:51   ` Rainer Orth
  0 siblings, 1 reply; 7+ messages in thread
From: Tom de Vries @ 2015-08-12  6:34 UTC (permalink / raw)
  To: gcc-patches; +Cc: ro

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

[ was: Re: [committed, testsuite] Fix vect/trapv-vect-reduc-4.c for sparc  ]

On 12/08/15 07:57, Tom de Vries wrote:
> Hi,
>
> For sparc, the scan for 'vectorized 2 loops' in
> vect/trapv-vect-reduc-4.c fail because the vector instructions min and
> max are not supported.
>
> Tested on x86_64. Tested on sparc by Rainer.
>

This follow-up patch introduces a new effective target vect_min_max, 
similar to how effective target vect_bswap is implemented.

Any comments?

Thanks,
- Tom


[-- Attachment #2: 0002-Add-check_effective_target_vect_min_max.patch --]
[-- Type: text/x-patch, Size: 1967 bytes --]

Add check_effective_target_vect_min_max

2015-08-12  Tom de Vries  <tom@codesourcery.com>

	* lib/target-supports.exp (check_effective_target_vect_min_max): New
	proc.
	* gcc.dg/vect/trapv-vect-reduc-4.c: Use vect_min_max effective target.
---
 gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c |  2 +-
 gcc/testsuite/lib/target-supports.exp          | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c b/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
index 8fd353c..1624696 100644
--- a/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
+++ b/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
@@ -47,4 +47,4 @@ int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "Detected reduction\\." 2 "vect"  } } */
-/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { ! { sparc*-*-* } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { vect_min_max } } } } */
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 1988301..c585e5f 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3568,6 +3568,24 @@ proc check_effective_target_vect_bswap { } {
     return $et_vect_bswap_saved
 }
 
+# Return 1 if the target supports vector min/max operations.
+
+proc check_effective_target_vect_min_max { } {
+    global et_vect_min_max_saved
+
+    if [info exists et_vect_min_max_saved] {
+	verbose "check_effective_target_vect_min_max: using cached result" 2
+    } else {
+	set et_vect_min_max_saved 1
+	if { [istarget sparc*-*-*] } {
+	   set et_vect_min_max_saved 0
+	}
+    }
+
+    verbose "check_effective_target_vect_min_max: returning $et_vect_min_max_saved" 2
+    return $et_vect_min_max_saved
+}
+
 # Return 1 if the target supports hardware vector shift operation for char.
 
 proc check_effective_target_vect_shift_char { } {
-- 
1.9.1


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

* Re: [RFC] Add check_effective_target_vect_min_max
  2015-08-12  6:34 ` [RFC] Add check_effective_target_vect_min_max Tom de Vries
@ 2015-08-12  8:51   ` Rainer Orth
  2015-08-12  9:15     ` Tom de Vries
  0 siblings, 1 reply; 7+ messages in thread
From: Rainer Orth @ 2015-08-12  8:51 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gcc-patches

Tom de Vries <Tom_deVries@mentor.com> writes:

> This follow-up patch introduces a new effective target vect_min_max,
> similar to how effective target vect_bswap is implemented.
>
> Any comments?
>
> Thanks,
> - Tom
>
> Add check_effective_target_vect_min_max
>
> 2015-08-12  Tom de Vries  <tom@codesourcery.com>
>
> 	* lib/target-supports.exp (check_effective_target_vect_min_max): New
> 	proc.
> 	* gcc.dg/vect/trapv-vect-reduc-4.c: Use vect_min_max effective target.

Looks good to me, but the new effective-target keyword needs documenting
in sourcebuild.texi.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

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

* Re: [RFC] Add check_effective_target_vect_min_max
  2015-08-12  8:51   ` Rainer Orth
@ 2015-08-12  9:15     ` Tom de Vries
  2015-08-12  9:18       ` Rainer Orth
  0 siblings, 1 reply; 7+ messages in thread
From: Tom de Vries @ 2015-08-12  9:15 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches

On 12/08/15 10:51, Rainer Orth wrote:
> Tom de Vries <Tom_deVries@mentor.com> writes:
>
>> This follow-up patch introduces a new effective target vect_min_max,
>> similar to how effective target vect_bswap is implemented.
>>
>> Any comments?
>>
>> Thanks,
>> - Tom
>>
>> Add check_effective_target_vect_min_max
>>
>> 2015-08-12  Tom de Vries  <tom@codesourcery.com>
>>
>> 	* lib/target-supports.exp (check_effective_target_vect_min_max): New
>> 	proc.
>> 	* gcc.dg/vect/trapv-vect-reduc-4.c: Use vect_min_max effective target.
>
> Looks good to me, but the new effective-target keyword needs documenting
> in sourcebuild.texi.
>

Hmm, in sourcebuild.texi I found:
...
@item vect_no_int_max
Target does not support a vector max instruction on @code{int}.
...

That looks related. [ I also found a patch introducing vect_no_uint_max 
here: https://gcc.gnu.org/ml/gcc-patches/2010-01/msg00152.html. ]

I'm not sure where to take it from here. Should I introduce 
vect_no_int_min, and use that in combination with vect_no_int_max?

Thanks,
- Tom

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

* Re: [RFC] Add check_effective_target_vect_min_max
  2015-08-12  9:15     ` Tom de Vries
@ 2015-08-12  9:18       ` Rainer Orth
  2015-08-12 10:06         ` Richard Biener
  0 siblings, 1 reply; 7+ messages in thread
From: Rainer Orth @ 2015-08-12  9:18 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gcc-patches, Richard Biener

Tom de Vries <Tom_deVries@mentor.com> writes:

> On 12/08/15 10:51, Rainer Orth wrote:
>> Tom de Vries <Tom_deVries@mentor.com> writes:
>>
>>> This follow-up patch introduces a new effective target vect_min_max,
>>> similar to how effective target vect_bswap is implemented.
>>>
>>> Any comments?
>>>
>>> Thanks,
>>> - Tom
>>>
>>> Add check_effective_target_vect_min_max
>>>
>>> 2015-08-12  Tom de Vries  <tom@codesourcery.com>
>>>
>>> 	* lib/target-supports.exp (check_effective_target_vect_min_max): New
>>> 	proc.
>>> 	* gcc.dg/vect/trapv-vect-reduc-4.c: Use vect_min_max effective target.
>>
>> Looks good to me, but the new effective-target keyword needs documenting
>> in sourcebuild.texi.
>>
>
> Hmm, in sourcebuild.texi I found:
> ...
> @item vect_no_int_max
> Target does not support a vector max instruction on @code{int}.
> ...
>
> That looks related. [ I also found a patch introducing vect_no_uint_max
> here: https://gcc.gnu.org/ml/gcc-patches/2010-01/msg00152.html. ]
>
> I'm not sure where to take it from here. Should I introduce
> vect_no_int_min, and use that in combination with vect_no_int_max?

I'd say this is something for the vectorizer maintainers to decide.  Richi?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

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

* Re: [RFC] Add check_effective_target_vect_min_max
  2015-08-12  9:18       ` Rainer Orth
@ 2015-08-12 10:06         ` Richard Biener
  2015-08-23  9:05           ` [committed] Rename vect_no_int_max to vect_no_int_min_max Tom de Vries
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Biener @ 2015-08-12 10:06 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Tom de Vries, gcc-patches

On Wed, 12 Aug 2015, Rainer Orth wrote:

> Tom de Vries <Tom_deVries@mentor.com> writes:
> 
> > On 12/08/15 10:51, Rainer Orth wrote:
> >> Tom de Vries <Tom_deVries@mentor.com> writes:
> >>
> >>> This follow-up patch introduces a new effective target vect_min_max,
> >>> similar to how effective target vect_bswap is implemented.
> >>>
> >>> Any comments?
> >>>
> >>> Thanks,
> >>> - Tom
> >>>
> >>> Add check_effective_target_vect_min_max
> >>>
> >>> 2015-08-12  Tom de Vries  <tom@codesourcery.com>
> >>>
> >>> 	* lib/target-supports.exp (check_effective_target_vect_min_max): New
> >>> 	proc.
> >>> 	* gcc.dg/vect/trapv-vect-reduc-4.c: Use vect_min_max effective target.
> >>
> >> Looks good to me, but the new effective-target keyword needs documenting
> >> in sourcebuild.texi.
> >>
> >
> > Hmm, in sourcebuild.texi I found:
> > ...
> > @item vect_no_int_max
> > Target does not support a vector max instruction on @code{int}.
> > ...
> >
> > That looks related. [ I also found a patch introducing vect_no_uint_max
> > here: https://gcc.gnu.org/ml/gcc-patches/2010-01/msg00152.html. ]
> >
> > I'm not sure where to take it from here. Should I introduce
> > vect_no_int_min, and use that in combination with vect_no_int_max?
> 
> I'd say this is something for the vectorizer maintainers to decide.  Richi?

I expect the above is already effectively
vect_no_int_min as well (which target would support min but not max...?).

So after double-checking that you could rename it to vect_no_int_min_max.

Richard.

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

* [committed] Rename vect_no_int_max to vect_no_int_min_max
  2015-08-12 10:06         ` Richard Biener
@ 2015-08-23  9:05           ` Tom de Vries
  0 siblings, 0 replies; 7+ messages in thread
From: Tom de Vries @ 2015-08-23  9:05 UTC (permalink / raw)
  To: Richard Biener, Rainer Orth; +Cc: gcc-patches

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

[ was: Re: [RFC] Add check_effective_target_vect_min_max ]

On 12-08-15 12:06, Richard Biener wrote:
> On Wed, 12 Aug 2015, Rainer Orth wrote:
>
>> Tom de Vries <Tom_deVries@mentor.com> writes:
>>
>>> On 12/08/15 10:51, Rainer Orth wrote:
>>>> Tom de Vries <Tom_deVries@mentor.com> writes:
>>>>
>>>>> This follow-up patch introduces a new effective target vect_min_max,
>>>>> similar to how effective target vect_bswap is implemented.
>>>>>
>>>>> Any comments?
>>>>>
>>>>> Thanks,
>>>>> - Tom
>>>>>
>>>>> Add check_effective_target_vect_min_max
>>>>>
>>>>> 2015-08-12  Tom de Vries  <tom@codesourcery.com>
>>>>>
>>>>> 	* lib/target-supports.exp (check_effective_target_vect_min_max): New
>>>>> 	proc.
>>>>> 	* gcc.dg/vect/trapv-vect-reduc-4.c: Use vect_min_max effective target.
>>>>
>>>> Looks good to me, but the new effective-target keyword needs documenting
>>>> in sourcebuild.texi.
>>>>
>>>
>>> Hmm, in sourcebuild.texi I found:
>>> ...
>>> @item vect_no_int_max
>>> Target does not support a vector max instruction on @code{int}.
>>> ...
>>>
>>> That looks related. [ I also found a patch introducing vect_no_uint_max
>>> here: https://gcc.gnu.org/ml/gcc-patches/2010-01/msg00152.html. ]
>>>
>>> I'm not sure where to take it from here. Should I introduce
>>> vect_no_int_min, and use that in combination with vect_no_int_max?
>>
>> I'd say this is something for the vectorizer maintainers to decide.  Richi?
>
> I expect the above is already effectively
> vect_no_int_min as well (which target would support min but not max...?).
>
> So after double-checking that you could rename it to vect_no_int_min_max.
>

I found test-case vect-double-reduc-3.c, which uses vect_no_int_max for both min 
and max.

Committed patch to trunk.

Thanks,
- Tom


[-- Attachment #2: 0001-Rename-vect_no_int_max-to-vect_no_int_min_max.patch --]
[-- Type: text/x-patch, Size: 14470 bytes --]

Rename vect_no_int_max to vect_no_int_min_max

2015-08-23  Tom de Vries  <tom@codesourcery.com>

	* gcc.dg/vect/trapv-vect-reduc-4.c: Use vect_no_int_min_max.
	* gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c: Rename
	vect_no_int_max to vect_no_int_min_max.
	* gcc.dg/vect/costmodel/ppc/costmodel-vect-reduc-1char.c: Same.
	* gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c: Same.
	* gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c: Same.
	* gcc.dg/vect/slp-reduc-4.c: Same.
	* gcc.dg/vect/slp-reduc-5.c: Same.
	* gcc.dg/vect/vect-125.c: Same.
	* gcc.dg/vect/vect-13.c: Same.
	* gcc.dg/vect/vect-double-reduc-3.c: Same.
	* gcc.dg/vect/vect-reduc-1.c: Same.
	* gcc.dg/vect/vect-reduc-1char-big-array.c: Same.
	* gcc.dg/vect/vect-reduc-1char.c:Same.
	* gcc.dg/vect/vect-reduc-1short.c: Same.
	* gcc.dg/vect/vect-reduc-2.c: Same.
	* gcc.dg/vect/wrapv-vect-reduc-2char.c: Same.
	* gcc.dg/vect/wrapv-vect-reduc-2short.c: Same.
	* lib/target-supports.exp: Same.

	* doc/sourcebuild.texi: Rename vect_no_int_max with
	vect_no_int_min_max.  Update description.
---
 gcc/doc/sourcebuild.texi                                 |  4 ++--
 .../vect/costmodel/i386/costmodel-vect-reduc-1char.c     |  2 +-
 .../vect/costmodel/ppc/costmodel-vect-reduc-1char.c      |  2 +-
 .../vect/costmodel/x86_64/costmodel-vect-reduc-1char.c   |  2 +-
 .../gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c       |  4 ++--
 gcc/testsuite/gcc.dg/vect/slp-reduc-4.c                  |  4 ++--
 gcc/testsuite/gcc.dg/vect/slp-reduc-5.c                  |  4 ++--
 gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c           |  2 +-
 gcc/testsuite/gcc.dg/vect/vect-125.c                     |  2 +-
 gcc/testsuite/gcc.dg/vect/vect-13.c                      |  2 +-
 gcc/testsuite/gcc.dg/vect/vect-double-reduc-3.c          |  2 +-
 gcc/testsuite/gcc.dg/vect/vect-reduc-1.c                 |  2 +-
 gcc/testsuite/gcc.dg/vect/vect-reduc-1char-big-array.c   |  2 +-
 gcc/testsuite/gcc.dg/vect/vect-reduc-1char.c             |  2 +-
 gcc/testsuite/gcc.dg/vect/vect-reduc-1short.c            |  2 +-
 gcc/testsuite/gcc.dg/vect/vect-reduc-2.c                 |  2 +-
 gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2char.c       |  2 +-
 gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2short.c      |  2 +-
 gcc/testsuite/lib/target-supports.exp                    | 16 ++++++++--------
 19 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index d339d1e..7aa9c9d 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1366,8 +1366,8 @@ Target supports a vector misalign access.
 @item vect_no_align
 Target does not support a vector alignment mechanism.
 
-@item vect_no_int_max
-Target does not support a vector max instruction on @code{int}.
+@item vect_no_int_min_max
+Target does not support a vector min and max instruction on @code{int}.
 
 @item vect_no_int_add
 Target does not support a vector add instruction on @code{int}.
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c b/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c
index 29bb6c7..ff955af 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c
@@ -47,5 +47,5 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
 /* { dg-final { scan-tree-dump-times "vectorization not profitable" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-reduc-1char.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-reduc-1char.c
index 318346a..82b614b 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-reduc-1char.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-reduc-1char.c
@@ -46,5 +46,5 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
 /* { dg-final { scan-tree-dump-times "vectorization not profitable" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c
index 29bb6c7..ff955af 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c
@@ -47,5 +47,5 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
 /* { dg-final { scan-tree-dump-times "vectorization not profitable" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c b/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c
index bbaf964..1d67450 100644
--- a/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c
+++ b/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c
@@ -36,6 +36,6 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_max } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_min_max } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-4.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-4.c
index 3572dfc..c41d322 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-4.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-4.c
@@ -56,6 +56,6 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_max } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_min_max } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c
index b1590d8..fc689e4 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c
@@ -42,6 +42,6 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail vect_no_int_max } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail vect_no_int_min_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_min_max } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c b/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
index 8fd353c..f801e76 100644
--- a/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
+++ b/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
@@ -47,4 +47,4 @@ int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "Detected reduction\\." 2 "vect"  } } */
-/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { ! { sparc*-*-* } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { ! vect_no_int_min_max } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-125.c b/gcc/testsuite/gcc.dg/vect/vect-125.c
index 0b3623e..4a3c0dc 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-125.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-125.c
@@ -16,4 +16,4 @@ void train(short *t, short *w, int n, int err)
     }
 }
 
-/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail vect_no_int_min_max } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-13.c b/gcc/testsuite/gcc.dg/vect/vect-13.c
index 752fea8..5d90292 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-13.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-13.c
@@ -38,5 +38,5 @@ int main (void)
   return main1 ();
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-double-reduc-3.c b/gcc/testsuite/gcc.dg/vect/vect-double-reduc-3.c
index f2becfa..3bdf9ef 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-double-reduc-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-double-reduc-3.c
@@ -61,5 +61,5 @@ int main ()
   return 0;
 }
         
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_int_min_max } } } */
       
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-1.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-1.c
index 99abe06..aafa9a2 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-1.c
@@ -52,4 +52,4 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail { vect_no_int_add || vect_no_int_max } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail { vect_no_int_add || vect_no_int_min_max } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-1char-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-1char-big-array.c
index a25b6cb..660e0fd 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-1char-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-1char-big-array.c
@@ -67,4 +67,4 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-1char.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-1char.c
index 644b474..d5c6221 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-1char.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-1char.c
@@ -47,4 +47,4 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-1short.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-1short.c
index 32eb324..8bbc68c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-1short.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-1short.c
@@ -47,4 +47,4 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-2.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-2.c
index 44f0fc7..656e571 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-2.c
@@ -49,4 +49,4 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail { vect_no_int_add || vect_no_int_max } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail { vect_no_int_add || vect_no_int_min_max } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2char.c b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2char.c
index 6b3cd09..556c2a0 100644
--- a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2char.c
+++ b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2char.c
@@ -47,4 +47,4 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2short.c b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2short.c
index 0a4df48..f914217 100644
--- a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2short.c
+++ b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2short.c
@@ -46,4 +46,4 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 91fd35b..b270722 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3719,23 +3719,23 @@ proc check_effective_target_vect_long_long { } {
 #
 # This won't change for different subtargets so cache the result.
 
-proc check_effective_target_vect_no_int_max { } {
-    global et_vect_no_int_max_saved
+proc check_effective_target_vect_no_int_min_max { } {
+    global et_vect_no_int_min_max_saved
 
-    if [info exists et_vect_no_int_max_saved] {
-	verbose "check_effective_target_vect_no_int_max: using cached result" 2
+    if [info exists et_vect_no_int_min_max_saved] {
+	verbose "check_effective_target_vect_no_int_min_max: using cached result" 2
     } else {
-	set et_vect_no_int_max_saved 0
+	set et_vect_no_int_min_max_saved 0
 	if { [istarget sparc*-*-*]
 	     || [istarget spu-*-*]
 	     || [istarget alpha*-*-*]
 	     || ([istarget mips*-*-*]
 		 && [check_effective_target_mips_loongson]) } {
-	    set et_vect_no_int_max_saved 1
+	    set et_vect_no_int_min_max_saved 1
 	}
     }
-    verbose "check_effective_target_vect_no_int_max: returning $et_vect_no_int_max_saved" 2
-    return $et_vect_no_int_max_saved
+    verbose "check_effective_target_vect_no_int_min_max: returning $et_vect_no_int_min_max_saved" 2
+    return $et_vect_no_int_min_max_saved
 }
 
 # Return 1 if the target plus current options does not support a vector
-- 
1.9.1


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

end of thread, other threads:[~2015-08-23  8:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-12  5:57 [committed, testsuite] Fix vect/trapv-vect-reduc-4.c for sparc Tom de Vries
2015-08-12  6:34 ` [RFC] Add check_effective_target_vect_min_max Tom de Vries
2015-08-12  8:51   ` Rainer Orth
2015-08-12  9:15     ` Tom de Vries
2015-08-12  9:18       ` Rainer Orth
2015-08-12 10:06         ` Richard Biener
2015-08-23  9:05           ` [committed] Rename vect_no_int_max to vect_no_int_min_max Tom de Vries

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