aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2019-06-28 08:46:56 +0000
committerJan Beulich <jbeulich@gcc.gnu.org>2019-06-28 08:46:56 +0000
commitc1a106c222804416897c53f3c5dc8f028137151e (patch)
treed3a1783b959c2a730bd4aa6c76316916d3eb4f78 /gcc
parentcd65e2652d2c38eaa63f01ccc3a60bb5225235d2 (diff)
downloadgcc-c1a106c222804416897c53f3c5dc8f028137151e.zip
gcc-c1a106c222804416897c53f3c5dc8f028137151e.tar.gz
gcc-c1a106c222804416897c53f3c5dc8f028137151e.tar.bz2
x86: fix CVT{,T}PD2PI insns
With just an "m" constraint misaligned memory operands won't be forced into a register, and hence cause #GP. So far this was guaranteed only in the case that CVT{,T}PD2DQ were chosen (which looks to be the case on x86-64 only). Switch the second alternative to Bm and also replace nonimmediate_operand by vector_operand. From-SVN: r272780
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/sse.md4
-rw-r--r--gcc/testsuite/ChangeLog4
3 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 898b5a1..35c5163 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2019-06-28 Jan Beulich <jbeulich@suse.com>
+
+ * config/i386/sse.md (sse2_cvtpd2pi, sse2_cvttpd2pi): Use
+ vector_operand plus, on both alternatives, "Bm" constraint.
+
2019-06-28 Dennis Zhang <dennis.zhang@arm.com>
* config/arm/arm.md: Remove redundant constraints from
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 8b4f6c1..1546817 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -5505,7 +5505,7 @@
(define_insn "sse2_cvtpd2pi"
[(set (match_operand:V2SI 0 "register_operand" "=v,?!y")
- (unspec:V2SI [(match_operand:V2DF 1 "nonimmediate_operand" "vBm,xm")]
+ (unspec:V2SI [(match_operand:V2DF 1 "vector_operand" "vBm,xBm")]
UNSPEC_FIX_NOTRUNC))]
"TARGET_SSE2"
"@
@@ -5523,7 +5523,7 @@
(define_insn "sse2_cvttpd2pi"
[(set (match_operand:V2SI 0 "register_operand" "=v,?!y")
- (fix:V2SI (match_operand:V2DF 1 "nonimmediate_operand" "vBm,xm")))]
+ (fix:V2SI (match_operand:V2DF 1 "vector_operand" "vBm,xBm")))]
"TARGET_SSE2"
"@
* return TARGET_AVX ? \"vcvttpd2dq{x}\t{%1, %0|%0, %1}\" : \"cvttpd2dq\t{%1, %0|%0, %1}\";
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ed07047..a1fbb04 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2019-06-28 Jan Beulich <jbeulich@suse.com>
+
+ * gcc.target/i386/cvtpd2pi: New.
+
2019-06-27 Jakub Jelinek <jakub@redhat.com>
PR c++/91024