https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119629
--- Comment #5 from Segher Boessenkool <segher at gcc dot gnu.org> --- (In reply to Peter Bergner from comment #2) > (In reply to Peter Bergner from comment #1) > > > but the conditions that enable the expansion of > > > __builtin_scalar_byte_in_set > > > are those of [power9-64], namely TARGET_MODULE && TARGET_POWERPC64. > > I believe this is a bug and this and the other [power*-64] tests should be > > using TARGET_64BIT instead of TARGET_POWERPC64. > I think this should be the correct fix for this specific bug. This doesn't > fix the powerpc-elf target enabling TARGET_POWERPC64 though, since that is a > separate bug. > > > diff --git a/gcc/config/rs6000/rs6000-builtin.cc > b/gcc/config/rs6000/rs6000-builtin.cc > index 111802381ac..81caf4d0629 100644 > --- a/gcc/config/rs6000/rs6000-builtin.cc > +++ b/gcc/config/rs6000/rs6000-builtin.cc > @@ -159,11 +159,11 @@ rs6000_builtin_is_supported (enum rs6000_gen_builtins > fncode) > case ENB_P6: > return TARGET_CMPB; > case ENB_P6_64: > - return TARGET_CMPB && TARGET_POWERPC64; > + return TARGET_CMPB && TARGET_64BIT; > case ENB_P7: > return TARGET_POPCNTD; > case ENB_P7_64: > - return TARGET_POPCNTD && TARGET_POWERPC64; > + return TARGET_POPCNTD && TARGET_64BIT; > case ENB_P8: > return TARGET_POWER8; > case ENB_P8V: > @@ -171,13 +171,13 @@ rs6000_builtin_is_supported (enum rs6000_gen_builtins > fncode) > case ENB_P9: > return TARGET_MODULO; > case ENB_P9_64: > - return TARGET_MODULO && TARGET_POWERPC64; > + return TARGET_MODULO && TARGET_64BIT; > case ENB_P9V: > return TARGET_P9_VECTOR; > case ENB_P10: > return TARGET_POWER10; > case ENB_P10_64: > - return TARGET_POWER10 && TARGET_POWERPC64; > + return TARGET_POWER10 && TARGET_64BIT; > case ENB_ALTIVEC: > return TARGET_ALTIVEC; > case ENB_VSX: This needs splitting up in parts. Maybe then some parts can be correct, even!