This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: frv minmax predicate
- From: Ian Lance Taylor <iant at google dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 15 Mar 2007 13:54:38 -0700
- Subject: Re: frv minmax predicate
- References: <200703151929.l2FJTrht029394@greed.delorie.com>
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