+2014-12-06 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/64183
+ * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
+ shift-expression if it is integer_type_node. Use types_compatible_p.
+
2014-11-29 Jakub Jelinek <jakub@redhat.com>
* c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
type demotion/promotion pass. */
tree *op1_p = &TREE_OPERAND (*expr_p, 1);
if (TREE_CODE (TREE_TYPE (*op1_p)) != VECTOR_TYPE
- && TYPE_MAIN_VARIANT (TREE_TYPE (*op1_p)) != unsigned_type_node)
+ && !types_compatible_p (TYPE_MAIN_VARIANT (TREE_TYPE (*op1_p)),
+ unsigned_type_node)
+ && !types_compatible_p (TYPE_MAIN_VARIANT (TREE_TYPE (*op1_p)),
+ integer_type_node))
*op1_p = convert (unsigned_type_node, *op1_p);
break;
}
+2014-12-06 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/64183
+ * gcc.dg/tree-ssa/pr64183.c: New test.
+
2014-12-06 H.J. Lu <hongjiu.lu@intel.com>
PR target/64200
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-cunroll-details" } */
+
+int bits;
+unsigned int size;
+int max_code;
+
+void
+test ()
+{
+ int code = 0;
+
+ while (code < max_code)
+ code |= ((unsigned int) (size >> (--bits)));
+
+ while (bits < (unsigned int)25)
+ bits += 8;
+}
+
+/* { dg-final { scan-tree-dump "Loop 2 iterates at most 4 times" "cunroll"} } */
+/* { dg-final { cleanup-tree-dump "cunroll" } } */