https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59708
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33912|0 |1 is obsolete| | --- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 33917 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33917&action=edit gcc5-pr59708-wip4.patch Hopefully feature complete version now, have added handling of result types narrower than operand types, handling of different sign multiplications, further optimizations to determine always non-negative or always negative arguments (using cast analysis, VRP saved ranges), minimum precision needed to hold all values of argument, fixed up VRP optimizations of these builtins and added gimple_fold optimization to fold the builtins if the overflow part of the result is never used. Now just need to add lots of further testcases and fix any bugs those could uncover.