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

--- Comment #3 from N Schaeffer <nathanael.schaeffer at gmail dot com> ---
(In reply to Richard Biener from comment #2)
> With trunk and GCC 10 I see
> 
>         vbroadcastsd    zmm0, QWORD PTR [8+r8*8]
> 
> can you check newer GCC?  GCC 8.4 is out since some time already and I do
> remember some fixes to intrinsics.

I've tested with GCC 9.1 and 10.1 which do not seem affected.
However, it is a very sneaky bug. On the larger original function, the
workaround was to compile with -fno-tree-pre
On the bug demonstrator, the bug shows up already at -O1 and hence
-fno-tree-pre has no effect.
I fear the issue may still be around, waiting for the right conditions to show
up.
So if someone can understand where it comes from in this bug demonstrator with
gcc 8.3.0, it may be possible to ensure it is fixed "forever".

It may also be an issue on particular installations, mixing several compilers,
as godbolt with gcc 8.3 does not produce wrong assembly.
Is there a possibility that a wrong immintrin.h is used ? How can I see what
path is used for a #include ?

Reply via email to