re PR tree-optimization/69615 (0 to limit signed range checks don't always use unsign...
authorJakub Jelinek <jakub@redhat.com>
Thu, 7 Jun 2018 07:41:18 +0000 (09:41 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 7 Jun 2018 07:41:18 +0000 (09:41 +0200)
commitca6b7410ddb84f2131a1754981a26238f3a6bf9f
treed71f8f027abe5bec0af61bcbb8445227c585517f
parentb2bf82589273884743923aa780c9479965609070
re PR tree-optimization/69615 (0 to limit signed range checks don't always use unsigned compare)

PR tree-optimization/69615
* tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
of a cast from a same precision integral SSA_NAME in a bb dominated
by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
cast to utype if rhs2 has already a compatible type.

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

From-SVN: r261264
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr69615.c [new file with mode: 0644]
gcc/tree-ssa-reassoc.c