diff mbox series

[committed,AArch64] Add -fno-vect-cost-model to sve2/whilerw_1.c

Message ID mpty2w9fn9p.fsf@arm.com
State New
Headers show
Series [committed,AArch64] Add -fno-vect-cost-model to sve2/whilerw_1.c | expand

Commit Message

Richard Sandiford Nov. 21, 2019, 12:05 p.m. UTC
Bumping the cost of vec_to_scalar made the .s loop in
gcc.target/aarch64/sve2/whilerw_1.c use a runtime profitability check,
like the .d version already did.  Since the cost model isn't really
being tested here, the most robust fix seemed to be to disable it,
which I should really have done from the outset.

Tested on aarch64-linux-gnu and applied as r278549.

Richard


2019-11-21  Richard Sandiford  <richard.sandiford@arm.com>

gcc/testsuite/
	* gcc.target/aarch64/sve2/whilerw_1.c: Add -fno-vect-cost-model.
	Require x0 in the .d test too.
diff mbox series

Patch

Index: gcc/testsuite/gcc.target/aarch64/sve2/whilerw_1.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve2/whilerw_1.c	2019-11-18 15:36:04.869884903 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve2/whilerw_1.c	2019-11-21 12:02:54.170171205 +0000
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -ftree-vectorize" } */
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
 /* { dg-require-effective-target lp64 } */
 
 #include <stdint.h>
@@ -26,5 +26,5 @@  TEST_LOOP (int64_t);
 /* { dg-final { scan-assembler-times {\twhilerw\tp[0-9]+\.b, x0, x1\n} 1 } } */
 /* { dg-final { scan-assembler-times {\twhilerw\tp[0-9]+\.h, x0, x1\n} 1 } } */
 /* { dg-final { scan-assembler-times {\twhilerw\tp[0-9]+\.s, x0, x1\n} 1 } } */
-/* { dg-final { scan-assembler-times {\twhilerw\tp[0-9]+\.d, x[0-9]+, x1\n} 1 } } */
+/* { dg-final { scan-assembler-times {\twhilerw\tp[0-9]+\.d, x0, x1\n} 1 } } */
 /* { dg-final { scan-assembler-not {\twhilewr\t} } } */