https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101621
--- Comment #3 from YumeYao <yumeyao at gmail dot com> --- (In reply to Andrew Pinski from comment #2) > The cast issue is because in GCC 9, it was not producing PERM at the gimple > level which was fixed correctly in GCC 11. > > clang_shuffle_with_zero can easy be added. Thanks for your insights. Do you have any comment on the optimization flag part (gcc <=8 only needs -O1 to optimize the 'cast' case, but gcc 11 requires -O3)? Is it due to some default optimization options change in -O1 between gcc 8 and 11, or it's something deeper?