public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/41196]  New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code
@ 2009-08-31 12:14 siarhei dot siamashka at gmail dot com
  2009-09-01 11:13 ` [Bug c/41196] " ramana at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: siarhei dot siamashka at gmail dot com @ 2009-08-31 12:14 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]

When using vshll_n_u8 intrinsic, gcc 4.4.1 incorrectly rejects shift operand
having value >= 8, claiming that it is out of range.

When using the following test code
/*************/
#include <arm_neon.h>
uint16x8_t test_vshll_n_u8 (uint8x8_t a)
{
    return vshll_n_u8(a, 8);
}
/*************/



Test with gcc 4.4.1:
# gcc -c -O2 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fomit-frame-pointer
test.c
test.c: In function ‘test_vshll_n_u8’:
test.c:6: error: constant out of range



It used to work fine with cs2007q3:
# gcc -c -O2 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fomit-frame-pointer
test.c
# objdump -d test.o

test.o:     file format elf32-littlearm

Disassembly of section .text:

00000000 <test_vshll_n_u8>:
   0:   ec410b17        vmov    d7, r0, r1
   4:   f3b26307        vshll.i8        q3, d7, #8
   8:   ec510b16        vmov    r0, r1, d6
   c:   ec532b17        vmov    r2, r3, d7
  10:   e12fff1e        bx      lr


-- 
           Summary: The use of ARM NEON vshll_n_u8 intrinsic results in
                    compile error on valid code
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: siarhei dot siamashka at gmail dot com
 GCC build triplet: armv4tl-softfloat-linux-gnueabi
  GCC host triplet: armv4tl-softfloat-linux-gnueabi
GCC target triplet: armv4tl-softfloat-linux-gnueabi


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196


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

* [Bug c/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code
  2009-08-31 12:14 [Bug c/41196] New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code siarhei dot siamashka at gmail dot com
@ 2009-09-01 11:13 ` ramana at gcc dot gnu dot org
  2009-09-04  1:10 ` [Bug target/41196] " dgutson at codesourcery dot com
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-09-01 11:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from ramana at gcc dot gnu dot org  2009-09-01 11:13 -------
Also occurs with trunk.


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-09-01 11:13:16
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196


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

* [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code
  2009-08-31 12:14 [Bug c/41196] New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code siarhei dot siamashka at gmail dot com
  2009-09-01 11:13 ` [Bug c/41196] " ramana at gcc dot gnu dot org
@ 2009-09-04  1:10 ` dgutson at codesourcery dot com
  2009-09-04 19:41 ` dgutson at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dgutson at codesourcery dot com @ 2009-09-04  1:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dgutson at codesourcery dot com  2009-09-04 01:10 -------
I'm working on this now, and will post a fix tomorrow.
Please assign this bug to me, since seems I don't have permissions enough to do
that myself.

Thanks,
  Daniel.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196


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

