This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/65709] [5 Regression] Bad code for LZ4 decompression with -O3 on x86_64
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 13 Jul 2015 11:14:05 +0000
- Subject: [Bug tree-optimization/65709] [5 Regression] Bad code for LZ4 decompression with -O3 on x86_64
- Auto-submitted: auto-generated
- References: <bug-65709-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65709
--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I'm saying that if the program does not trigger undefined behavior (e.g. by
accessing misaligned integers without telling the compiler about it (by using
memcpy, or packed attribute or pragma), then it would be a compiler bug to use
an instruction requiring higher alignment than guaranteed in the source,
without ensuring such alignment (through realigning arrays, introducing a loop
for aligning pointers before the vectorized loop, peeling a few iterations
needed to align the pointer(s), or using instructions that don't require such
high alignment).
No testcase has been provided here without having undefined behavior in them
that would show a bug on the compiler side.