On Thu, May 26, 2016 at 09:50:18PM -0400, Michael Meissner wrote:
> It might be argued that this is a reload bug (since it runs on LRA), but
> sometimes it is simpler to place a simpler work around in the machine 
> dependent
> code.  If the maintainers decide that it should be fixed in reload instead of
> via this patch, that is fine.

It is either a bug in reload or in the rs6000 reload hooks (not because it
works with LRA, but because it crashes in reload ;-) )

I don't think using many lines of extra splitters to work around a missing
reload or two is such a great idea.  Someone needs to look deeper into
the problem, find what the actual problem is.

The splitters also hurt code quality in various cases, e.g. when splatting
the stack pointer (r1) or the hard frame pointer (r31); those work fine
without extra copy first.

> +(define_predicate "virtual_or_frame_reg_operand"
> +  (match_code "reg,subreg")
> +{
> +  HOST_WIDE_INT r;
> +  if (SUBREG_P (op))
> +    op = SUBREG_REG (op);
> +
> +  if (!REG_P (op))
> +    return 0;
> +
> +  r = REGNO (op);
> +  return REGNO_PTR_FRAME_P (r);
> +})

A regno is not a HOST_WIDE_INT but an unsigned int instead.  You can of
course get rid of "r" completely here.


Segher

Reply via email to