public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-7447] cfgrtl: Fix up -g vs. -g0 code generation -flto differences in fixup_reorder_chain [PR104589]
@ 2022-03-02 9:49 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2022-03-02 9:49 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:2e1b00367abaf8b6dbb47fd8518d9ac69c326a06
commit r12-7447-g2e1b00367abaf8b6dbb47fd8518d9ac69c326a06
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Mar 2 10:48:14 2022 +0100
cfgrtl: Fix up -g vs. -g0 code generation -flto differences in fixup_reorder_chain [PR104589]
This is similar to PR104237 and similarly to that, no testcase included
for the testsuite, as we don't have a framework to compile/link with
-g -flto and -g0 -flto and compare -fdump-final-insns= results from
the lto1 compilations.
With -flto, whether two location_t compare equal or not and just
express the same location is a lottery.
2022-03-02 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/104589
* cfgrtl.cc (fixup_reorder_chain): Use loc_equal instead of direct
INSN_LOCATION comparison with goto_locus.
Diff:
---
gcc/cfgrtl.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/cfgrtl.cc b/gcc/cfgrtl.cc
index 567575176a3..74ea14efc61 100644
--- a/gcc/cfgrtl.cc
+++ b/gcc/cfgrtl.cc
@@ -4090,7 +4090,7 @@ fixup_reorder_chain (void)
&& (!NONDEBUG_INSN_P (insn) || !INSN_HAS_LOCATION (insn)))
insn = PREV_INSN (insn);
if (insn != end
- && INSN_LOCATION (insn) == e->goto_locus)
+ && loc_equal (INSN_LOCATION (insn), e->goto_locus))
continue;
if (simplejump_p (BB_END (e->src))
&& !INSN_HAS_LOCATION (BB_END (e->src)))
@@ -4112,7 +4112,7 @@ fixup_reorder_chain (void)
while (insn != end && !NONDEBUG_INSN_P (insn))
insn = NEXT_INSN (insn);
if (insn != end && INSN_HAS_LOCATION (insn)
- && INSN_LOCATION (insn) == e->goto_locus)
+ && loc_equal (INSN_LOCATION (insn), e->goto_locus))
continue;
}
nb = split_edge (e);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-02 9:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02 9:49 [gcc r12-7447] cfgrtl: Fix up -g vs. -g0 code generation -flto differences in fixup_reorder_chain [PR104589] Jakub Jelinek
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).