* tree-vect-analyze.c (vect_determine_vectorization_factor): Add
FLOAT_EXPR to the list of promotion operations.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129549
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-10-22 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/33854
+ * tree-vect-analyze.c (vect_determine_vectorization_factor): Add
+ FLOAT_EXPR to the list of promotion operations.
+
2007-10-22 Rask Ingemann Lambertsen <rask@sygehus.dk>
PR target/29473
+2007-10-22 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/33854
+ * gcc.dg/vect/O1-pr33854.c: New testcase.
+ * gcc.dg/vect/vect.exp: Run tests starting with "O1-" with -O1.
+
2007-10-21 David Edelsohn <edelsohn@gnu.org>
* gcc.dg/unwind-1.c: Disable on AIX.
--- /dev/null
+/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
+/* { dg-do compile } */
+
+extern void *malloc (long unsigned int __size);
+typedef struct VMatrix_ VMatrix;
+struct VMatrix_
+{
+ int dim;
+ int t2;
+};
+void uniform_correlation_matrix (VMatrix * v)
+{
+ double *xbar = ((void *) 0);
+ int m = v->dim;
+ int i;
+ xbar = malloc (m * sizeof *xbar);
+ for (i = 0; i < m; i++)
+ xbar[i] /= m;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
set DEFAULT_VECTCFLAGS ""
# These flags are used for all targets.
-lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize"
+lappend DEFAULT_VECTCFLAGS "-ftree-vectorize"
# If the target system supports vector instructions, the default action
# for a test is 'run', otherwise it's 'compile'. Save current default.
# Initialize `dg'.
dg-init
+global O1_VECTCFLAGS
+set O1_VECTCFLAGS $DEFAULT_VECTCFLAGS
+lappend O1_VECTCFLAGS "-O1"
+lappend O1_VECTCFLAGS "-fdump-tree-vect-details"
+
+lappend DEFAULT_VECTCFLAGS "-O2"
+
# Tests that should be run without generating dump info
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/nodump-*.\[cS\]]] \
"" $DEFAULT_VECTCFLAGS
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/O3-vect-*.\[cS\]]] \
"" $DEFAULT_VECTCFLAGS
+# With -O1
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/O1-*.\[cS\]]] \
+ "" $O1_VECTCFLAGS
+
+
# Clean up.
set dg-do-what-default ${save-dg-do-what-default}
operation = GIMPLE_STMT_OPERAND (stmt, 1);
if (TREE_CODE (operation) == NOP_EXPR
|| TREE_CODE (operation) == CONVERT_EXPR
- || TREE_CODE (operation) == WIDEN_MULT_EXPR)
+ || TREE_CODE (operation) == WIDEN_MULT_EXPR
+ || TREE_CODE (operation) == FLOAT_EXPR)
{
tree rhs_type = TREE_TYPE (TREE_OPERAND (operation, 0));
if (TREE_INT_CST_LOW (TYPE_SIZE_UNIT (rhs_type)) <