public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/63663] New: [NEON] wrong value  when computing  the leading zero of int16x4_t type  at O2
@ 2014-10-28  2:25 spf_zju at 126 dot com
  2014-10-28 11:34 ` [Bug c/63663] " spf_zju at 126 dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: spf_zju at 126 dot com @ 2014-10-28  2:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63663

            Bug ID: 63663
           Summary: [NEON] wrong value  when computing  the leading zero
                    of int16x4_t type  at O2
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: spf_zju at 126 dot com

the 1.c code is :

#include <arm_neon.h>
#include <stdio.h>
int main()
{
        int16x4_t vector_int16x4;
        int16x4_t vector_res_int16x4;
        vector_int16x4 = vdup_n_s16(0);
        vector_res_int16x4 = vclz_s16(vector_int16x4);
        return vector_res_int16x4[0];
}
compiled with :armeb-linux-gnueabi-gcc -S -O2 -mfloat-abi=softfp -mfpu=neon  
1.c 

the assembly:
main:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 0, uses_anonymous_args = 0
        @ link register save eliminated.
        mov     r0, #32
        bx      lr


the main should return #16,not #32.
this bug appears in the trunk snapshot 20141026.


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

* [Bug c/63663] [NEON] wrong value  when computing  the leading zero of int16x4_t type  at O2
  2014-10-28  2:25 [Bug c/63663] New: [NEON] wrong value when computing the leading zero of int16x4_t type at O2 spf_zju at 126 dot com
@ 2014-10-28 11:34 ` spf_zju at 126 dot com
  2014-10-28 12:51 ` [Bug target/63663] " ramana at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: spf_zju at 126 dot com @ 2014-10-28 11:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63663

--- Comment #1 from wind <spf_zju at 126 dot com> ---
I find this issue is related to the definition of a MACRO.

/* The arm5 clz instruction returns 32.  */
#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE)  ((VALUE) = 32, 1).

I am confused that in the armv7 NEON, the mode is HI ,it is also equal 32. Is
it right ? anyone can give me some explanation .

I should post a patch to fix this bug soon.


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

* [Bug target/63663] [NEON] wrong value  when computing  the leading zero of int16x4_t type  at O2
  2014-10-28  2:25 [Bug c/63663] New: [NEON] wrong value when computing the leading zero of int16x4_t type at O2 spf_zju at 126 dot com
  2014-10-28 11:34 ` [Bug c/63663] " spf_zju at 126 dot com
@ 2014-10-28 12:51 ` ramana at gcc dot gnu.org
  2014-11-26 11:00 ` rearnsha at gcc dot gnu.org
  2014-11-26 11:46 ` rearnsha at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-10-28 12:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63663

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|armeb-linux-gnueabi         |armeb-linux-gnueabi,
                   |                            |arm-none-linux-gnueabihf
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-10-28
                 CC|                            |michael.collison at linaro dot org
                   |                            |, ramana at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Patch being discussed here.

https://gcc.gnu.org/ml/gcc-patches/2014-10/msg00731.html


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

* [Bug target/63663] [NEON] wrong value  when computing  the leading zero of int16x4_t type  at O2
  2014-10-28  2:25 [Bug c/63663] New: [NEON] wrong value when computing the leading zero of int16x4_t type at O2 spf_zju at 126 dot com
  2014-10-28 11:34 ` [Bug c/63663] " spf_zju at 126 dot com
  2014-10-28 12:51 ` [Bug target/63663] " ramana at gcc dot gnu.org
@ 2014-11-26 11:00 ` rearnsha at gcc dot gnu.org
  2014-11-26 11:46 ` rearnsha at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2014-11-26 11:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63663

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

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

--- Comment #3 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Fixed with:

https://gcc.gnu.org/ml/gcc-patches/2014-10/msg02311.html


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

* [Bug target/63663] [NEON] wrong value  when computing  the leading zero of int16x4_t type  at O2
  2014-10-28  2:25 [Bug c/63663] New: [NEON] wrong value when computing the leading zero of int16x4_t type at O2 spf_zju at 126 dot com
                   ` (2 preceding siblings ...)
  2014-11-26 11:00 ` rearnsha at gcc dot gnu.org
@ 2014-11-26 11:46 ` rearnsha at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2014-11-26 11:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63663

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |5.0


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

end of thread, other threads:[~2014-11-26 11:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-28  2:25 [Bug c/63663] New: [NEON] wrong value when computing the leading zero of int16x4_t type at O2 spf_zju at 126 dot com
2014-10-28 11:34 ` [Bug c/63663] " spf_zju at 126 dot com
2014-10-28 12:51 ` [Bug target/63663] " ramana at gcc dot gnu.org
2014-11-26 11:00 ` rearnsha at gcc dot gnu.org
2014-11-26 11:46 ` rearnsha at gcc dot gnu.org

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