From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24756 invoked by alias); 4 Oct 2013 17:29:37 -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 24721 invoked by uid 48); 4 Oct 2013 17:29:34 -0000 From: "rearnsha at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/54300] [4.7 Regression] Erroneous optimization causes wrong Neon data management Date: Fri, 04 Oct 2013 17:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: major X-Bugzilla-Who: rearnsha at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: component cf_known_to_fail Message-ID: In-Reply-To: References: 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: 2013-10/txt/msg00237.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54300 Richard Earnshaw changed: What |Removed |Added ---------------------------------------------------------------------------- Component|target |rtl-optimization Known to fail| |4.9.0 --- Comment #9 from Richard Earnshaw --- This is regcprop messing up. After the ce3 pass we have: (insn 18 30 73 4 (set (reg:V4HI 54 d19 [orig:113 D.16370 ] [113]) (unspec:V4HI [ (mem:V4HI (reg:SI 14 lr [128]) [0 MEM[(const __builtin_neon_hi[4] *)_21]+0 S8 A16]) ] UNSPEC_VLD1)) /work/rearnsha/scratch/gnu/gcc/trunk/gcc/include/arm_neon.h:8019 1662 {neon_vld1v4hi} (nil)) (insn 73 18 27 4 (parallel [ (set (reg:V4HI 52 d18 [ D.16372 ]) (reg:V4HI 54 d19 [orig:113 D.16370 ] [113])) (set (reg:V4HI 54 d19 [ D.16372+8 ]) (reg:V4HI 52 d18 [orig:120 D.16370 ] [120])) ]) /work/rearnsha/scratch/gnu/gcc/trunk/gcc/include/arm_neon.h:5783 1429 {*neon_vswpv4hi} (expr_list:REG_UNUSED (reg:V4HI 54 d19 [ D.16372+8 ]) (nil))) (insn 27 73 31 4 (set (reg:V4SI 52 d18 [orig:118 D.16373 ] [118]) (unspec:V4SI [ (reg:V4HI 52 d18 [orig:115 D.16372 ] [115]) (const_int 1 [0x1]) ] UNSPEC_VMOVL)) /work/rearnsha/scratch/gnu/gcc/trunk/gcc/include/arm_neon.h:6183 1470 {neon_vmovlv4hi} (nil)) and regcprop substitues d19 for d18 in insn 27, missing the fact that insn 73 is swapping the two values (thus clobbering the old d19 value). Giving: (insn 27 73 31 4 (set (reg:V4SI 52 d18 [orig:118 D.16373 ] [118]) (unspec:V4SI [ (reg:V4HI 54 d19 [orig:115 D.16372 ] [115]) (const_int 1 [0x1]) ] UNSPEC_VMOVL)) /work/rearnsha/scratch/gnu/gcc/trunk/gcc/include/arm_neon.h:6183 1470 {neon_vmovlv4hi} (nil))