+2015-06-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/66233
+ * fold-const.c (fold_unary_loc): Don't handle vector types.
+ Simplify.
+ * tree-ssa-forwprop.c (combine_conversions): Likewise.
+
2015-06-16 Richard Biener <rguenther@suse.de>
Revert
(for integers). Avoid this if the final type is a pointer since
then we sometimes need the middle conversion. Likewise if the
final type has a precision not equal to the size of its mode. */
- if (((inter_int && inside_int)
- || (inter_float && inside_float)
- || (inter_vec && inside_vec))
+ if (((inter_int && inside_int) || (inter_float && inside_float))
+ && (final_int || final_float)
&& inter_prec >= inside_prec
- && (inter_float || inter_vec
- || inter_unsignedp == inside_unsignedp)
+ && (inter_float || inter_unsignedp == inside_unsignedp)
&& ! (final_prec != GET_MODE_PRECISION (TYPE_MODE (type))
- && TYPE_MODE (type) == TYPE_MODE (inter_type))
- && ! final_ptr
- && (! final_vec || inter_prec == inside_prec))
+ && TYPE_MODE (type) == TYPE_MODE (inter_type)))
return fold_build1_loc (loc, code, type, TREE_OPERAND (op0, 0));
/* If we have a sign-extension of a zero-extended value, we can
+2015-06-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/66233
+ * gcc.c-torture/execute/pr66233.c: New test.
+
2015-06-12 Jakub Jelinek <jakub@redhat.com>
PR middle-end/63608
--- /dev/null
+/* PR tree-optimization/66233 */
+
+unsigned int v[8];
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ v[i] = (float) i;
+}
+
+int
+main ()
+{
+ unsigned int i;
+ foo ();
+ for (i = 0; i < 8; i++)
+ if (v[i] != i)
+ __builtin_abort ();
+ return 0;
+}
(for integers). Avoid this if the final type is a pointer since
then we sometimes need the middle conversion. Likewise if the
final type has a precision not equal to the size of its mode. */
- if (((inter_int && inside_int)
- || (inter_float && inside_float)
- || (inter_vec && inside_vec))
+ if (((inter_int && inside_int) || (inter_float && inside_float))
+ && (final_int || final_float)
&& inter_prec >= inside_prec
- && (inter_float || inter_vec
- || inter_unsignedp == inside_unsignedp)
+ && (inter_float || inter_unsignedp == inside_unsignedp)
&& ! (final_prec != GET_MODE_PRECISION (TYPE_MODE (type))
- && TYPE_MODE (type) == TYPE_MODE (inter_type))
- && ! final_ptr
- && (! final_vec || inter_prec == inside_prec))
+ && TYPE_MODE (type) == TYPE_MODE (inter_type)))
{
gimple_assign_set_rhs1 (stmt, defop0);
update_stmt (stmt);