public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2821] i386: Name V2SF logic insns [PR101812]
@ 2021-08-09 14:39 Uros Bizjak
0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2021-08-09 14:39 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9d2d660aab2f332b1e3f69a2fb3419cf3cc33b47
commit r12-2821-g9d2d660aab2f332b1e3f69a2fb3419cf3cc33b47
Author: Uros Bizjak <ubizjak@gmail.com>
Date: Mon Aug 9 16:38:54 2021 +0200
i386: Name V2SF logic insns [PR101812]
Name V2SF logic insns, so expand_simple_binop works with V2SF modes.
2021-08-09 Uroš Bizjak <ubizjak@gmail.com>
gcc/
PR target/101812
* config/i386/mmx.md (<any_logic:code>v2sf3):
Rename from *mmx_<any_logic:code>v2sf3
gcc/testsuite/
PR target/101812
* gcc.target/i386/pr101812.c: New test.
Diff:
---
gcc/config/i386/mmx.md | 2 +-
gcc/testsuite/gcc.target/i386/pr101812.c | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
index 0984f7cc44d..2d3b63f0834 100644
--- a/gcc/config/i386/mmx.md
+++ b/gcc/config/i386/mmx.md
@@ -952,7 +952,7 @@
(set_attr "prefix" "orig,vex")
(set_attr "mode" "V4SF")])
-(define_insn "*mmx_<code>v2sf3"
+(define_insn "<code>v2sf3"
[(set (match_operand:V2SF 0 "register_operand" "=x,x")
(any_logic:V2SF
(match_operand:V2SF 1 "register_operand" "%0,x")
diff --git a/gcc/testsuite/gcc.target/i386/pr101812.c b/gcc/testsuite/gcc.target/i386/pr101812.c
new file mode 100644
index 00000000000..07e84a37d67
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr101812.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -ftree-loop-vectorize -fvect-cost-model=unlimited" } */
+
+#define LTGT(a, b) (__builtin_islessgreater (a, b) ? a : b)
+void foo (int ilast,float* w, float* w2)
+{
+ int i;
+ for (i = 0; i < ilast; ++i)
+ {
+ w[i] = LTGT (0.0f, w2[i]);
+ }
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-09 14:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09 14:39 [gcc r12-2821] i386: Name V2SF logic insns [PR101812] Uros Bizjak
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).