RFC: PATCH: Add -m8bit-idiv for x86

Uros Bizjak ubizjak@gmail.com
Tue Sep 14 09:07:00 GMT 2010


On Tue, Sep 14, 2010 at 7:05 AM, H.J. Lu <hjl.tools@gmail.com> wrote:

>>> This patch generates 2 idivbs since the optimization is done at RTL
>>> expansion. Is there a way to delay this until later when 2 idivls are
>>> optimized into 1 idivl and before IRA since this optimization needs
>>> a scratch register.
>>
>> Splitter with && can_create_pseudo_p () split constraint will limit
>> splits to pre-regalloc passes, or ...
>
> try_split doesn't allow any insn of the result matches the original pattern
> to avoid infinite loop.

So, switch the places of div and mod RTXes in the parallel and provide
another divl_1 insn pattern that matches this new parallel.

Uros.



More information about the Gcc-patches mailing list