public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [GCC][PATCH]{AArch64][Testsuite] Fix failing vector_initialization_nostack.c
@ 2017-01-27 10:55 Tamar Christina
  2017-01-27 11:20 ` Ramana Radhakrishnan
  0 siblings, 1 reply; 3+ messages in thread
From: Tamar Christina @ 2017-01-27 10:55 UTC (permalink / raw)
  To: GCC Patches, James Greenhalgh, Richard Earnshaw, Marcus Shawcroft; +Cc: nd

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

Hi all,

This fixes (PR78142) by only creating one vector in the char case.
r241590 is causing more registers to be used and so
the SP registered happens to be picked and used.

This test I believe was checking explicitly that the
SP is not used if not needed. By creating a single vector then less
registers are needed so SP won't be used.

Ran regression tests on aarch64-none-linux-gnu.

Ok for trunk?

Thanks,
Tamar

gcc/testsuite/

2017-01-26  Tamar Christina  <tamar.christina@arm.com>

	PR middle-end/78142
	* gcc.target/aarch64/vector_initialization_nostack.c
	(f12): Use one vector.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vector_initialization_nostack.patch --]
[-- Type: text/x-patch; name="vector_initialization_nostack.patch", Size: 644 bytes --]

diff --git a/gcc/testsuite/gcc.target/aarch64/vector_initialization_nostack.c b/gcc/testsuite/gcc.target/aarch64/vector_initialization_nostack.c
index bbad04d00263b6a91b826b4911af92bdd226c821..bf43f1cd72ec4e636dbd45534c9ab348bee8febc 100644
--- a/gcc/testsuite/gcc.target/aarch64/vector_initialization_nostack.c
+++ b/gcc/testsuite/gcc.target/aarch64/vector_initialization_nostack.c
@@ -38,14 +38,14 @@ f11 (void)
   return sum;
 }
 
-char arr_c[100][100];
+char arr_c[100];
 char
 f12 (void)
 {
   int i;
   char sum = 0;
   for (i = 0; i < 100; i++)
-    sum += arr_c[i][0] * arr_c[0][i];
+    sum += arr_c[i] * arr_c[i];
   return sum;
 }
 

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

end of thread, other threads:[~2017-02-02 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-27 10:55 [GCC][PATCH]{AArch64][Testsuite] Fix failing vector_initialization_nostack.c Tamar Christina
2017-01-27 11:20 ` Ramana Radhakrishnan
2017-02-02 16:25   ` James Greenhalgh

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