On Tue, May 14, 2019 at 6:23 PM Uros Bizjak <ubiz...@gmail.com> wrote: > > Recent work by Richard Sandiford [1] enabled the possibility to > macroize DIVMOD patterns in i386.md. > > 2019-05-14 Uroš Bizjak <ubiz...@gmail.com> > > * config/i386/i386.md (any_div): New code iterator. > (paired_mod): New code attribute. > (sgnprefix): Handle DIV and UDIV RTXes. > (u): Ditto. > (<u>divmod<mode>4): Macroize expander from divmod<mode>4 > and udivmod<mode>4 patterns using any_div code iterator. > (divmod splitters): Macroize splitters using any_div code iterator. > (*udivmodsi4_pow2_zext_1): Use exactl_log2 in insn condition. > (*udivmodsi4_pow2_zext_2): Ditto. > (*<u>divmod<mode>4_noext): Macroize insn from *divmod<mode>4_noext > and *udivmod<mode>4_noext patterns using any_div code iterator. > (*<u>divmod<mode>4_noext_zext_1): Macroize insn from > *divmod<mode>4_noext_zext_1 and *udivmod<mode>4_noext_zext_1 > patterns using any_div code iterator. > (*<u>divmod<mode>4_noext_zext_2): Macroize insn from > *divmod<mode>4_noext_zext_2 and *udivmod<mode>4_noext_zext_2 > patterns using any_div code iterator. > (<u>divmodhiqi3): Macroize insn from divmodhiqi3 and > udivmodhiqi3 patterns using any_extend code iterator. > > The patch also reorders DIVMOD patterns a bit. > > Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. > > Committed to mainline SVN.
I see FAIL: gcc.target/i386/udivmod-1.c execution test on x86_64. > [1] https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00560.html > > Uros.