[Bug c/63663] New: [NEON] wrong value when computing the leading zero of int16x4_t type at O2

spf_zju at 126 dot com gcc-bugzilla@gcc.gnu.org
Tue Oct 28 02:25:00 GMT 2014


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.



More information about the Gcc-bugs mailing list