This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/54810] VRP doesn't handle comparison of narrowing cast like comparison of BIT_AND_EXPR


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54810

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-05 09:37:32 UTC ---
Author: jakub
Date: Fri Oct  5 09:37:25 2012
New Revision: 192115

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192115
Log:
    PR tree-optimization/54810
    * tree-vrp.c (register_edge_assert_for_2): Handle
    NAME = (unsigned) NAME2; if (NAME cmp CST) for
    narrowing casts to unsigned integral type like
    NAME = NAME2 & CST2; if (NAME cmp CST) where CST2
    is the max value of the unsigned integral type.

    * gcc.dg/tree-ssa/vrp85.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/vrp85.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vrp.c


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