https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108401
--- Comment #8 from Hongtao.liu <crazylht at gmail dot com> --- > But, if you're going to improve constant generation, please make it so that > it can recognize not only the particular pattern described in this bug. More > importantly, it should recognize the all-ones case (as a single pcmpeq) as a > starting point. Then it can apply shifts to achieve the final result from > the all-ones vector - shifts of any width, length or direction, including > psrldq/pslldq. This would improve generated code in a wider range of cases. yes, we will try to do that. Generally fold intrinsic into compiler IR helps performance, and for this case we need to optimize codegen for special immediate broadcast(all-ones + shift)