[Bug target/118140] [15 Regression] RISC-V: Miscompile with -march=rv64gcv_zvl256b -O3 since r15-3992-g698e0ec89bc

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 20 02:40:55 GMT 2024


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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Try this:
    d |= ({
      int h = f[g - 1] ? 2 : 0;
#if 0
      int i = f[g - 1] ? f_3 : 0;
#else
      _Bool t;
      if (f[g - 1])
        t = f_3;
      else
        t = 0;
//_Bool t = (f[g - 1] & f_3);
int i = t;
#endif
      h > i;
    });


More information about the Gcc-bugs mailing list