This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/64705] Bad code generation of sieve on x86-64 because of too aggressive IV optimizations
- From: "amker at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Jan 2015 07:24:05 +0000
- Subject: [Bug tree-optimization/64705] Bad code generation of sieve on x86-64 because of too aggressive IV optimizations
- Auto-submitted: auto-generated
- References: <bug-64705-4 at http dot gcc dot gnu dot org/bugzilla/>
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