public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101256] [12 Regression] Wrong code with -O3 since r12-1841-g9fe9c45ae33a2df7 Date: Tue, 06 Jul 2021 07:34:20 +0000 [thread overview] Message-ID: <bug-101256-4-obrI704aZR@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101256-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101256 --- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>: https://gcc.gnu.org/g:51abfb6a893c87dbf84a33009b6cd6dbd25d66f1 commit r12-2048-g51abfb6a893c87dbf84a33009b6cd6dbd25d66f1 Author: Andrew Pinski <apinski@marvell.com> Date: Tue Jun 29 14:30:34 2021 -0700 Fix 101256: Wrong code due to range incorrect from PHI-OPT So the problem here is that replace_phi_edge_with_variable will copy range information to a already (not newly) defined ssa name. This causes wrong code later on. This fixes the problem by require the new ssa name to be defined in the same bb as the conditional that is about to be deleted. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. Changes from v1: * this is a simplification of what was trying to be done before. gcc/ChangeLog: PR tree-optimization/101256 * dbgcnt.def (phiopt_edge_range): New counter. * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Check to make sure the new name is defined in the same bb as the conditional before duplicating range info. Also add debug counter. gcc/testsuite/ChangeLog: PR tree-optimization/101256 * g++.dg/torture/pr101256.C: New test.
next prev parent reply other threads:[~2021-07-06 7:34 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-29 11:18 [Bug tree-optimization/101256] New: " marxin at gcc dot gnu.org 2021-06-29 11:18 ` [Bug tree-optimization/101256] " marxin at gcc dot gnu.org 2021-06-29 12:05 ` rguenth at gcc dot gnu.org 2021-06-29 17:28 ` pinskia at gcc dot gnu.org 2021-06-29 20:39 ` pinskia at gcc dot gnu.org 2021-06-30 0:37 ` pinskia at gcc dot gnu.org 2021-07-02 6:56 ` marxin at gcc dot gnu.org 2021-07-02 7:03 ` marxin at gcc dot gnu.org 2021-07-02 20:10 ` pinskia at gcc dot gnu.org 2021-07-06 1:34 ` pinskia at gcc dot gnu.org 2021-07-06 7:34 ` cvs-commit at gcc dot gnu.org [this message] 2021-07-06 7:35 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-101256-4-obrI704aZR@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).