https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120048
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I guess the mask/value comes from the c | 1 parameter passed to f from main. # RANGE [irange] int [-INF, -1][1, +INF] MASK 0xfffffffe VALUE 0x1 _2 = c.0_1 | 1; But f is void f (int e) { int e_3(D) = e; short int _1; int _5; int _6; <bb 2> [local count: 1073741824]: if (e_3(D) == 0) goto <bb 3>; [50.00%] else goto <bb 6>; [50.00%] <bb 3> [local count: 536870912]: _1 = (short int) e_3(D); if (_1 == 0) goto <bb 4>; [50.00%] else goto <bb 5>; [50.00%] <bb 4> [local count: 268435456]: # USE = nonlocal escaped _6 = d.part.0 (_1); and so shouldn't call d.part.0 at all if e_3 is not zero. Perhaps ipa-vrp just sees that something based on e_3(D) is passed to d.part.0 and doesn't actually do the path specific checks? Given the # RANGE [irange] int [-INF, -1][1, +INF] MASK 0xfffffffe VALUE 0x1 and # RANGE [irange] short [0, 0] at the same time the d.part.0 call from f is impossible and so UNDEFINED range is reasonable.