https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102622
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Summary|Wrong code with -O3 for |[12 Regression] Wrong code |skylake-avx512 and |with -O3 for skylake-avx512 |icelake-server |and icelake-server Last reconfirmed| |2021-10-05 Target Milestone|--- |12.0 Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- reduced to one file: static inline const unsigned &max1(const unsigned &t, const unsigned &t1) { return t > t1 ? t : t1; } long long int c = 42; int var_20 = 0; int var_22 = 0; short arr_32 [13]; char arr_45 [69]; void test(int a, unsigned b, long long *c) __attribute__((noipa)); void test(int a, unsigned b, long long *c) { for (short d = 0; d < 13; d++) { for (int e = 0; e < a; e += 3) var_20 = 0; if (max1(b, unsigned((short)b))) { arr_32[d] = 0; var_22 = *c; } for (unsigned f = 0; f < 69; f += 4) arr_45[f] = 0; } } int main() { test(-545750584, 1144022456U, &c); if (var_22 != 42) __builtin_abort(); return 0; } Confirmed.