i386: Generate standard floating point scalar operation patterns

Programming / Compilers / GCC - hjl [138bc75d-0d04-0410-961f-82ee72b054a4] - 20 June 2019 15:30 EDT

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 (*_vm3): New. (*_vm3): Likewise. (*ieee_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.

44a1b3479b5 i386: Generate standard floating point scalar operation patterns
gcc/ChangeLog | 10 ++++
gcc/config/i386/i386-expand.c | 12 ++++
gcc/config/i386/sse.md | 88 ++++++++++++++++++++++++++++++
gcc/testsuite/ChangeLog | 14 +++++
gcc/testsuite/gcc.target/i386/pr54855-1.c | 16 ++++++
gcc/testsuite/gcc.target/i386/pr54855-10.c | 13 +++++
gcc/testsuite/gcc.target/i386/pr54855-2.c | 15 +++++
gcc/testsuite/gcc.target/i386/pr54855-3.c | 14 +++++
gcc/testsuite/gcc.target/i386/pr54855-4.c | 14 +++++
gcc/testsuite/gcc.target/i386/pr54855-5.c | 16 ++++++
gcc/testsuite/gcc.target/i386/pr54855-6.c | 14 +++++
gcc/testsuite/gcc.target/i386/pr54855-7.c | 14 +++++
gcc/testsuite/gcc.target/i386/pr54855-8.c | 14 +++++
gcc/testsuite/gcc.target/i386/pr54855-9.c | 14 +++++
14 files changed, 268 insertions(+)

Upstream: gcc.gnu.org


  • Share