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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-05-16
      Known to fail|                            |12.1.0, 4.8.5, 7.5.0
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
             Target|                            |x86_64-*-*

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed - it's IVOPTs deciding the promotion is beneficial.  It costs both
the original and the final IV set the same and then (likely) breaks the tie on
less IVs being used.

One would need to carefully look at where the cost estimates are off.

With -fno-ivopts we get

.L3:
        movl    %ecx, %esi
        movq    %rdx, %r8
        addl    $1, %ecx
        imulq   %rsi, %r8
        mulq    %rsi
        addq    %r8, %rdx
        cmpl    %edi, %ecx
        jb      .L3

Reply via email to