i386: Generate standard floating point scalar operation patterns
authorH.J. Lu <hongjiu.lu@intel.com>
Thu, 20 Jun 2019 15:30:54 +0000 (15:30 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Thu, 20 Jun 2019 15:30:54 +0000 (08:30 -0700)
commitac173024954b4e620c80ab81715bc5d50907369a
treebec8e48bb11c327ba0ad3b42872bc01161e26d44
parentd1a7d8de4689f32bf39047f3f2797f7c30ce2777
i386: Generate standard floating point scalar operation patterns

Standard floating point scalar operation patterns for combiner, which
preserve the rest of the vector, look like

     (vec_merge:V2DF
       (vec_duplicate:V2DF (reg:DF 87))
       (reg/v:V2DF 85 [ x ])
       (const_int 1 [0x1])]))

and

     (vec_merge:V2DF
       (vec_duplicate:V2DF
         (op:DF (vec_select:DF (reg/v:V2DF 85 [ x ])
                (parallel [ (const_int 0 [0])]))
         (reg:DF 87))
       (reg/v:V2DF 85 [ x ])
       (const_int 1 [0x1])]))

This patch adds and generates such standard floating point scalar
operation patterns for +, -, *, /, > and <.

Tested on x86-64.

gcc/

PR target/54855
* config/i386/i386-expand.c (ix86_expand_vector_set): Generate
standard scalar operation pattern for V2DF.
* config/i386/sse.md (*<sse>_vm<plusminus_insn><mode>3): New.
(*<sse>_vm<multdiv_mnemonic><mode>3): Likewise.
(*ieee_<ieee_maxmin><mode>3): Likewise.
(vec_setv2df_0): Likewise.

gcc/testsuite/

PR target/54855
* gcc.target/i386/pr54855-1.c: New test.
* gcc.target/i386/pr54855-2.c: Likewise.
* gcc.target/i386/pr54855-3.c: Likewise.
* gcc.target/i386/pr54855-4.c: Likewise.
* gcc.target/i386/pr54855-5.c: Likewise.
* gcc.target/i386/pr54855-6.c: Likewise.
* gcc.target/i386/pr54855-7.c: Likewise.
* gcc.target/i386/pr54855-8.c: Likewise.
* gcc.target/i386/pr54855-9.c: Likewise.
* gcc.target/i386/pr54855-10.c: Likewise.

From-SVN: r272511
14 files changed:
gcc/ChangeLog
gcc/config/i386/i386-expand.c
gcc/config/i386/sse.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr54855-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr54855-10.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr54855-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr54855-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr54855-4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr54855-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr54855-6.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr54855-7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr54855-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr54855-9.c [new file with mode: 0644]