From 66ed03f845c35c5b869534036d4dc1332f23452c Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Thu, 3 Aug 2000 07:16:39 +0000 Subject: [PATCH] flow.c (find_auto_inc): Verify that we've got a REG before peeking at its regno. * flow.c (find_auto_inc): Verify that we've got a REG before peeking at its regno. Fail, don't abort if we can't find the increment of the desired register. From-SVN: r35443 --- gcc/ChangeLog | 4 ++++ gcc/flow.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9965f9559b8..2da5c604aa0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ Thu Aug 3 01:05:32 2000 Jeffrey A Law (law@cygnus.com) + * flow.c (find_auto_inc): Verify that we've got a REG before + peeking at its regno. Fail, don't abort if we can't find + the increment of the desired register. + * pa.md (shadd height reduction patterns/splitters): Remove. 2000-08-02 Jim Wilson diff --git a/gcc/flow.c b/gcc/flow.c index 3b5539e8319..0b92d48448c 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -5018,12 +5018,12 @@ find_auto_inc (pbi, x, insn) if (GET_CODE (y) != PLUS) return; - if (REGNO (XEXP (y, 0)) == REGNO (addr)) + if (REG_P (XEXP (y, 0)) && REGNO (XEXP (y, 0)) == REGNO (addr)) inc_val = XEXP (y, 1); - else if (REGNO (XEXP (y, 1)) == REGNO (addr)) + else if (REG_P (XEXP (y, 1)) && REGNO (XEXP (y, 1)) == REGNO (addr)) inc_val = XEXP (y, 0); else - abort (); + return; if (GET_CODE (inc_val) == CONST_INT) { -- 2.30.2