]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR tree-optimization/54810 (VRP doesn't handle comparison of narrowing cast like...
authorJakub Jelinek <jakub@redhat.com>
Fri, 5 Oct 2012 09:37:25 +0000 (11:37 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 5 Oct 2012 09:37:25 +0000 (11:37 +0200)
commit440d347233baeb164433435f63fda2093e98cb6a
tree53aad70f269552ef0dbc7184a9b6589dc2ac08d4
parent5e3e4fe8749caf4f90f41910458d094bc4519f69
re PR tree-optimization/54810 (VRP doesn't handle comparison of narrowing cast like comparison of BIT_AND_EXPR)

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.

From-SVN: r192115
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/vrp85.c [new file with mode: 0644]
gcc/tree-vrp.c