summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-01-28 16:21:45 -0800
committerH.J. Lu <hjl.tools@gmail.com>2016-01-28 16:21:45 -0800
commit334efb984ccd6e71deeb1d3644997c8297d35403 (patch)
tree74be941770b7e20d2fe18e7516628aa9a1370f83
parent3c8e7539c5905bfb2af3a74bbef9a4a5c26eed5d (diff)
downloadgcc-hjl/cvtps2pd.tar.gz
Use vm on %vcvtps2pdhjl/cvtps2pd
-rw-r--r--gcc/config/i386/sse.md2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr69299.c16
2 files changed, 17 insertions, 1 deletions
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 84d2b7af59b..ac96bbf7ba9 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -5464,7 +5464,7 @@
[(set (match_operand:V2DF 0 "register_operand" "=v")
(float_extend:V2DF
(vec_select:V2SF
- (match_operand:V4SF 1 "vector_operand" "vBm")
+ (match_operand:V4SF 1 "vector_operand" "vm")
(parallel [(const_int 0) (const_int 1)]))))]
"TARGET_SSE2 && <mask_avx512vl_condition>"
"%vcvtps2pd\t{%1, %0<mask_operand2>|%0<mask_operand2>, %q1}"
diff --git a/gcc/testsuite/gcc.target/i386/pr69299.c b/gcc/testsuite/gcc.target/i386/pr69299.c
new file mode 100644
index 00000000000..0d44969f3b9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr69299.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-Ofast -mno-avx -msse2 -mtune=bdver2" } */
+
+float *a, *b;
+int c, d, e, f;
+void
+foo (void)
+{
+ for (; c; c++)
+ a[c] = 0;
+ if (!d)
+ for (; c < f; c++)
+ b[c] = (double) e / b[c];
+}
+
+/* { dg-final { scan-assembler-not "cvtps2pd\[^\n\r\]*(%xmm|xmm)\[0-9\]+,\[^\n\r\]*(%xmm|xmm)\[0-9\]+" } } */