public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5141] Extend vpcmov to handle V8HF/V16HFmode under TARGET_XOP.
@ 2021-11-11 1:26 hongtao Liu
0 siblings, 0 replies; only message in thread
From: hongtao Liu @ 2021-11-11 1:26 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:e166cada0813f8b382bacb7f01e1d8d235bf3b0f
commit r12-5141-ge166cada0813f8b382bacb7f01e1d8d235bf3b0f
Author: liuhongt <hongtao.liu@intel.com>
Date: Wed Nov 10 12:53:43 2021 +0800
Extend vpcmov to handle V8HF/V16HFmode under TARGET_XOP.
gcc/ChangeLog:
PR target/103151
* config/i386/sse.md (V_128_256): Extend to V8HF/V16HF.
(avxsizesuffix): Ditto.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr103151.c: New test.
Diff:
---
gcc/config/i386/sse.md | 8 ++++----
gcc/testsuite/gcc.target/i386/pr103151.c | 18 ++++++++++++++++++
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 190841211a5..b109c2aa8fa 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -304,7 +304,7 @@
;; All 128bit and 256bit vector modes
(define_mode_iterator V_128_256
- [V32QI V16QI V16HI V8HI V8SI V4SI V4DI V2DI V8SF V4SF V4DF V2DF])
+ [V32QI V16QI V16HI V8HI V8SI V4SI V4DI V2DI V16HF V8HF V8SF V4SF V4DF V2DF])
;; All 512bit vector modes
(define_mode_iterator V_512 [V64QI V32HI V16SI V8DI V16SF V8DF])
@@ -905,9 +905,9 @@
[(V64QI "512") (V32HI "512") (V16SI "512") (V8DI "512")
(V32QI "256") (V16HI "256") (V8SI "256") (V4DI "256")
(V16QI "") (V8HI "") (V4SI "") (V2DI "")
- (V16SF "512") (V8DF "512")
- (V8SF "256") (V4DF "256")
- (V4SF "") (V2DF "")])
+ (V32HF "512") (V16SF "512") (V8DF "512")
+ (V16HF "256") (V8SF "256") (V4DF "256")
+ (V8HF "") (V4SF "") (V2DF "")])
;; SSE instruction mode
(define_mode_attr sseinsnmode
diff --git a/gcc/testsuite/gcc.target/i386/pr103151.c b/gcc/testsuite/gcc.target/i386/pr103151.c
new file mode 100644
index 00000000000..d7db255ddcd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr103151.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512fp16 -O1 -mxop" } */
+
+typedef _Float16 v16hf __attribute__((vector_size(32)));
+typedef _Float16 v8hf __attribute__((vector_size(16)));
+v8hf f1() {
+ int i;
+ v8hf z;
+ z[i] = i;
+ return z;
+}
+
+v16hf f2() {
+ int i;
+ v16hf z;
+ z[i] = i;
+ return z;
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-11 1:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 1:26 [gcc r12-5141] Extend vpcmov to handle V8HF/V16HFmode under TARGET_XOP hongtao Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).