diff options
author | Jakub Jelinek <jakub@redhat.com> | 2015-12-16 09:04:31 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2015-12-16 09:04:31 +0100 |
commit | 8ec0963c81b2023596d1c9913571c2c462f06796 (patch) | |
tree | 648a9056f458a6ed079dbf829e143f96eb75dfb8 /gcc/jump.c | |
parent | 3fddb2efc21a7724a7de2cca9bc277bb2bff473e (diff) | |
download | gcc-8ec0963c81b2023596d1c9913571c2c462f06796.zip gcc-8ec0963c81b2023596d1c9913571c2c462f06796.tar.gz gcc-8ec0963c81b2023596d1c9913571c2c462f06796.tar.bz2 |
re PR rtl-optimization/65980 (-fcompare-debug failure building Linux kernel)
PR rtl-optimization/65980
* jump.c (rtx_renumbered_equal_p) <case LABEL_REF>: Use
next_nonnote_nondebug_insn instead of next_real_insn and
skip over CODE_LABELs too.
* gcc.dg/pr65980.c: New test.
From-SVN: r231672
Diffstat (limited to 'gcc/jump.c')
-rw-r--r-- | gcc/jump.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1802,8 +1802,16 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y) /* Two label-refs are equivalent if they point at labels in the same position in the instruction stream. */ - return (next_real_insn (LABEL_REF_LABEL (x)) - == next_real_insn (LABEL_REF_LABEL (y))); + else + { + rtx_insn *xi = next_nonnote_nondebug_insn (LABEL_REF_LABEL (x)); + rtx_insn *yi = next_nonnote_nondebug_insn (LABEL_REF_LABEL (y)); + while (xi && LABEL_P (xi)) + xi = next_nonnote_nondebug_insn (xi); + while (yi && LABEL_P (yi)) + yi = next_nonnote_nondebug_insn (yi); + return xi == yi; + } case SYMBOL_REF: return XSTR (x, 0) == XSTR (y, 0); |