This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/64454] optimize (x%5)%5
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Jan 2015 20:52:34 +0000
- Subject: [Bug tree-optimization/64454] optimize (x%5)%5
- Auto-submitted: auto-generated
- References: <bug-64454-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64454
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-01-12
Ever confirmed|0 |1
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The reason for tree_int_cst_sgn (vr->min) >= 0 was that I don't want to let 0
through and for negative values, handling those would require computing
absolute value, but as match.pd already folds x % -5 already into x % 5, there
is no need to bother with it, so I'm just trying to play safe.
Anyway, keeping this open, as the (x%y)<y case is not handled yet.