https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115259
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 61054 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61054&action=edit Maybe a testcase I tried this on x86_64 with: -O2 -fdisable-tree-cselim -march=skylake-avx512 -fno-vect-cost-model And it seems to work there. Can someone with access to gcn give this testcase a go and see if it fails for you? It should be the extracted testcase from all_l4.c.