https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25290
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 40185 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40185&action=edit The start of the patch Note this is just a start of the rewrite. It needs improvement as it started out really part of another patch which added a generic (non-loop based) ifcvt to the tree level. But I wanted to get it recorded somewhere so I don't lose it again. Note the problem I mentioned in comment #8 I don't hit any more.