This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Let tree_single_nonzero_warnv_p use VRP


On Sun, Apr 23, 2017 at 11:38 PM, Marc Glisse <marc.glisse@inria.fr> 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.
>
> Bootstrap+regtest on powerpc64le-unknown-linux-gnu.

Hmm, I think you need to guard this with a INTEGRAL_TYPE_P check
given the comment on tree_single_nonzero_warnv_p also talks about
FP.

Ok wiht that change.

Richard.

> 2017-04-24  Marc Glisse  <marc.glisse@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.
>
> --
> Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]