https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110992
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|14.0 |13.3 Summary|[14 Regression] Dead Code |[13/14 Regression] missed |Elimination Regression at |VRP optimization due to |-O3 since |transformation of `a & |r14-1654-g7ceed7e3e29 |-zero_one_valued_p` into `a | |* zero_one_valued_p` --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Hmm, I think this is a ranger issue really. Take: ``` int f(unsigned b, short c) { int bt = b; int bt1 = bt; int t = bt1 & -(c!=0); // int t = bt1 * (c!=0); if (!t) return 0; foo(bt == 0); return 0; } ``` That `bt == 0` should be figured out that is 0 there. We could figure that out in GCC 12 even. But in GCC 13+ we could not. That is traced back to r13-793-g8fb94fc6097c but really the ranger should figure out if you have a*b != 0, then both a and b should be non-zero ... But currently that is not support .... It looks like we only handle `a & b` that way ...