2008-12-07 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38405
* tree-vrp.c (simplify_truth_ops_using_ranges): Make sure to
not sign-extend truth values.
From-SVN: r142539
+2008-12-07 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/38405
+ * tree-vrp.c (simplify_truth_ops_using_ranges): Make sure to
+ not sign-extend truth values.
+
2008-12-07 Eric Botcazou <ebotcazou@adacore.com>
* tree-sra.c (scalarize_use): Create another temporary with the proper
!useless_type_conversion_p (TREE_TYPE (gimple_assign_lhs (stmt)),
TREE_TYPE (op0));
+ /* Make sure to not sign-extend -1 as a boolean value. */
+ if (need_conversion
+ && !TYPE_UNSIGNED (TREE_TYPE (op0))
+ && TYPE_PRECISION (TREE_TYPE (op0)) == 1)
+ return false;
+
switch (rhs_code)
{
case TRUTH_AND_EXPR: