https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80885
Bug ID: 80885 Summary: Do not use the opaque _mm256_cmp_ps to produce -1 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Target Milestone: --- Target: x86_64-*-* Hello, in avx2intrin.h, I see a lot of __v8sf __src = _mm256_setzero_ps (); __v8sf __mask = _mm256_cmp_ps (__src, __src, _CMP_EQ_OQ); (and variants with double) Where gcc knows nothing about _mm256_cmp_ps and blindly generates the insn. It seems to me that it would be better to use some way to let gcc know the constant (for instance generate it as __v8si then cast), even if in the end it might decide to generate the constant this way. Macros (for the -O0 case) have the rather suspicious (__v4df)_mm256_set1_pd((double)(long long int) -1)