re PR tree-optimization/79408 (Missed VRP optimization of integer modulo)
authorJakub Jelinek <jakub@redhat.com>
Wed, 8 Feb 2017 09:21:57 +0000 (10:21 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 8 Feb 2017 09:21:57 +0000 (10:21 +0100)
commit74a15d1424da560bb599fe781ccbef070372a477
treeab1c196bea449e8d75b31dfc1fabc401ae65b2d2
parent01726bc97785f6e66d6d882bf2b81077391603c5
re PR tree-optimization/79408 (Missed VRP optimization of integer modulo)

PR tree-optimization/79408
* tree-vrp.c (simplify_div_or_mod_using_ranges): If op1 is not
constant, but SSA_NAME with a known integer range, use the minimum
of that range instead of op1 to determine if modulo can be replaced
with its first operand.

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

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