This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/23295] fold does not simplify -a - (5) to (-5) - a
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Aug 2005 04:44:25 -0000
- Subject: [Bug middle-end/23295] fold does not simplify -a - (5) to (-5) - a
- References: <20050809031223.23295.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-09 04:44 -------
I am going to move this to minor as this could be considered a regression in a way.
It was introduced by:
(fold): Optimize "-A - B" as "-B - A" if overflow wraps around.
But in a way since wrapv is false, that means overflow is undefined and can be either wraps or anything
else.
Maybe Roger can comment on this?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |sayle at gcc dot gnu dot org
Severity|enhancement |minor
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23295