* [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code
  2009-08-31 12:14 [Bug c/41196] New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code siarhei dot siamashka at gmail dot com
  2009-09-01 11:13 ` [Bug c/41196] " ramana at gcc dot gnu dot org
  2009-09-04  1:10 ` [Bug target/41196] " dgutson at codesourcery dot com
@ 2009-09-04 19:41 ` dgutson at gcc dot gnu dot org
  2009-09-25 21:29 ` dgutson at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dgutson at gcc dot gnu dot org @ 2009-09-04 19:41 UTC (permalink / raw)
  To: gcc-bugs



-- 

dgutson at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|dgutson at codesourcery dot |
                   |com                         |
         AssignedTo|unassigned at gcc dot gnu   |dgutson at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-09-01 11:13:16         |2009-09-04 19:41:04
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196


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

* [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code
  2009-08-31 12:14 [Bug c/41196] New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code siarhei dot siamashka at gmail dot com
                   ` (2 preceding siblings ...)
  2009-09-04 19:41 ` dgutson at gcc dot gnu dot org
@ 2009-09-25 21:29 ` dgutson at gcc dot gnu dot org
  2009-09-25 21:35 ` dgutson at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dgutson at gcc dot gnu dot org @ 2009-09-25 21:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dgutson at gcc dot gnu dot org  2009-09-25 21:28 -------
Created an attachment (id=18651)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18651&action=view)
Proposed fix

The attached patch attempts to solve the issue, by augmenting the range check
in order to match 0 < imm <= size (increasing size in 1).
I checked that the assembler DTRT, so the fix applies to gcc only.

I tested the patch with the gcc test suite plus a test cases I added (included
in the patch).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196


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

* [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code
  2009-08-31 12:14 [Bug c/41196] New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code siarhei dot siamashka at gmail dot com
                   ` (3 preceding siblings ...)
  2009-09-25 21:29 ` dgutson at gcc dot gnu dot org
@ 2009-09-25 21:35 ` dgutson at gcc dot gnu dot org
  2009-10-14 19:20 ` dgutson at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dgutson at gcc dot gnu dot org @ 2009-09-25 21:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dgutson at gcc dot gnu dot org  2009-09-25 21:35 -------
I forgot the ChangeLog:

    gcc/
    * config/arm/neon.md (neon_vshll_n<mode>): Checking Bounds
    fixed.

    gcc/testsuite/
    * gcc.target/arm/neon/vfp-shift-a2t2.c: New test case.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196


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

* [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code
  2009-08-31 12:14 [Bug c/41196] New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code siarhei dot siamashka at gmail dot com
                   ` (4 preceding siblings ...)
  2009-09-25 21:35 ` dgutson at gcc dot gnu dot org
@ 2009-10-14 19:20 ` dgutson at gcc dot gnu dot org
  2009-10-15  8:19 ` [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code [4.4 only] ramana at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dgutson at gcc dot gnu dot org @ 2009-10-14 19:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dgutson at gcc dot gnu dot org  2009-10-14 19:20 -------
Committed since approved in
http://gcc.gnu.org/ml/gcc-patches/2009-10/msg00906.html


-- 

dgutson at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196


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

* [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code [4.4 only]
  2009-08-31 12:14 [Bug c/41196] New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code siarhei dot siamashka at gmail dot com
                   ` (5 preceding siblings ...)
  2009-10-14 19:20 ` dgutson at gcc dot gnu dot org
@ 2009-10-15  8:19 ` ramana at gcc dot gnu dot org
  2009-10-15 12:33 ` dgutson at codesourcery dot com
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-10-15  8:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from ramana at gcc dot gnu dot org  2009-10-15 08:19 -------
(In reply to comment #5)
> Committed since approved in
> http://gcc.gnu.org/ml/gcc-patches/2009-10/msg00906.html

This needs to be backported to 4.4 branch after the 4.4.2 release because the
original bug report came with the 4.4.1 release. 

Daniel - could you take care of doing this once the 4.4 branch is updated ? I'm
reopening this bug as a 4.4 only bug at the minute.


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
            Summary|The use of ARM NEON         |The use of ARM NEON
                   |vshll_n_u8 intrinsic results|vshll_n_u8 intrinsic results
                   |in compile error on valid   |in compile error on valid
                   |code                        |code [4.4 only]


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196


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

* [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code [4.4 only]
  2009-08-31 12:14 [Bug c/41196] New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code siarhei dot siamashka at gmail dot com
                   ` (6 preceding siblings ...)
  2009-10-15  8:19 ` [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code [4.4 only] ramana at gcc dot gnu dot org
@ 2009-10-15 12:33 ` dgutson at codesourcery dot com
  2009-10-15 12:58 ` ramana at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dgutson at codesourcery dot com @ 2009-10-15 12:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dgutson at codesourcery dot com  2009-10-15 12:33 -------
Subject: Re:  The use of ARM NEON vshll_n_u8 intrinsic results
 in compile error on valid code [4.4 only]



ramana at gcc dot gnu dot org wrote:
> ------- Comment #6 from ramana at gcc dot gnu dot org  2009-10-15 08:19 -------
> (In reply to comment #5)
>> Committed since approved in
>> http://gcc.gnu.org/ml/gcc-patches/2009-10/msg00906.html
> 
> This needs to be backported to 4.4 branch after the 4.4.2 release because the
> original bug report came with the 4.4.1 release. 
> 
> Daniel - could you take care of doing this once the 4.4 branch is updated ? I'm
> reopening this bug as a 4.4 only bug at the minute.

Sure, I will.

    Daniel.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196


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

* [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code [4.4 only]
  2009-08-31 12:14 [Bug c/41196] New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code siarhei dot siamashka at gmail dot com
                   ` (7 preceding siblings ...)
  2009-10-15 12:33 ` dgutson at codesourcery dot com
@ 2009-10-15 12:58 ` ramana at gcc dot gnu dot org
  2009-10-19 14:09 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-10-15 12:58 UTC (permalink / raw)
  To: gcc-bugs



-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.4.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196


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

* [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code [4.4 only]
  2009-08-31 12:14 [Bug c/41196] New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code siarhei dot siamashka at gmail dot com
                   ` (8 preceding siblings ...)
  2009-10-15 12:58 ` ramana at gcc dot gnu dot org
@ 2009-10-19 14:09 ` jakub at gcc dot gnu dot org
  2009-12-11 11:54 ` ramana at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-10-19 14:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jakub at gcc dot gnu dot org  2009-10-19 14:08 -------
4.4 branch is again open for bugfixes...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196


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

* [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code [4.4 only]
  2009-08-31 12:14 [Bug c/41196] New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code siarhei dot siamashka at gmail dot com
                   ` (9 preceding siblings ...)
  2009-10-19 14:09 ` jakub at gcc dot gnu dot org
@ 2009-12-11 11:54 ` ramana at gcc dot gnu dot org
  2009-12-11 11:55 ` ramana at gcc dot gnu dot org
  2009-12-21 11:55 ` mikpe at it dot uu dot se
  12 siblings, 0 replies; 14+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-12-11 11:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from ramana at gcc dot gnu dot org  2009-12-11 11:54 -------
Subject: Bug 41196

Author: ramana
Date: Fri Dec 11 11:53:46 2009
New Revision: 155158

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155158
Log:
Fix target/41196

 2009-12-11  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

       PR target/41196
       2009-10-14  Daniel Gutson  <dgutson@codesourcery.com>

       * config/arm/neon.md (neon_vshll_n<mode>): Checking Bounds
       fixed.

 2009-12-11  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

       PR target/41196
       2009-10-14  Daniel Gutson  <dgutson@codesourcery.com>
       * testsuite/gcc.target/arm/neon/vfp-shift-a2t2.c: New test case.

Modified:
    branches/gcc-4_4-branch/gcc/ChangeLog
    branches/gcc-4_4-branch/gcc/config/arm/neon.md
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196


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

* [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code [4.4 only]
  2009-08-31 12:14 [Bug c/41196] New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code siarhei dot siamashka at gmail dot com
                   ` (10 preceding siblings ...)
  2009-12-11 11:54 ` ramana at gcc dot gnu dot org
@ 2009-12-11 11:55 ` ramana at gcc dot gnu dot org
  2009-12-21 11:55 ` mikpe at it dot uu dot se
  12 siblings, 0 replies; 14+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-12-11 11:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from ramana at gcc dot gnu dot org  2009-12-11 11:54 -------
Fixed.


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196


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

* [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code [4.4 only]
  2009-08-31 12:14 [Bug c/41196] New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code siarhei dot siamashka at gmail dot com
                   ` (11 preceding siblings ...)
  2009-12-11 11:55 ` ramana at gcc dot gnu dot org
@ 2009-12-21 11:55 ` mikpe at it dot uu dot se
  12 siblings, 0 replies; 14+ messages in thread
From: mikpe at it dot uu dot se @ 2009-12-21 11:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from mikpe at it dot uu dot se  2009-12-21 11:55 -------
(In reply to comment #10)
> Fixed.

You forgot to add the test case in the 4.4 backport.


-- 

mikpe at it dot uu dot se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu dot se


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41196


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

end of thread, other threads:[~2009-12-21 11:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-31 12:14 [Bug c/41196] New: The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code siarhei dot siamashka at gmail dot com
2009-09-01 11:13 ` [Bug c/41196] " ramana at gcc dot gnu dot org
2009-09-04  1:10 ` [Bug target/41196] " dgutson at codesourcery dot com
2009-09-04 19:41 ` dgutson at gcc dot gnu dot org
2009-09-25 21:29 ` dgutson at gcc dot gnu dot org
2009-09-25 21:35 ` dgutson at gcc dot gnu dot org
2009-10-14 19:20 ` dgutson at gcc dot gnu dot org
2009-10-15  8:19 ` [Bug target/41196] The use of ARM NEON vshll_n_u8 intrinsic results in compile error on valid code [4.4 only] ramana at gcc dot gnu dot org
2009-10-15 12:33 ` dgutson at codesourcery dot com
2009-10-15 12:58 ` ramana at gcc dot gnu dot org
2009-10-19 14:09 ` jakub at gcc dot gnu dot org
2009-12-11 11:54 ` ramana at gcc dot gnu dot org
2009-12-11 11:55 ` ramana at gcc dot gnu dot org
2009-12-21 11:55 ` mikpe at it dot uu dot se

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