https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107546
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|simd, redundant pcmpeqb and |[10/11/12/13 Regression] |pxor |simd, redundant pcmpeqb and | |pxor Target Milestone|--- |10.5 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- For GNU C++ vectors produced GCC 4.8 until GCC 11 produced: movdqa xmm0, XMMWORD PTR [rdi] pcmpeqd xmm1, xmm1 pcmpgtb xmm0, XMMWORD PTR .LC0[rip] pandn xmm0, xmm1 ret GCC 11+ produces: movdqa xmm0, XMMWORD PTR [rdi] pxor xmm1, xmm1 pcmpgtb xmm0, XMMWORD PTR .LC0[rip] pcmpeqb xmm0, xmm1 ret But the intrinics produced the expected thing until GCC 9. in GCC 8 the intrinsics produces: _3 = VEC_COND_EXPR <_4 < { 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48 }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }>; even. Notice the < vs <= there. I suspect the <= expansion part of the x86_64 backend needs to be fixed up to produce better code. So this is a regression for the intrinsics and marking it as such.