aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-08-07 09:36:38 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2024-08-07 09:48:11 -0700
commit2c6174402ea315ecf618cfcba741e8cb18bc5282 (patch)
tree1f55ca1a229f257ab3675d96f18b5b824f884ede /gcc
parentaa689684d2bf58d1b7e7938a1392e7a260276d14 (diff)
downloadgcc-2c6174402ea315ecf618cfcba741e8cb18bc5282.zip
gcc-2c6174402ea315ecf618cfcba741e8cb18bc5282.tar.gz
gcc-2c6174402ea315ecf618cfcba741e8cb18bc5282.tar.bz2
aarch64/testsuite: Add testcases for recently fixed PRs
The commit for PR 116258, added a x86_64 specific testcase, I thought it would be a good idea to add an aarch64 testcase too. And since it also fixed VLA vectors too so add a SVE testcase. Pushed as obvious after a test for aarch64-linux-gnu. PR middle-end/116258 PR middle-end/116259 gcc/testsuite/ChangeLog: * gcc.target/aarch64/pr116258.c: New test. * gcc.target/aarch64/sve/pr116259-1.c: New test. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr116258.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/pr116259-1.c12
2 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/aarch64/pr116258.c b/gcc/testsuite/gcc.target/aarch64/pr116258.c
new file mode 100644
index 0000000..e727ad4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr116258.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#pragma GCC target "+nosve"
+
+#define vect16 __attribute__((vector_size(16)))
+#define h(a) __builtin_assoc_barrier((a))
+
+ vect16 float f( vect16 float x, vect16 float vconstants0)
+{
+ vect16 float t = (x * (vconstants0[0]));
+ return (x + h(t));
+}
+
+/* { dg-final { scan-assembler-times "\\\[0\\\]" 1 } } */
+/* { dg-final { scan-assembler-not "dup\t" } } */
+/* { dg-final { scan-assembler-not "ins\t" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr116259-1.c b/gcc/testsuite/gcc.target/aarch64/sve/pr116259-1.c
new file mode 100644
index 0000000..bb2eed4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pr116259-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* PR middle-end/116259 */
+
+#include <arm_sve.h>
+
+/* PAREN_EXPR lowering for VLA vectors was ICEing.
+ It should not be lowered in a similar way as moves
+ are not lowered. */
+svfloat64_t f(svfloat64_t x)
+{
+ return __builtin_assoc_barrier(x);
+}