From patchwork Tue Apr 12 14:14:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 982 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:47:59 -0000 Delivered-To: patches@linaro.org Received: by 10.68.59.138 with SMTP id z10cs185919pbq; Tue, 12 Apr 2011 07:14:32 -0700 (PDT) Received: by 10.227.197.210 with SMTP id el18mr6711183wbb.39.1302617670931; Tue, 12 Apr 2011 07:14:30 -0700 (PDT) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id k6si13109226wbc.123.2011.04.12.07.14.30 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Apr 2011 07:14:30 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of richard.sandiford@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of richard.sandiford@linaro.org) smtp.mail=richard.sandiford@linaro.org Received: by wyb33 with SMTP id 33so6859440wyb.37 for ; Tue, 12 Apr 2011 07:14:30 -0700 (PDT) Received: by 10.227.16.98 with SMTP id n34mr3423595wba.31.1302617670274; Tue, 12 Apr 2011 07:14:30 -0700 (PDT) Received: from richards-thinkpad (gbibp9ph1--blueice2n1.emea.ibm.com [195.212.29.75]) by mx.google.com with ESMTPS id o6sm4064176wbo.54.2011.04.12.07.14.28 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Apr 2011 07:14:29 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, patches@linaro.org, richard.sandiford@linaro.org Cc: patches@linaro.org Subject: [7/9] Testsuite: remove vect_{extract_even_odd,strided}_wide References: Date: Tue, 12 Apr 2011 15:14:27 +0100 In-Reply-To: (Richard Sandiford's message of "Tue, 12 Apr 2011 14:20:54 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 We have separate vect_extract_even_odd and vect_extract_even_odd_wide target selectors, and separate vect_strided and vect_strided_wide selectors. The comment suggests that "wide" is for 32+ bits, but we often use the non-wide forms for 32-bit tests. We also have tests that combine 16-bit and 32-bit strided accesses without checking for both widths. I'm about to split vect_strided into vect_stridedN (for each stride factor N). One option was to preserve the wide distinction and have vect_stridedN_wide as well. However, given the current usage, and given that the two selectors are the same, I think it makes sense to combine them until we know what distinction we need to make. Tested on x86_64-linux-gnu and arm-linux-gnueabi. OK to install? Richard gcc/testsuite/ * lib/target-supports.exp (check_effective_target_vect_extract_even_odd_wide): Delete. (check_effective_target_vect_strided_wide): Likewise. * gcc.dg/vect/O3-pr39675-2.c: Use the non-wide versions instead. * gcc.dg/vect/fast-math-pr35982.c: Likewise. * gcc.dg/vect/fast-math-vect-complex-3.c: Likewise. * gcc.dg/vect/pr37539.c: Likewise. * gcc.dg/vect/slp-11.c: Likewise. * gcc.dg/vect/slp-12a.c: Likewise. * gcc.dg/vect/slp-12b.c: Likewise. * gcc.dg/vect/slp-19.c: Likewise. * gcc.dg/vect/slp-23.c: Likewise. * gcc.dg/vect/vect-1.c: Likewise. * gcc.dg/vect/vect-98.c: Likewise. * gcc.dg/vect/vect-107.c: Likewise. * gcc.dg/vect/vect-strided-float.c: Likewise. Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp 2011-04-12 11:53:54.000000000 +0100 +++ gcc/testsuite/lib/target-supports.exp 2011-04-12 11:55:11.000000000 +0100 @@ -3121,29 +3121,6 @@ proc check_effective_target_vect_extract return $et_vect_extract_even_odd_saved } -# Return 1 if the target supports vector even/odd elements extraction of -# vectors with SImode elements or larger, 0 otherwise. - -proc check_effective_target_vect_extract_even_odd_wide { } { - global et_vect_extract_even_odd_wide_saved - - if [info exists et_vect_extract_even_odd_wide_saved] { - verbose "check_effective_target_vect_extract_even_odd_wide: using cached result" 2 - } else { - set et_vect_extract_even_odd_wide_saved 0 - if { [istarget powerpc*-*-*] - || [istarget i?86-*-*] - || [istarget x86_64-*-*] - || [istarget ia64-*-*] - || [istarget spu-*-*] } { - set et_vect_extract_even_odd_wide_saved 1 - } - } - - verbose "check_effective_target_vect_extract_even_wide_odd: returning $et_vect_extract_even_odd_wide_saved" 2 - return $et_vect_extract_even_odd_wide_saved -} - # Return 1 if the target supports vector interleaving, 0 otherwise. proc check_effective_target_vect_interleave { } { @@ -3184,25 +3161,6 @@ proc check_effective_target_vect_strided return $et_vect_strided_saved } -# Return 1 if the target supports vector interleaving and extract even/odd -# for wide element types, 0 otherwise. -proc check_effective_target_vect_strided_wide { } { - global et_vect_strided_wide_saved - - if [info exists et_vect_strided_wide_saved] { - verbose "check_effective_target_vect_strided_wide: using cached result" 2 - } else { - set et_vect_strided_wide_saved 0 - if { [check_effective_target_vect_interleave] - && [check_effective_target_vect_extract_even_odd_wide] } { - set et_vect_strided_wide_saved 1 - } - } - - verbose "check_effective_target_vect_strided_wide: returning $et_vect_strided_wide_saved" 2 - return $et_vect_strided_wide_saved -} - # Return 1 if the target supports section-anchors proc check_effective_target_section_anchors { } { Index: gcc/testsuite/gcc.dg/vect/O3-pr39675-2.c =================================================================== --- gcc/testsuite/gcc.dg/vect/O3-pr39675-2.c 2011-04-12 11:53:54.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/O3-pr39675-2.c 2011-04-12 11:55:11.000000000 +0100 @@ -26,7 +26,7 @@ foo () } } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided_wide } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_strided_wide } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_strided } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/fast-math-pr35982.c =================================================================== --- gcc/testsuite/gcc.dg/vect/fast-math-pr35982.c 2011-04-12 11:53:54.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/fast-math-pr35982.c 2011-04-12 11:55:11.000000000 +0100 @@ -20,7 +20,7 @@ float method2_int16 (struct mem *mem) return avg; } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_extract_even_odd_wide } } } */ -/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { xfail vect_extract_even_odd_wide } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_extract_even_odd } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { xfail vect_extract_even_odd } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/fast-math-vect-complex-3.c =================================================================== --- gcc/testsuite/gcc.dg/vect/fast-math-vect-complex-3.c 2011-04-12 11:53:54.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/fast-math-vect-complex-3.c 2011-04-12 11:55:11.000000000 +0100 @@ -56,5 +56,5 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_interleave && vect_extract_even_odd_wide } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_interleave && vect_extract_even_odd } } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/pr37539.c =================================================================== --- gcc/testsuite/gcc.dg/vect/pr37539.c 2011-04-12 11:53:54.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/pr37539.c 2011-04-12 11:55:11.000000000 +0100 @@ -40,7 +40,7 @@ int main () return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_strided_wide } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_strided } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/slp-11.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-11.c 2011-04-12 11:53:54.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-11.c 2011-04-12 11:55:11.000000000 +0100 @@ -105,9 +105,9 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { target { { vect_uintfloat_cvt && vect_strided_wide } && vect_int_mult } } } } */ -/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { { { ! vect_uintfloat_cvt } && vect_strided_wide } && vect_int_mult } } } } */ -/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" {target { ! { vect_int_mult && vect_strided_wide } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { target { { vect_uintfloat_cvt && vect_strided } && vect_int_mult } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { { { ! vect_uintfloat_cvt } && vect_strided } && vect_int_mult } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" {target { ! { vect_int_mult && vect_strided } } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/slp-12a.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-12a.c 2011-04-12 11:53:54.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-12a.c 2011-04-12 11:55:11.000000000 +0100 @@ -94,11 +94,11 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" {target { vect_strided_wide && vect_int_mult} } } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {target { {! {vect_strided_wide}} && vect_int_mult } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" {target { vect_strided && vect_int_mult} } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {target { {! {vect_strided}} && vect_int_mult } } } } */ /* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" {target { ! vect_int_mult } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" {target { vect_strided_wide && vect_int_mult } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" {target { {! {vect_strided_wide}} && vect_int_mult } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" {target { vect_strided && vect_int_mult } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" {target { {! {vect_strided}} && vect_int_mult } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" {target { ! vect_int_mult } } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/slp-12b.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-12b.c 2011-04-12 11:53:54.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-12b.c 2011-04-12 11:55:11.000000000 +0100 @@ -43,9 +43,9 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {target { vect_strided_wide && vect_int_mult } } } } */ -/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" {target { { ! { vect_int_mult }} || { ! {vect_strided_wide}}} } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" {target { vect_strided_wide && vect_int_mult } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" {target { { ! { vect_int_mult }} || { ! {vect_strided_wide}}} } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {target { vect_strided && vect_int_mult } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" {target { { ! { vect_int_mult }} || { ! {vect_strided}}} } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" {target { vect_strided && vect_int_mult } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" {target { { ! { vect_int_mult }} || { ! {vect_strided}}} } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/slp-19.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-19.c 2011-04-12 11:53:54.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-19.c 2011-04-12 11:55:11.000000000 +0100 @@ -146,9 +146,9 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { target vect_strided_wide } } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! { vect_strided_wide } } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { target vect_strided_wide } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { ! { vect_strided_wide } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { target vect_strided } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! { vect_strided } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { target vect_strided } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { ! { vect_strided } } } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/slp-23.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-23.c 2011-04-12 11:53:54.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/slp-23.c 2011-04-12 11:55:11.000000000 +0100 @@ -106,8 +106,8 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { vect_strided_wide } && {! { vect_no_align} } } } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! { vect_strided_wide || vect_no_align} } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { vect_strided } && {! { vect_no_align} } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! { vect_strided || vect_no_align} } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-1.c 2011-04-12 11:53:54.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-1.c 2011-04-12 11:55:11.000000000 +0100 @@ -85,6 +85,6 @@ foo (int n) fbar (a); } -/* { dg-final { scan-tree-dump-times "vectorized 6 loops" 1 "vect" { target vect_extract_even_odd_wide } } } */ -/* { dg-final { scan-tree-dump-times "vectorized 5 loops" 1 "vect" { xfail vect_extract_even_odd_wide } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 6 loops" 1 "vect" { target vect_extract_even_odd } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 5 loops" 1 "vect" { xfail vect_extract_even_odd } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-98.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-98.c 2011-04-12 11:53:54.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-98.c 2011-04-12 11:55:11.000000000 +0100 @@ -38,6 +38,6 @@ int main (void) } /* Needs interleaving support. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_interleave && vect_extract_even_odd_wide } } } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { xfail { vect_interleave && vect_extract_even_odd_wide } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_interleave && vect_extract_even_odd } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { xfail { vect_interleave && vect_extract_even_odd } } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-107.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-107.c 2011-04-12 11:53:54.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-107.c 2011-04-12 11:55:11.000000000 +0100 @@ -40,6 +40,6 @@ int main (void) return main1 (); } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_extract_even_odd_wide } } } */ -/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { xfail vect_extract_even_odd_wide } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_extract_even_odd } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { xfail vect_extract_even_odd } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-strided-float.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-strided-float.c 2011-04-12 11:53:54.000000000 +0100 +++ gcc/testsuite/gcc.dg/vect/vect-strided-float.c 2011-04-12 11:55:11.000000000 +0100 @@ -39,7 +39,7 @@ int main (void) } /* Needs interleaving support. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_interleave && vect_extract_even_odd_wide } } } } */ -/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { xfail { vect_interleave && vect_extract_even_odd_wide } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_interleave && vect_extract_even_odd } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { xfail { vect_interleave && vect_extract_even_odd } } } } */ /* { dg-final { cleanup-tree-dump "vect" } } */