From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D5EF338582A1; Tue, 24 Oct 2023 11:17:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5EF338582A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698146266; bh=KLunq8VzajrLubTaWoTLoMHP/89EBhgAgyh+f96m4dw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ry48cSiPJjykf9pKc64DJOBoafdwiRE9+BrjDj8AqHqv/unOKjh7HmuzKfVSTL9hx y0fqhGiUjDYVdEWhhqFW/WQl0iVieA6Nxs6C8jCA2NJyc1559hp92Qu8DRfFNp3lZM 6tt34B7n9OZYTXGrDjZ22qvcrTMnI3wHau8s1Vak= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101541] Missing ABSU detection at gimple Date: Tue, 24 Oct 2023 11:17:45 +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: 12.0 X-Bugzilla-Keywords: missed-optimization, patch X-Bugzilla-Severity: enhancement X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101541 --- Comment #11 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:0fc13e8c0e39c51e82deb93f324d9d86ad8d7460 commit r14-4889-g0fc13e8c0e39c51e82deb93f324d9d86ad8d7460 Author: Andrew Pinski Date: Sun Oct 15 19:15:38 2023 +0000 Improve factor_out_conditional_operation for conversions and constants In the case of a NOP conversion (precisions of the 2 types are equal), factoring out the conversion can be done even if int_fits_type_p returns false and even when the conversion is defined by a statement inside the conditional. Since it is a NOP conversion there is no zero/sign extendi= ng happening which is why it is ok to be done here; we were trying to prev= ent an extra sign/zero extend from being moved away from definition which n= o-op conversions are not. Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: PR tree-optimization/104376 PR tree-optimization/101541 * tree-ssa-phiopt.cc (factor_out_conditional_operation): Allow nop conversions even if it is defined by a statement inside the conditional. gcc/testsuite/ChangeLog: PR tree-optimization/101541 * gcc.dg/tree-ssa/phi-opt-39.c: New test.=