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 66560, Fails to generate ADDSUBPS


Hello!

Attached patch introduces combiner splitters to handle every possible
ADDSUB permutation of vec_merge and vec_select/vec_concat operands.
These combiners handle swapped PLUS and MINUS operators, and account
for commutative operands of PLUS RTX. As shown in the attached
testcases, there are quite some ways to create ADDSUB.

2015-06-23  Uros Bizjak  <ubizjak@gmail.com>

    PR target/66560
    * config/i386/predicates.md (addsub_vm_operator): New predicate.
    (addsub_vs_operator): Ditto.
    (addsub_vs_parallel): Ditto.
    * config/i386/sse.md (ssedoublemode): Add V4SF and V2DF modes.
    (avx_addsubv4df3, avx_addsubv8sf3, sse3_addsubv2df3, sse3_addsubv4sf3):
    Put minus RTX before plus and adjust vec_merge selector.
    (*avx_addsubv4df3_1, *avx_addsubv4df3_1s, *sse3_addsubv2df3_1)
    (*sse_addsubv2df3_1s, *avx_addsubv8sf3_1, *avx_addsubv8sf3_1s)
    (*sse3_addsubv4sf3_1, *sse_addsubv4sf3_1s): Remove insn patterns.
    (addsub vec_merge splitters): New combiner splitters.
    (addsub vec_select/vec_concat splitters): Ditto.

testsuite/ChangeLog:

2015-06-23  Uros Bizjak  <ubizjak@gmail.com>

    PR target/66560
    * gcc.target/i386/pr66560-1.c: New test.
    * gcc.target/i386/pr66560-2.c: Ditto.
    * gcc.target/i386/pr66560-3.c: Ditto.
    * gcc.target/i386/pr66560-4.c: Ditto.

Patch was tested on x86_64-linux-gnu {,-m32}.and was 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]