[PATCH] rs6000: Don't ICE when spilling an MMA accumulator

Segher Boessenkool segher@kernel.crashing.org
Wed Aug 5 23:06:24 GMT 2020


Hi!

On Wed, Aug 05, 2020 at 02:02:36PM -0500, Peter Bergner wrote:
> The following patch fixes one of the bugs discovered in PR96466, namely
> when we spill an accumulator that has a known zero value.  In that case,
> LRA would emit a new (set (reg:PXI ...) 0) insn, but it would not use the
> mma_xxsetaccz pattern to do it.  The solution is to move the xxsetaccz
> instruction into the movpxi pattern and have the xxsetaccz pattern call
> the move pattern.

>    "TARGET_MMA
> -   && ((gpc_reg_operand (operands[0], PXImode)
> -	&& !(CONST_INT_P (operands[1]) && INTVAL (operands[1]) == 0))
> +   && (gpc_reg_operand (operands[0], PXImode)
>         || gpc_reg_operand (operands[1], PXImode))"

Much nicer now :-)

> +  "@
> +   #
> +   #
> +   #
> +   xxsetaccz %A0"
> +  "&& reload_completed
> +   && !(fpr_reg_operand (operands[0], PXImode)
> +	&& CONST_INT_P (operands[1])
> +	&& INTVAL (operands[1]) == 0)"

You can just say

   && reload_completed
   && !(fpr_reg_operand (operands[0], PXImode) && operands[1] == const0_rtx)

afaics?

Okay (for trunk, and later 10) with or without such a change.  Thanks!


Segher


More information about the Gcc-patches mailing list