aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-05-03 14:18:57 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-05-03 14:18:57 +0200
commit2fd70ec11c4e3661dc4313729cb1a76b1733e79e (patch)
tree7b970dede7574c7fa2d42cb4ab1e3cdd1bfd528d
parente5705cf736fe692def61c3b37c3a82b013debd30 (diff)
downloadgcc-2fd70ec11c4e3661dc4313729cb1a76b1733e79e.zip
gcc-2fd70ec11c4e3661dc4313729cb1a76b1733e79e.tar.gz
gcc-2fd70ec11c4e3661dc4313729cb1a76b1733e79e.tar.bz2
* config/i386/i386.md (*truncdfsf_mixed, *truncdfsf_i387,
*truncxfsf2_mixed, *truncxfdf2_mixed): Use v constraint instead of x. * gcc.target/i386/avx512f-cvt-1.c: New test. From-SVN: r235819
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.md10
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-cvt-1.c38
4 files changed, 53 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ba7f10d..af475b3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-05-03 Jakub Jelinek <jakub@redhat.com>
+
+ * config/i386/i386.md (*truncdfsf_mixed, *truncdfsf_i387,
+ *truncxfsf2_mixed, *truncxfdf2_mixed): Use v constraint instead
+ of x.
+
2016-05-03 Richard Biener <rguenther@suse.de>
* gimplify.h (get_initialized_tmp_var): Add allow_ssa parameter
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 940dc20..be7cfbf 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -4487,9 +4487,9 @@
(set_attr "mode" "SF")])
(define_insn "*truncdfsf_mixed"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=m,x ,?f,?x,?*r")
+ [(set (match_operand:SF 0 "nonimmediate_operand" "=m,v ,?f,?v,?*r")
(float_truncate:SF
- (match_operand:DF 1 "nonimmediate_operand" "f ,xm,f ,f ,f")))
+ (match_operand:DF 1 "nonimmediate_operand" "f ,vm,f ,f ,f")))
(clobber (match_operand:SF 2 "memory_operand" "=X,X ,m ,m ,m"))]
"TARGET_MIX_SSE_I387"
{
@@ -4511,7 +4511,7 @@
(set_attr "mode" "SF")])
(define_insn "*truncdfsf_i387"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=m,?f,?x,?*r")
+ [(set (match_operand:SF 0 "nonimmediate_operand" "=m,?f,?v,?*r")
(float_truncate:SF
(match_operand:DF 1 "nonimmediate_operand" "f ,f ,f ,f")))
(clobber (match_operand:SF 2 "memory_operand" "=X,m ,m ,m"))]
@@ -4573,7 +4573,7 @@
})
(define_insn "*truncxfsf2_mixed"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=m,?f,?x,?*r")
+ [(set (match_operand:SF 0 "nonimmediate_operand" "=m,?f,?v,?*r")
(float_truncate:SF
(match_operand:XF 1 "register_operand" "f ,f ,f ,f")))
(clobber (match_operand:SF 2 "memory_operand" "=X,m ,m ,m"))]
@@ -4587,7 +4587,7 @@
(set_attr "mode" "SF")])
(define_insn "*truncxfdf2_mixed"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=m,?f,?x,?*r")
+ [(set (match_operand:DF 0 "nonimmediate_operand" "=m,?f,?v,?*r")
(float_truncate:DF
(match_operand:XF 1 "register_operand" "f ,f ,f ,f")))
(clobber (match_operand:DF 2 "memory_operand" "=X,m ,m ,m"))]
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5eadd0c..020312f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2016-05-03 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.target/i386/avx512f-cvt-1.c: New test.
+
2016-05-03 H.J. Lu <hongjiu.lu@intel.com>
* gcc.dg/tree-ssa/ssa-thread-14.c: Replace -fdump-tree-vrp with
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-cvt-1.c b/gcc/testsuite/gcc.target/i386/avx512f-cvt-1.c
new file mode 100644
index 0000000..acfbe31
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-cvt-1.c
@@ -0,0 +1,38 @@
+/* { dg-do assemble { target { avx512f && { ! ia32 } } } } */
+/* { dg-options "-O2 -mavx512f -mfpmath=387,sse" } */
+
+void
+f1 (double *p)
+{
+ register float x __asm ("xmm16");
+ x = *p;
+ __asm volatile ("" : "+v" (x));
+}
+
+void
+f2 (void)
+{
+ double d;
+ register float x __asm ("xmm16");
+ __asm volatile ("" : "=t" (d));
+ x = d;
+ __asm volatile ("" : "+v" (x));
+}
+
+void
+f3 (long double *p)
+{
+ register float x __asm ("xmm16");
+ x = *p;
+ __asm volatile ("" : "+v" (x));
+}
+
+void
+f4 (void)
+{
+ long double d;
+ register float x __asm ("xmm16");
+ __asm volatile ("" : "=t" (d));
+ x = d;
+ __asm volatile ("" : "+v" (x));
+}