[Bug tree-optimization/79408] Missed VRP optimization of integer modulo
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 8 09:22:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79408
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Feb 8 09:21:57 2017
New Revision: 245273
URL: https://gcc.gnu.org/viewcvs?rev=245273&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr79408.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vrp.c
More information about the Gcc-bugs
mailing list