[Bug tree-optimization/81661] [7/8 Regression] ICE in gimplify_modify_expr, at gimplify.c:5638

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Oct 28 11:45:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81661

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #5)
> One possibility is instead of using
> 
>  may_be_zero ? 0 : niter
> 
> as niter for code-generation use
> 
>  (may_be_zero ? 0 : 1) * niter
> 
> This avoids the gimplification issue.  We assemble this as
> 
>         call    __addvsi3
>         movl    %eax, %esi
>         subl    %ebp, %esi
>         cmpl    %ebp, %eax
>         setge   %al
>         movzbl  %al, %eax
>         imull   %eax, %esi
> 
> so it definitely is ugly (we're lacking any pattern matching on this
> turning it back to a COND_EXPR).

r250377 added a pattern which should have caught that ...


More information about the Gcc-bugs mailing list