https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81346
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 41707 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41707&action=edit gcc8-pr81346-wip.patch Untested WIP patch. Still no idea how to handle the build_range_check stuff at GIMPLE, that function is pretty huge. Shall I just always generate the cast to utype and (acmp (minus (convert:utype @0) { lo; }) { himinuslo; }) after doing the etype/utype computation and verification in (with {...}) and hope rest of match.pd optimizes that or add matchers for the various optimizations in there?