This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/77407] Optimize integer i / abs (i) into the sign of i
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Sep 2016 12:28:51 +0000
- Subject: [Bug middle-end/77407] Optimize integer i / abs (i) into the sign of i
- Auto-submitted: auto-generated
- References: <bug-77407-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77407
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Sep 29 12:28:19 2016
New Revision: 240616
URL: https://gcc.gnu.org/viewcvs?rev=240616&root=gcc&view=rev
Log:
2016-09-29 Richard Biener <rguenther@suse.de>
PR middle-end/77407
* match.pd: Add X / abs (X) -> X < 0 ? -1 : 1 and
X / -X -> -1 simplifications.
* gcc.dg/pr77407.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/pr77407.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/match.pd
trunk/gcc/testsuite/ChangeLog