From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23787 invoked by alias); 28 Oct 2014 01:44:01 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 23760 invoked by uid 48); 28 Oct 2014 01:43:56 -0000 From: "spf_zju at 126 dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/63663] New: [NEON] wrong value when computing the leading zero of int16x4_t type at O2 Date: Tue, 28 Oct 2014 02:25:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: spf_zju at 126 dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg02121.txt.bz2 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 #include 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.