From 77919e6aff5bfbe4f694dafb168b668740914b16 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 14 Oct 2018 20:39:05 +0000 Subject: [PATCH] i386: Add register source to movddup Add register source to movddup so that IRA will allow register source for *vec_dupv2di when SSE3 is enabled. gcc/ PR target/87599 * config/i386/sse.md (*vec_dupv2di): Add register source to movddup. gcc/testsuite/ PR target/87599 * gcc.target/i386/pr87599.c: New test. From-SVN: r265151 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/sse.md | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr87599.c | 12 ++++++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr87599.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e6c6dbcbcad..8144181a567 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-10-14 H.J. Lu + + PR target/87599 + * config/i386/sse.md (*vec_dupv2di): Add register source to + movddup. + 2018-10-14 H.J. Lu PR target/87572 diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 9fc5819a863..ff9f81535a9 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -17864,7 +17864,7 @@ (define_insn "*vec_dupv2di" [(set (match_operand:V2DI 0 "register_operand" "=x,v,v,x") (vec_duplicate:V2DI - (match_operand:DI 1 "nonimmediate_operand" " 0,Yv,m,0")))] + (match_operand:DI 1 "nonimmediate_operand" " 0,Yv,vm,0")))] "TARGET_SSE" "@ punpcklqdq\t%0, %0 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d8fbbccabe5..8824474e85d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-10-14 H.J. Lu + + PR target/87599 + * gcc.target/i386/pr87599.c: New test. + 2018-10-14 H.J. Lu PR target/87572 diff --git a/gcc/testsuite/gcc.target/i386/pr87599.c b/gcc/testsuite/gcc.target/i386/pr87599.c new file mode 100644 index 00000000000..1e2defde042 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr87599.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-options "-march=corei7 -O2" } */ +/* { dg-final { scan-assembler-times "punpcklqdq\[ \\t\]+%xmm\[0-9\]+,\[ \\t\]+%xmm\[0-9\]+" 1 } } */ + +#include + +__m128i +foo (long long val) +{ + __m128i rval = {val, val}; + return rval; +} -- 2.30.2