This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/55152] MAX_EXPR(a,-a) is really ABS_EXPR(a)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]