[Bug tree-optimization/64705] Bad code generation of sieve on x86-64 because of too aggressive IV optimizations

amker at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 23 07:24:00 GMT 2015


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

amker at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-*-*                  |x86_64-*-*, aarch64

--- Comment #3 from amker at gcc dot gnu.org ---
Also it's a target independent issue.
Though IVOPT chooses base+index addressing mode, it needs one more instruction
to calculate the condition.

LLVM's assembly:
.LBB34_7:
    add    x26, x26, #1
    strb     wzr, [x22, x9]
    add     x9, x9, x24
    cmp     x9, x28
    b.le    .LBB34_7

GCC's assembly:
.L71:
    strb    wzr, [x27, x0]
    add    x0, x0, x2
    add    x19, x19, 1
    add    x1, x4, x0
    cmp    x21, x1
    bge    .L71



More information about the Gcc-bugs mailing list