[PATCH] Fix powerpc bootstrap when using --enable-checking=rtl

Peter Bergner bergner@vnet.ibm.com
Mon Nov 20 19:00:00 GMT 2006


On Mon, 2006-11-20 at 11:53 -0500, David Edelsohn wrote:
> +      for (i = 0; i < XVECLEN (pat, 0); i++)
> +	if (is_store_insn1 (XVECEXP (pat, 0, i)))
> +	  return XVECEXP (pat, 0, i);
> 
> 	Is it overly wasteful to call is_store_insn1() here?  PAT already
> is known to be a PARALLEL and I don't think one can have recursive
> PARALLELs.  I guess the abstraction isn't horrible.
> 

Ok, I'll remove is_store_insn1() which contains the redundant test, and
use the following instead:

      for (i = 0; i < XVECLEN (pat, 0); i++)
        {
          rtx inner_pat = XVECEXP (pat, 0, i);
          if (GET_CODE (inner_pat) == SET 
              && is_mem_ref (SET_DEST (inner_pat)))
            return inner_pat;
        }


> +    }
> +  /* We shouldn't get here, because we should have either a simple
> +     store insn or a store with update which are covered above.  */
> +  gcc_assert (0);
> 
> 	Should't this be gcc_unreachable()?

Ah yes, that would be better.  I'll make those two changes and retest.
Thanks.

Peter





More information about the Gcc-patches mailing list