testsuite: Compile slsr-39.c without vectorisation

Message ID mptpmiz4ps0.fsf@arm.com
State Committed
Commit 509cdb441614eab2a0fe90a970a927538b832bcd
Headers
Series testsuite: Compile slsr-39.c without vectorisation |

Commit Message

Richard Sandiford June 23, 2022, 10:50 a.m. UTC
  The fix for PR106019 regressed slsr-39.c for -m32 -march=cascadelake
because we are now able to vectorise the code.  (Whether the code model
should be allowing that is a different question -- the vectorised code
looked worse to me.)

The test runs at -O2 and predates vectorisation being enabled at -O2,
so this patch just adds -fno-tree-vectorize.

Tested on x86_64-linux-gnu.  Perhaps bordering on the obvious,
but just in case: OK to install?

(We do still share the multiplication, it's just that with
vectorisation we share it fewer times.)

Richard


gcc/testsuite/
	* gcc.dg/tree-ssa/slsr-39.c: Force vectorization off.
---
 gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Richard Biener June 23, 2022, 11:42 a.m. UTC | #1
On Thu, Jun 23, 2022 at 12:51 PM Richard Sandiford via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> The fix for PR106019 regressed slsr-39.c for -m32 -march=cascadelake
> because we are now able to vectorise the code.  (Whether the code model
> should be allowing that is a different question -- the vectorised code
> looked worse to me.)
>
> The test runs at -O2 and predates vectorisation being enabled at -O2,
> so this patch just adds -fno-tree-vectorize.
>
> Tested on x86_64-linux-gnu.  Perhaps bordering on the obvious,
> but just in case: OK to install?

OK.

> (We do still share the multiplication, it's just that with
> vectorisation we share it fewer times.)
>
> Richard
>
>
> gcc/testsuite/
>         * gcc.dg/tree-ssa/slsr-39.c: Force vectorization off.
> ---
>  gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c
> index 4a27ede1541..33e34fab7ca 100644
> --- a/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c
> @@ -6,7 +6,7 @@
>      *PINDEX:   C1 + (C2 * C3) + C4  */
>
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -fdump-tree-slsr-details" } */
> +/* { dg-options "-O2 -fno-tree-vectorize -fdump-tree-slsr-details" } */
>
>  typedef int arr_2[50][50];
>
> --
> 2.25.1
>
  

Patch

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c
index 4a27ede1541..33e34fab7ca 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c
@@ -6,7 +6,7 @@ 
     *PINDEX:   C1 + (C2 * C3) + C4  */
 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-slsr-details" } */
+/* { dg-options "-O2 -fno-tree-vectorize -fdump-tree-slsr-details" } */
 
 typedef int arr_2[50][50];