https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118843

--- Comment #2 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
We have

  if (TARGET_HARD_FLOAT && ISA_HAS_FRECIPE)
    builtin_define ("__loongarch_frecipe");

where the logic seems correct.  But __loongarch_frecipe is also in
la_evo_macro_name and it can get defined by:

  for (int i = 0; i < N_EVO_FEATURES; i++)
    if (la_target.isa.evolution & la_evo_feature_masks[i])
      {   
        builtin_define (la_evo_macro_name[i]);

... ...

Maybe we can just do

if (!TARGET_HARD_FLOAT)
  cpp_undef ("__loongarch_frecipe");

after the loop above (and remove the useless if block on the top).

Reply via email to