On Mon, 3 Apr 2006, Roger Sayle wrote:
On Mon, 3 Apr 2006, Richard Guenther wrote:
|| (TREE_CODE (type) == INTEGER_TYPE
(TREE_CODE (arg1) == INTEGER_CST
|| TYPE_UNSIGNED (type)
|| (flag_wrapv !flag_trapv)))
Does this
negate_expr_p currently contains
switch (TREE_CODE (t))
{
case INTEGER_CST:
if (TYPE_UNSIGNED (type) || ! flag_trapv)
return true;
/* Check that -CST will not overflow type. */
return may_negate_without_overflow_p (t);
where it looks bogus to simply return
On Mon, 3 Apr 2006, Richard Guenther wrote:
negate_expr_p currently contains
...
where it looks bogus to simply return true for signed types but
unset flag_trapv.
...
which is bogus as it should read || (!flag_trapv flag_wrapv) - no?
I hit this with a patch to fold A +- CST to A -+ CST
On Mon, 3 Apr 2006, Roger Sayle wrote:
On Mon, 3 Apr 2006, Richard Guenther wrote:
negate_expr_p currently contains
...
where it looks bogus to simply return true for signed types but
unset flag_trapv.
...
which is bogus as it should read || (!flag_trapv flag_wrapv) - no?
I hit
On Mon, 3 Apr 2006, Richard Guenther wrote:
|| (TREE_CODE (type) == INTEGER_TYPE
(TREE_CODE (arg1) == INTEGER_CST
|| TYPE_UNSIGNED (type)
|| (flag_wrapv !flag_trapv)))
Does this sound reasonable?
Yes, this sounds