This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: insn-attrtab for unsigned comparisons
Jim Wilson <wilson@specifixinc.com> wrote:
>> It seems genattrtab generates the output like
>> "(output_for_exp0 <= (unsigned) output_for_exp1)"
>> for the expression (leu exp0 exp1). If it was
>> "((unsigned) output_for_exp0 <= (unsigned) output_for_exp1)",
>> the above warnings could be avoided. Is it a bad idea?
>
> This looks like a reasonable idea. It looks like the current code emits
> only the second (unsigned) cast because it is trivial to emit it at the
> same time as we emit the comparison operator. But it shouldn't be that
> hard to also emit an unsigned cast before the first operand.
Thanks for your comment. I'll come up with a patch for it.
Regards,
kaz