summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr44214-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr44214-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr44214-1.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr44214-1.c b/gcc/testsuite/gcc.dg/pr44214-1.c
new file mode 100644
index 00000000000..292ce57c30e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr44214-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -freciprocal-math -fdump-tree-ccp1" } */
+
+typedef double v2df __attribute__ ((vector_size (16)));
+
+void do_div (v2df *a, v2df *b)
+{
+ *a = *b / (v2df) { 2.0, 3.0 };
+}
+
+/* Constant folding should multiply *b by the reciprocals of the
+ vector elements. The fold does not take place for generic
+ vectors until the first CCP pass. The string " * " occurs 3
+ times: one multiply and two indirect parameters. */
+
+/* { dg-final { scan-tree-dump-times " \\\* " 3 "ccp1" } } */
+/* { dg-final { scan-tree-dump-times " / " 0 "ccp1" } } */
+/* { dg-final { cleanup-tree-dump "ccp1" } } */