This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/55152] MAX_EXPR(a,-a) is really ABS_EXPR(a)
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 14 Jul 2013 10:29:19 +0000
- Subject: [Bug middle-end/55152] MAX_EXPR(a,-a) is really ABS_EXPR(a)
- Auto-submitted: auto-generated
- References: <bug-55152-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55152
--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
Created attachment 30502
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30502&action=edit
fold-const.c patch
I've had this patch on my hard drive for a while and it will be better here. It
needs more work. The MAX optimization can probably never be reached from C code
(and the signed overflow warning seems unnecessary in this particular case),
part of the patch should move to gimple I guess, and I shouldn't produce the
non-canonical 0 op X when I could easily use swap_tree_comparison.