PR tree-optimization/79408
commitae034eaad31d83c36adf38cc0f416a3820bd74cd
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Feb 2017 09:21:57 +0000 (8 09:21 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Feb 2017 09:21:57 +0000 (8 09:21 +0000)
treeab1c196bea449e8d75b31dfc1fabc401ae65b2d2
parentf3f409fb63962c5ed1c9502c1b2d5f546660475d
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245273 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr79408.c [new file with mode: 0644]
gcc/tree-vrp.c