From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11830 invoked by alias); 8 Oct 2013 16:10:12 -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 11782 invoked by uid 48); 8 Oct 2013 16:10:08 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/58542] [4.7/4.8/4.9 Regression] subreg splitting pass mishandles TImode immediates Date: Tue, 08 Oct 2013 16:10: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.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-10/txt/msg00458.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D58542 --- Comment #5 from Uro=C5=A1 Bizjak --- The problem actually starts in expand_atomic_compare_and_swap, in: (gdb) list 7339 create_convert_operand_to (&ops[3], expected, mode, true); 7340 create_convert_operand_to (&ops[4], desired, mode, true); 7341 create_integer_operand (&ops[5], is_weak); 7342 create_integer_operand (&ops[6], succ_model); 7343 create_integer_operand (&ops[7], fail_model); 7344 expand_insn (icode, 8, ops); ops[4] is converted in unsigned mode, so from "desired" operand: (gdb) p debug_rtx (desired) (const_int -1 [0xffffffffffffffff]) we got: (gdb) p ops[4] $45 =3D {type =3D EXPAND_CONVERT_TO, unsigned_p =3D 1, unused =3D 0, mode = =3D TImode, value =3D 0x7fffeffc21e0} (gdb) p debug_rtx (ops[4].value) (const_double -1 [0xffffffffffffffff] 0 [0] 0 [0] 0 [0]) So, it is actually expansion of atomic_compare_and_swap, which doesn't acco= unt for signedness of "desired" operand. Manually changing the argument from "true" to "false" for ops[4] generates correct code. >>From gcc-bugs-return-431315-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 08 16:23:05 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 24222 invoked by alias); 8 Oct 2013 16:23:05 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 24135 invoked by uid 55); 8 Oct 2013 16:23:02 -0000 From: "dehao at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/58619] ICE building in gen_combined_adhoc_loc Date: Tue, 08 Oct 2013 16:23:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: unknown X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: dehao at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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/msg00459.txt.bz2 Content-length: 466 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58619 --- Comment #5 from dehao at gcc dot gnu.org --- Author: dehao Date: Tue Oct 8 16:22:57 2013 New Revision: 203284 URL: http://gcc.gnu.org/viewcvs?rev=203284&root=gcc&view=rev Log: Backport r203269. PR tree-optimization/58619 2013-10-08 Dehao Chen * tree-inline.c (copy_phis_for_bb): Combine location data only if non-null. Modified: branches/google/gcc-4_8/gcc/tree-inline.c