From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1314) id 87C923858401; Sun, 19 Dec 2021 07:16:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87C923858401 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Andrew Pinski To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-6061] Improve location for new statements in match-and-simplify phiopt X-Act-Checkin: gcc X-Git-Author: Andrew Pinski X-Git-Refname: refs/heads/trunk X-Git-Oldrev: ca8c0408bef4b07613148c106e957a6ec48eeaf8 X-Git-Newrev: d957d250942b130142c62afa1a67146b655b91d7 Message-Id: <20211219071657.87C923858401@sourceware.org> Date: Sun, 19 Dec 2021 07:16:57 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2021 07:16:57 -0000 https://gcc.gnu.org/g:d957d250942b130142c62afa1a67146b655b91d7 commit r12-6061-gd957d250942b130142c62afa1a67146b655b91d7 Author: Andrew Pinski Date: Sat Dec 18 11:52:37 2021 +0000 Improve location for new statements in match-and-simplify phiopt Before match-and-simplify was used in phiot, the location of the new stamtents were all of that of the conditional, this adds that back as I did not realize gimple_simplify didn't do that for you. OK? Bootstrapped and tested on x86_64 with no regressions. gcc/ChangeLog: * tree-ssa-phiopt.c (gimple_simplify_phiopt): Annotate the new sequence with the location of the conditional statement. Diff: --- gcc/tree-ssa-phiopt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index 3eac9b1ce46..714deab005a 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -900,6 +900,8 @@ gimple_simplify_phiopt (bool early_p, tree type, gimple *comp_stmt, result = maybe_push_res_to_seq (&op, &seq1); if (result) { + if (loc != UNKNOWN_LOCATION) + annotate_all_with_location (seq1, loc); gimple_seq_add_seq_without_update (seq, seq1); return result; } @@ -929,6 +931,8 @@ gimple_simplify_phiopt (bool early_p, tree type, gimple *comp_stmt, result = maybe_push_res_to_seq (&op1, &seq1); if (result) { + if (loc != UNKNOWN_LOCATION) + annotate_all_with_location (seq1, loc); gimple_seq_add_seq_without_update (seq, seq1); return result; }