From d7ae3739a200ea1c90ca20afbebfc627ee32cf49 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 6 Dec 2016 07:03:04 +0000 Subject: [PATCH] re PR middle-end/78642 (invalid rtl sharing found in the insn) PR middle-end/78642 * emit-rtl.c (verify_rtx_sharing) : Relax condition. (copy_rtx_if_shared_1) : Likewise. (copy_insn_1) : Likewise. From-SVN: r243282 --- gcc/ChangeLog | 7 +++++++ gcc/emit-rtl.c | 15 +++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 672b6040fb5..38e86cfd707 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-12-06 Eric Botcazou + + PR middle-end/78642 + * emit-rtl.c (verify_rtx_sharing) : Relax condition. + (copy_rtx_if_shared_1) : Likewise. + (copy_insn_1) : Likewise. + 2016-12-05 Michael Meissner PR target/78688 diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 46505400723..5201bd0e0ef 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -2718,8 +2718,9 @@ verify_rtx_sharing (rtx orig, rtx insn) /* Share clobbers of hard registers (like cc0), but do not share pseudo reg clobbers or clobbers of hard registers that originated as pseudos. This is needed to allow safe register renaming. */ - if (REG_P (XEXP (x, 0)) && REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER - && ORIGINAL_REGNO (XEXP (x, 0)) == REGNO (XEXP (x, 0))) + if (REG_P (XEXP (x, 0)) + && HARD_REGISTER_NUM_P (REGNO (XEXP (x, 0))) + && HARD_REGISTER_NUM_P (ORIGINAL_REGNO (XEXP (x, 0)))) return; break; @@ -2970,8 +2971,9 @@ repeat: /* Share clobbers of hard registers (like cc0), but do not share pseudo reg clobbers or clobbers of hard registers that originated as pseudos. This is needed to allow safe register renaming. */ - if (REG_P (XEXP (x, 0)) && REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER - && ORIGINAL_REGNO (XEXP (x, 0)) == REGNO (XEXP (x, 0))) + if (REG_P (XEXP (x, 0)) + && HARD_REGISTER_NUM_P (REGNO (XEXP (x, 0))) + && HARD_REGISTER_NUM_P (ORIGINAL_REGNO (XEXP (x, 0)))) return; break; @@ -5521,8 +5523,9 @@ copy_insn_1 (rtx orig) /* Share clobbers of hard registers (like cc0), but do not share pseudo reg clobbers or clobbers of hard registers that originated as pseudos. This is needed to allow safe register renaming. */ - if (REG_P (XEXP (orig, 0)) && REGNO (XEXP (orig, 0)) < FIRST_PSEUDO_REGISTER - && ORIGINAL_REGNO (XEXP (orig, 0)) == REGNO (XEXP (orig, 0))) + if (REG_P (XEXP (orig, 0)) + && HARD_REGISTER_NUM_P (REGNO (XEXP (orig, 0))) + && HARD_REGISTER_NUM_P (ORIGINAL_REGNO (XEXP (orig, 0)))) return orig; break; -- 2.30.2