https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65492
--- Comment #8 from Allan Jensen <linux at carewolf dot com> --- You can remove the branches in the inner loop and still reproduce the issue. There were no branches in the original code, I only added them to the reduced case because I was using a smaller lookup table. I appears after removing the branches, the execution time with and without -fno-tree-vectorize on -O3 is the same. So they also cause some issue, but is the main one.