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]: Fix PR 91188, strict_low_part operations do not work


Attached patch fixes several strict_low_part insn patterns to operate
only on register outputs. Also, the patch paves the was for patterns
to handle unmatched registers (once PR82524) is fixed, and allows
patterns to operate on HImode operands.

2019-07-18  Uroš Bizjak  <ubizjak@gmail.com>

    PR target/91188
    * config/i386/i386.md (*addqi_1_slp): Use register_operand predicate
    for operand 0.  Do not use (match_dup) to match operand 1 with
    operand 0.  Add check in insn constraint that either input operand
    matches operand 0.  Use SWI12 mode iterator to also handle
    HImode operands.
    (*and<mode>_1_slp): Ditto.
    (*<code>qi_1_slp): Ditto.
    (*sub<mode>_1_slp): Use register_operand predicate for operand 0.
    Do not use (match_dup) to match operand 1 with operand 0.  Add
    check in insn constraint that operand 1 matches operand 0.
    Use SWI12 mode iterator to also handle HImode operands.
    (*ashl<mode>3_1_slp): Ditto.
    (*<shift_insn><mode>3_1_slp): Ditto.
    (*<rotate_insn><mode>3_1_slp): Ditto.

testsuite/ChangeLog:

2019-07-18  Uroš Bizjak  <ubizjak@gmail.com>

    PR target/91188
    * gcc.target/i386/pr91188-1a.c: New test.
    * gcc.target/i386/pr91188-1b.c: Ditto.
    * gcc.target/i386/pr91188-1c.c: Ditto.
    * gcc.target/i386/pr91188-2a.c: Ditto.
    * gcc.target/i386/pr91188-2b.c: Ditto.
    * gcc.target/i386/pr91188-2c.c: Ditto.

Patch was bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Committed to mainline SVN.

Uros.

Attachment: p.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]