+2009-06-28 Uros Bizjak <ubizjak@gmail.com>
+
+ PR tree-optimization/40550
+ * tree-vect-generic.c (expand_vector_operations_1): Compute in
+ vector_compute_type only when the size of vector_compute_type is
+ less than the size of type.
+
2009-06-27 Kai Tietz <kai.tietz@onevision.com>
Merged from trunk rev/148061
+2009-06-28 Uros Bizjak <ubizjak@gmail.com>
+
+ PR tree-optimization/40550
+ * gcc.dg/pr40550.c: New test.
+
2009-06-25 Richard Guenther <rguenther@suse.de>
Backport from mainline
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+
+#ifdef __i386__
+#include "cpuid.h"
+#endif
+
+typedef float v2sf __attribute__ ((vector_size (2 * sizeof(float))));
+
+static void test (void)
+{
+ v2sf a = {1.0, 0.0};
+ v2sf b = {0.0, 1.0};
+ v2sf d;
+ d = a + b;
+}
+
+int main ()
+{
+
+#ifdef __i386__
+ unsigned int eax, ebx, ecx, edx;
+
+ if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
+ return 0;
+
+ if (!(edx & bit_SSE))
+ return 0;
+#endif
+
+ test ();
+
+ return 0;
+}
tree vector_compute_type
= type_for_widest_vector_mode (TYPE_MODE (TREE_TYPE (type)), op,
TYPE_SATURATING (TREE_TYPE (type)));
- if (vector_compute_type != NULL_TREE)
- compute_type = vector_compute_type;
+ if (vector_compute_type != NULL_TREE
+ && (TYPE_VECTOR_SUBPARTS (vector_compute_type)
+ < TYPE_VECTOR_SUBPARTS (compute_type)))
+ compute_type = vector_compute_type;
}
/* If we are breaking a BLKmode vector into smaller pieces,