aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/blendv-to-pand.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/blendv-to-pand.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/blendv-to-pand.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/blendv-to-pand.c b/gcc/testsuite/gcc.target/i386/blendv-to-pand.c
new file mode 100644
index 0000000..2896a2b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/blendv-to-pand.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=x86-64-v3 -mfpmath=sse" } */
+/* { dg-final { scan-assembler-not "vblendv" } } */
+
+void
+foo (float* a, float* b, float* c, float* __restrict d, int n)
+{
+ for (int i = 0; i != n; i++)
+ {
+ c[i] *= 2.0f;
+ if (a[i] > b[i])
+ d[i] = 0.0f;
+ else
+ d[i] = c[i];
+ }
+}