https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121218
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> --- Created attachment 61949 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61949&action=edit more reduced and clang-formatted So this is more reduced (instantiation-wise) and clang formatted and thus readable. It has //__asm__ volatile ("# FOO" : : : "memory"); in the place where a memory barrier helps. The bug reproduces with GCC 15.1.1 and -O2 -march=x86-64-v3 -mtune=znver2 -w -fno-tree-loop-vectorize -fdbg-cnt=vect_slp:1-6:12-18 -fno-tree-tail-merge -fno-strict-aliasing