From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77786 invoked by alias); 19 Jun 2015 08:26:06 -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 77732 invoked by uid 48); 19 Jun 2015 08:26:02 -0000 From: "ktkachov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/66588] combine should try transforming if_then_else of zero_extends into zero_extend of if_then_else Date: Fri, 19 Jun 2015 08:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: ktkachov at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: 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: 2015-06/txt/msg01710.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D66588 --- Comment #3 from ktkachov at gcc dot gnu.org --- (In reply to Uro=C5=A1 Bizjak from comment #2) > (In reply to Uro=C5=A1 Bizjak from comment #1) > > BTW: x86_64 is missing any form of zero-extended cmove. >=20 > ... please see [1] how x86_64 implements it (*movsicc_noc_zext). >=20 > [1] https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01306.html Thanks. As I mentioned in the original post this approach does work. I was just hoping to argue that combine should automatically try both the (zero_extend (if_then_else a b c)) and (if_then_else a (zero_extend b) (zero_extend c)) In fact, wouldn't transforming: (if_then_else a (zero_extend b) (zero_extend c)) into (zero_extend (if_then_else a b c)) be considered a simplification suitable for simplify-rtx.c ? >>From gcc-bugs-return-489379-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jun 19 08:36:27 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 94352 invoked by alias); 19 Jun 2015 08:36:27 -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 94300 invoked by uid 48); 19 Jun 2015 08:36:23 -0000 From: "mikael at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/66578] [F2008] Invalid free on allocate(...,source=a(:)) in block Date: Fri, 19 Jun 2015 08:36:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mikael at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: vehre at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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: 2015-06/txt/msg01711.txt.bz2 Content-length: 487 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578 --- Comment #10 from Mikael Morin --- (In reply to Thomas Koenig from comment #9) > Unfortunately, this does not appear to fix the bug (at least not completely). > I still get an invalid free. Indeed, unfortunately this: (In reply to Mikael Morin from comment #7) > Don't care about the scalarizer; generate a correct descriptor to begin > with, and the scalarizer will follow (hopefully). is not true.