From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 461EB385DC12; Fri, 17 Apr 2020 14:00:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 461EB385DC12 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587132018; bh=FGH4252j+KRAKARC+cIL526OQQywLXUUD+bVz49F/Xs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=oyHZ9qOn/tw9yKoTxb2gtM40Zj22y3bnPaI+fCs9Tpocw8Hi0yTxsPm44YMot8iSP ZPIANAkIdS5PyAdGoiEZSnwI2jVh9l9aULQam+kMRdf+4TCrvxSPpgwxGzHp6DHvts r4SSNJdplZvAg9LrpJrvvodz++lpwieLP5gxj/Dg= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/93385] [10 Regression] wrong code with u128 modulo at -O2 -fno-dce -fno-ipa-cp -fno-tree-dce Date: Fri, 17 Apr 2020 14:00:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: diagnostic, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jamborm at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2020 14:00:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93385 --- Comment #24 from rguenther at suse dot de --- On April 17, 2020 3:53:07 PM GMT+02:00, "jakub at gcc dot gnu.org" wrote: >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93385 > >--- Comment #23 from Jakub Jelinek --- >Instead of #c11 I meant: >- else if ((is_gimple_assign (stmt) && !gimple_has_volatile_ops >(stmt)) >- || gimple_code (stmt) =3D=3D GIMPLE_PHI) >+ else if (flag_tree_dce >+ && ((is_gimple_assign (stmt) && >!gimple_has_volatile_ops >(stmt)) >+ || gimple_code (stmt) =3D=3D GIMPLE_PHI)) >because the res =3D -1 handling is in the else after this already. > >For what Richi is proposing, I guess one needs to run the analysis >somewhere >(early tree_function_versioning or elsewhere?, note in a hash_set stmts >that >shouldn't be copied, add pointer to that hash_set to copy_body_data and >perhaps >in remap_gimple_stmt if the hash_set pointer is non-NULL, check early >if stmt >is in it and in that case return NULL (like we already return NULL for >debug >stmts if we want to drop them). >Most likely the lhs of such to be removed statements need to be also >added to >id.killed_new_ssa_names (and verify if it works properly). I'd definitely make sure to map supposed to be DCEd defs to error_mark_node= .=20 For the marking one could add id.plf_to_dce and clear/set the plf on the st= mts.=