----- Original Message -----
> On 05/28/14 11:22, Richard Henderson wrote:
> > On 05/28/2014 01:43 AM, Kai Tietz wrote:
> >> +  if (GET_CODE (op) == CONST)
> >> +    op = XEXP (op, 0);
> >> +  return (GET_CODE (op) == SYMBOL_REF || CONSTANT_P (op));
> >
> > Surely all this boils down to just CONSTANT_P (op),
> > without having to look through the CONST at all.
> Something certainly seems odd there.
> 
> Kai, is your intention to detect symbol_ref + const_int?  Isn't the
> canonical form for that:
> 
> (const (plus (symbol_ref) (const_int))?
> 
> It appears to me the code above looks for
> 
> (const (symbol_ref))
> 
> or
> 
> (const (const_int))
> 
> ?!?
> 
> Jeff
> 

Yes, I missed the plus-part.

I am just running bootstrap with regression testing for altering predicate to:

(define_predicate "sibcall_memory_operand"
  (match_operand 0 "memory_operand")
{
  op = XEXP (op, 0);

  if (GET_CODE (op) == CONST)
    op = XEXP (op, 0);
  if (GET_CODE (op) == PLUS && CONSTANT_P (XEXP (op, 0)))
    op = XEXP (op, 1);
  return CONSTANT_P (op);
})

Kai

Reply via email to