+2007-06-08 Uros Bizjak <ubizjak@gmail.com>
+
+ PR tree-optimization/32243
+ * tree-vect-transform.c (vectorizable_type_promotion): Move check
+ for ncopies after ratio check between nunits_out and nunits_in.
+ (vectorizable_type_demotion): Remove single-use variable "scalar_type".
+
2007-06-08 Dorit Nuzman <dorit@il.ibm.com>
PR tree-optimization/32224
+2007-06-08 Uros Bizjak <ubizjak@gmail.com>
+
+ PR tree-optimization/32243
+ * gcc.dg/vect/vect.exp: Add support for -O3 tests. Reset default
+ flags for -Os tests.
+ * gcc.dg/vect/03-vect-pr32243.c: New test.
+
2007-06-08 Dorit Nuzman <dorit@il.ibm.com>
PR tree-optimization/32224
--- /dev/null
+/* { dg-do compile } */
+
+typedef struct __GLcontextRec GLcontext;
+
+struct gl_renderbuffer
+{
+ struct gl_renderbuffer *Wrapped;
+ void (*PutValues) (GLcontext * ctx, struct gl_renderbuffer * rb,
+ int count, const int x[], const int y[],
+ const void *values, const char *mask);
+};
+
+void
+put_mono_values_s8 (GLcontext * ctx, struct gl_renderbuffer *s8rb,
+ int count, const int x[], const int y[],
+ const void *value, const char *mask)
+{
+ struct gl_renderbuffer *dsrb = s8rb->Wrapped;
+ int temp[4096], i;
+ const char val = *((char *) value);
+ for (i = 0; i < count; i++)
+ if (!mask || mask[i])
+ temp[i] = (temp[i] & 0xffffff) | val;
+ dsrb->PutValues (ctx, dsrb, count, x, y, temp, mask);
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
"" $DEFAULT_VECTCFLAGS
# With -Os
+set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
lappend DEFAULT_VECTCFLAGS "-Os"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/Os-vect-*.\[cS\]]] \
"" $DEFAULT_VECTCFLAGS
+# With -O3
+set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
+lappend DEFAULT_VECTCFLAGS "-O3"
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/O3-vect-*.\[cS\]]] \
+ "" $DEFAULT_VECTCFLAGS
+
# Clean up.
set dg-do-what-default ${save-dg-do-what-default}
int j;
tree expr;
tree vectype_in;
- tree scalar_type;
if (!STMT_VINFO_RELEVANT_P (stmt_info))
return false;
nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
scalar_dest = GIMPLE_STMT_OPERAND (stmt, 0);
- scalar_type = TREE_TYPE (scalar_dest);
- vectype_out = get_vectype_for_scalar_type (scalar_type);
+ vectype_out = get_vectype_for_scalar_type (TREE_TYPE (scalar_dest));
nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);
if (nunits_in != nunits_out / 2) /* FORNOW */
return false;
op0 = TREE_OPERAND (operation, 0);
vectype_in = get_vectype_for_scalar_type (TREE_TYPE (op0));
nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
- ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_in;
- gcc_assert (ncopies >= 1);
scalar_dest = GIMPLE_STMT_OPERAND (stmt, 0);
vectype_out = get_vectype_for_scalar_type (TREE_TYPE (scalar_dest));
if (nunits_out != nunits_in / 2) /* FORNOW */
return false;
+ ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_in;
+ gcc_assert (ncopies >= 1);
+
if (! ((INTEGRAL_TYPE_P (TREE_TYPE (scalar_dest))
&& INTEGRAL_TYPE_P (TREE_TYPE (op0)))
|| (SCALAR_FLOAT_TYPE_P (TREE_TYPE (scalar_dest))