aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2022-01-13 17:18:59 +0100
committerUros Bizjak <ubizjak@gmail.com>2022-01-13 17:19:55 +0100
commit9d8e27fac3c6426fbfaf30d51cbf2761c5491a6a (patch)
tree25e2d6215c4e2f0f37c8c2fddb8df413ab64f254 /gcc
parentc3782843badbf301da2ed768f5cc13d0e6c453ad (diff)
downloadgcc-9d8e27fac3c6426fbfaf30d51cbf2761c5491a6a.zip
gcc-9d8e27fac3c6426fbfaf30d51cbf2761c5491a6a.tar.gz
gcc-9d8e27fac3c6426fbfaf30d51cbf2761c5491a6a.tar.bz2
ii386: Add 16-bit vector modes to xop_pcmov [PR104003]
2022-01-13 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: PR target/104003 * config/i386/mmx.md (*xop_pcmov_<mode>): Use VI_16_32 mode iterator. gcc/testsuite/ChangeLog: PR target/104003 * g++.target/i386/pr103861-1-sse4.C: New test. * g++.target/i386/pr103861-1-xop.C: Ditto.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/mmx.md10
-rw-r--r--gcc/testsuite/g++.target/i386/pr103861-1-sse4.C5
-rw-r--r--gcc/testsuite/g++.target/i386/pr103861-1-xop.C5
3 files changed, 15 insertions, 5 deletions
diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
index 8a8142c..295a132 100644
--- a/gcc/config/i386/mmx.md
+++ b/gcc/config/i386/mmx.md
@@ -2704,11 +2704,11 @@
[(set_attr "type" "sse4arg")])
(define_insn "*xop_pcmov_<mode>"
- [(set (match_operand:VI_32 0 "register_operand" "=x")
- (if_then_else:VI_32
- (match_operand:VI_32 3 "register_operand" "x")
- (match_operand:VI_32 1 "register_operand" "x")
- (match_operand:VI_32 2 "register_operand" "x")))]
+ [(set (match_operand:VI_16_32 0 "register_operand" "=x")
+ (if_then_else:VI_16_32
+ (match_operand:VI_16_32 3 "register_operand" "x")
+ (match_operand:VI_16_32 1 "register_operand" "x")
+ (match_operand:VI_16_32 2 "register_operand" "x")))]
"TARGET_XOP"
"vpcmov\t{%3, %2, %1, %0|%0, %1, %2, %3}"
[(set_attr "type" "sse4arg")])
diff --git a/gcc/testsuite/g++.target/i386/pr103861-1-sse4.C b/gcc/testsuite/g++.target/i386/pr103861-1-sse4.C
new file mode 100644
index 0000000..a07b3ad
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103861-1-sse4.C
@@ -0,0 +1,5 @@
+/* PR target/103861 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse4" } */
+
+#include "pr103861-1.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103861-1-xop.C b/gcc/testsuite/g++.target/i386/pr103861-1-xop.C
new file mode 100644
index 0000000..d65542d
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103861-1-xop.C
@@ -0,0 +1,5 @@
+/* PR target/103861 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mxop" } */
+
+#include "pr103861-1.C"