public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5137] [COMMITTED] aarch64: [PR103170] Fix aarch64_simd_dup<mode>
@ 2021-11-10 22:07 Andrew Pinski
0 siblings, 0 replies; only message in thread
From: Andrew Pinski @ 2021-11-10 22:07 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:c744ae0897957def0cd798399ef8ed6dc0d23811
commit r12-5137-gc744ae0897957def0cd798399ef8ed6dc0d23811
Author: Andrew Pinski <apinski@marvell.com>
Date: Wed Nov 10 18:37:22 2021 +0000
[COMMITTED] aarch64: [PR103170] Fix aarch64_simd_dup<mode>
The problem here is aarch64_simd_dup<mode> use
the vw iterator rather than vwcore iterator. This causes
problems for the V4SF and V2DF modes. I changed both of
aarch64_simd_dup<mode> patterns to be consistent.
Committed as obvious after a bootstrap/test on aarch64-linux-gnu.
PR target/103170
gcc/ChangeLog:
* config/aarch64/aarch64-simd.md (aarch64_simd_dup<mode>):
Use vwcore iterator for the r constraint output string.
gcc/testsuite/ChangeLog:
* gcc.c-torture/compile/vector-dup-1.c: New test.
Diff:
---
gcc/config/aarch64/aarch64-simd.md | 4 ++--
gcc/testsuite/gcc.c-torture/compile/vector-dup-1.c | 15 +++++++++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
index 54d7ca4ba0a..1020cd9ee64 100644
--- a/gcc/config/aarch64/aarch64-simd.md
+++ b/gcc/config/aarch64/aarch64-simd.md
@@ -69,7 +69,7 @@
"TARGET_SIMD"
"@
dup\\t%0.<Vtype>, %1.<Vetype>[0]
- dup\\t%0.<Vtype>, %<vw>1"
+ dup\\t%0.<Vtype>, %<vwcore>1"
[(set_attr "type" "neon_dup<q>, neon_from_gp<q>")]
)
@@ -80,7 +80,7 @@
"TARGET_SIMD"
"@
dup\\t%0.<Vtype>, %1.<Vetype>[0]
- dup\\t%0.<Vtype>, %<vw>1"
+ dup\\t%0.<Vtype>, %<vwcore>1"
[(set_attr "type" "neon_dup<q>, neon_from_gp<q>")]
)
diff --git a/gcc/testsuite/gcc.c-torture/compile/vector-dup-1.c b/gcc/testsuite/gcc.c-torture/compile/vector-dup-1.c
new file mode 100644
index 00000000000..3475360462b
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/vector-dup-1.c
@@ -0,0 +1,15 @@
+/* { dg-additional-options "-fno-strict-aliasing" } */
+
+
+/* PR target/103170 */
+/* AARCH64 used to ICE on this for a typo in the string template. */
+#define vector __attribute__((vector_size(4*sizeof(float))))
+
+typedef vector float v4sf;
+
+v4sf f(int t)
+{
+ float tt = *(float*)&t;
+ asm("":"+r"(tt));
+ return (v4sf){tt,tt,tt,tt};
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-10 22:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10 22:07 [gcc r12-5137] [COMMITTED] aarch64: [PR103170] Fix aarch64_simd_dup<mode> Andrew Pinski
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).