This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, i386]: Finish macroization of shift patterns.


Hello!

Attached patch finishes macroization of x86 shift patterns by macroizing ashiftrt and lshiftrt patterns.

The final effect of macroization of x86 shift patterns is in merging of 30 "one_bit" patterns into generic patterns and in removal of 911 lines (4.7%) of code from i386.md.

2010-04-11 Uros Bizjak <ubizjak@gmail.com>

    * config/i386/i386.md (any_shiftrt): New code iterator.
    (shiftrt_insn): New code attribute.
    (shiftrt): Ditto.
    (<shiftrt_insn><mode>3): Macroize expander from ashr<mode>3 and
    lshr<mode>3 using any_shiftrt code iterator.
    (*<shiftrt_insn><mode>3_doubleword): Macroize insn_and_split from
    *ashr<mode>3_doubleword and *lshr<mode>3_doubleword using
    any_shiftrt code iterator.
    (*<shiftrt_insn><mode>3_doubleword peephole2): Macroize peephole2
    pattern from corresponding peephole2 patterns.
    (*<shiftrt_insn><mode>3_1): Macroize insn from *ashr<mode>3_1
    and *lshr<mode>3_1 using any_shiftrt code iterator.
    (*<shiftrt_insn>si3_1_zext): Ditto from *ashrsi3_1_zext
    and *lshrsi3_1_zext.
    (*<shiftrt_insn>qi3_1_slp): Ditto from *ashrqi3_1_slp
    and *lshrqi3_1_slp.
    (*<shiftrt_insn><mode>3_cmp): Ditto from *ashr<mode>3_cmp
    and *lshr<mode>3_cmp.
    (*<shiftrt_insn><mode>3_cmp_zext): Ditto from *ashr<mode>3_cmp_zext
    and *lshr<mode>3_cmp_zext.
    (*<shiftrt_insn><mode>3_cconly): Ditto from *ashr<mode>3_cconly
    and *lshr<mode>3_cconly.

Patch was tested on x86_64-pc-linux-gnu {,-m32}, will be committed to mainline in a couple of hours.

Uros.

Attachment: x86-shift.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]