[Bug tree-optimization/104551] [12 Regression] Wrong code with -O3 for skylake-avx512, icelake-server, and sapphirerapids

crazylht at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Feb 16 03:57:14 GMT 2022


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

--- Comment #4 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Hongtao.liu from comment #3)
> (In reply to Hongtao.liu from comment #2)
> > let me take a look.
> 
> Start with r12-7216

  for (bool a = 0; a < (bool)var_11; a = 2)
    for (unsigned b = 0; b < var_11;
         b += 1)
      var_178 = arr_492[b] ? arr_492[b] : (char) b;

arr_492[b] is unsigned char, and (char) b is sign char,
vect_recog_cond_expr_convert_pattern shouldn't hanlde this since it's
zero_extend with sign_extend, it's not equal to

    var_178 = arr_492[b] ? (char)arr_492[b] : (char) b;


More information about the Gcc-bugs mailing list