This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, MIPS] Add widening version of scc patterns
Adam Nemet <anemet@caviumnetworks.com> writes:
> Richard Sandiford writes:
>> Adam Nemet <anemet@caviumnetworks.com> writes:
>> > I guess I just go back to that version of the patch and test it.
>>
>> Thanks, sounds like a good plan.
>
> Here it is.
>
> I followed the naming convention from the extension patterns, the first mode
> is the input mode and the second is the output mode.
Yeah, I misremembered the usual order, sorry.
> * config/mips/mips.md (GPR2): New mode iterator.
> (seq): Add comment.
> (*seq_<mode>, *seq_<mode>_mips16, *sne_<mode>, *sgt<u>_<mode>,
> *sgt<u>_<mode>_mips16, *sge<u>_<mode>, *slt<u>_<mode>,
> *slt<u>_<mode>_mips16 *sle<u>_<mode>, *sle<u>_<mode>_mips16):
> Rewrite these to take two modes, the mode of comparison and the
> mode of the destination.
> * config/mips/mips.c (mips_expand_scc): Instead of having
> paradoxical subreg as destination, expand "narrowing" scc if mode
> of comparison is SI and target is requested in DI mode.
> (mips_emit_int_order_test): Update comment. Make mode of
> comparison match CMP0 rather than TARGET. When creating inverse
> target use mode of TARGET.
>
> testsuite/
>
> * gcc.target/mips/scc-2.c: New test.
> * gcc.target/mips/scc-3.c: New test.
> * gcc.target/mips/scc-4.c: New test.
OK, thanks. And thanks for the analysis.
Richard