From: Daniel Gutson <dgutson@codesourcery.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code (Bugzilla ID 41196)
Date: Fri, 09 Oct 2009 19:09:00 -0000 [thread overview]
Message-ID: <4ACF88C4.2070106@codesourcery.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
Hi,
the attached patch attempts to fix bug 41196 (the attachment here is
the same as the attachment in bugzilla).
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196)
Please refer to comment #3 for the description of the fix and comment #4
for the change log.
Please let me know if OK to commit.
Thanks,
Daniel.
--
Daniel Gutson
CodeSourcery
www.codesourcery.com
[-- Attachment #2: neon.patch --]
[-- Type: text/x-diff, Size: 1888 bytes --]
Index: src/gcc-mainline/gcc/testsuite/gcc.target/arm/neon/vfp-shift-a2t2.c
===================================================================
--- src/gcc-mainline/gcc/testsuite/gcc.target/arm/neon/vfp-shift-a2t2.c (revision 0)
+++ src/gcc-mainline/gcc/testsuite/gcc.target/arm/neon/vfp-shift-a2t2.c (revision 0)
@@ -0,0 +1,27 @@
+/* Check that NEON vector shifts support immediate values == size. /*
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-save-temps -mfpu=neon -mfloat-abi=softfp" } */
+
+#include <arm_neon.h>
+
+uint16x8_t test_vshll_n_u8 (uint8x8_t a)
+{
+ return vshll_n_u8(a, 8);
+}
+
+uint32x4_t test_vshll_n_u16 (uint16x4_t a)
+{
+ return vshll_n_u16(a, 16);
+}
+
+uint64x2_t test_vshll_n_u32 (uint32x2_t a)
+{
+ return vshll_n_u32(a, 32);
+}
+
+/* { dg-final { scan-assembler "vshll\.u16\[ \]+\[qQ\]\[0-9\]+, \[dD\]\[0-9\]+, #\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { scan-assembler "vshll\.u32\[ \]+\[qQ\]\[0-9\]+, \[dD\]\[0-9\]+, #\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { scan-assembler "vshll\.u8\[ \]+\[qQ\]\[0-9\]+, \[dD\]\[0-9\]+, #\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
Index: src/gcc-mainline/gcc/config/arm/neon.md
===================================================================
--- src/gcc-mainline/gcc/config/arm/neon.md (revision 152180)
+++ src/gcc-mainline/gcc/config/arm/neon.md (working copy)
@@ -3655,7 +3655,8 @@ (define_insn "neon_vshll_n<mode>"
UNSPEC_VSHLL_N))]
"TARGET_NEON"
{
- neon_const_bounds (operands[2], 0, neon_element_bits (<MODE>mode));
+ /* The boundaries are: 0 < imm <= size. */
+ neon_const_bounds (operands[2], 0, neon_element_bits (<MODE>mode) + 1);
return "vshll.%T3%#<V_sz_elem>\t%q0, %P1, %2";
}
[(set_attr "neon_type" "neon_shift_1")]
next reply other threads:[~2009-10-09 19:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-09 19:09 Daniel Gutson [this message]
2009-10-14 13:32 ` Richard Earnshaw
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ACF88C4.2070106@codesourcery.com \
--to=dgutson@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).