From 0757d3660c1c5a63d1e8fbc1350c3ba0bcbf9fdb Mon Sep 17 00:00:00 2001 From: Kewen Lin Date: Fri, 17 Jul 2020 00:31:03 -0500 Subject: [PATCH] rs6000/test: Add -fno-vect-cost-model to conv-vectorize-[12].c In my testing with cost tweaking for vector with length, I found two cases below didn't get the expected output. Since the expected instructions reply on the vectorization occurrence, we don't expect vectorization gets disabled by cost model. To make it not fragile, the fix is to force it without vect cost model. gcc/testsuite/ChangeLog: * gcc.target/powerpc/conv-vectorize-1.c: Add option -fno-vect-cost-model. * gcc.target/powerpc/conv-vectorize-2.c: Likewise. --- gcc/testsuite/gcc.target/powerpc/conv-vectorize-1.c | 2 +- gcc/testsuite/gcc.target/powerpc/conv-vectorize-2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/powerpc/conv-vectorize-1.c b/gcc/testsuite/gcc.target/powerpc/conv-vectorize-1.c index d96db146864..8b8c88befd5 100644 --- a/gcc/testsuite/gcc.target/powerpc/conv-vectorize-1.c +++ b/gcc/testsuite/gcc.target/powerpc/conv-vectorize-1.c @@ -1,5 +1,5 @@ /* { dg-require-effective-target powerpc_vsx_ok } */ -/* { dg-options "-O2 -ftree-vectorize -mvsx" } */ +/* { dg-options "-O2 -ftree-vectorize -mvsx -fno-vect-cost-model" } */ /* Test vectorizer can exploit vector conversion instructions to convert unsigned/signed long long to float. */ diff --git a/gcc/testsuite/gcc.target/powerpc/conv-vectorize-2.c b/gcc/testsuite/gcc.target/powerpc/conv-vectorize-2.c index 5dd5deabdd3..06ae4e2d5ce 100644 --- a/gcc/testsuite/gcc.target/powerpc/conv-vectorize-2.c +++ b/gcc/testsuite/gcc.target/powerpc/conv-vectorize-2.c @@ -1,5 +1,5 @@ /* { dg-require-effective-target powerpc_vsx_ok } */ -/* { dg-options "-O2 -ftree-vectorize -mvsx" } */ +/* { dg-options "-O2 -ftree-vectorize -mvsx -fno-vect-cost-model" } */ /* Test vectorizer can exploit vector conversion instructions to convert float to unsigned/signed long long. */ -- 2.30.2