On 04/23/2017 03:38 PM, Marc Glisse wrote:
Hello,
this patches teaches tree_expr_nonzero_warnv_p to handle SSA_NAME using
range information and known (non-)zero bits, by delegating to
expr_not_equal_to which already knows how to handle all that.
This makes one strict overflow warning disappear. It isn't particularly
surprising, since the new code makes tree_expr_nonzero_warnv_p return
true without warning (we do not remember if the range information was
obtained using strict overflow). In my opinion, improving code
generation is more important than this specific warning.
Since this change effectively introduces a regression and also
adds an xfail for it I would suggest to open a new bug to track
it and reference the bug in the xfail. That way, if/when someone
comes across either in the future, the background will be easier
to find.
Martin
Bootstrap+regtest on powerpc64le-unknown-linux-gnu.
2017-04-24 Marc Glisse <marc.gli...@inria.fr>
gcc/
* fold-const.c (tree_single_nonzero_warnv_p): Handle SSA_NAME.
gcc/testsuite/
* gcc.dg/tree-ssa/cmpmul-1.c: New file.
* gcc.dg/Wstrict-overflow-18.c: Xfail.