This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: frv minmax predicate


DJ Delorie <dj@redhat.com> writes:

> The minmax_operator predicate also checks the operands of the operator
> to be appropriate, but the minmax_operator predicate is used for both
> integer and floating point operations.  The predicate, as is, only
> matches the integer operands.
> 
> Taking out the check on XEXP(...) in minmax_operator seems to get
> around the ICE we're seeing, but is this the right thing to do?  Or do
> we need separate predicates for integer vs floating point?

It should be safe to use a single predicate.  And it would also work
to use two predicates.  So it's just a style issue.

You just have to make sure that the predicate only accepts the types
of operands the insn and constraints are prepared to handle.  I would
be a little bit skeptical of removing the gpr_or_int10_operand test,
for example.  But it would be reasonable to check something else for a
floating point mode.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]