gcc/
* optabs.c (expand_vec_cond_expr): Always get sign from type.
* tree.c (wide_int_to_tree): Support negative values for boolean.
(build_nonstandard_boolean_type): Use signed type for booleans.
From-SVN: r230022
+2015-11-09 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ * optabs.c (expand_vec_cond_expr): Always get sign from type.
+ * tree.c (wide_int_to_tree): Support negative values for boolean.
+ (build_nonstandard_boolean_type): Use signed type for booleans.
+
2015-11-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/68248
op0a = TREE_OPERAND (op0, 0);
op0b = TREE_OPERAND (op0, 1);
tcode = TREE_CODE (op0);
- unsignedp = TYPE_UNSIGNED (TREE_TYPE (op0a));
}
else
{
op0a = op0;
op0b = build_zero_cst (TREE_TYPE (op0));
tcode = LT_EXPR;
- unsignedp = false;
}
cmp_op_mode = TYPE_MODE (TREE_TYPE (op0a));
+ unsignedp = TYPE_UNSIGNED (TREE_TYPE (op0a));
gcc_assert (GET_MODE_SIZE (mode) == GET_MODE_SIZE (cmp_op_mode)
case BOOLEAN_TYPE:
/* Cache false or true. */
limit = 2;
- if (hwi < 2)
+ if (IN_RANGE (hwi, 0, 1))
ix = hwi;
break;
type = make_node (BOOLEAN_TYPE);
TYPE_PRECISION (type) = precision;
- fixup_unsigned_type (type);
+ fixup_signed_type (type);
if (precision <= MAX_INT_CACHED_PREC)
nonstandard_boolean_type_cache[precision] = type;