https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85301
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at gcc dot gnu.org --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- That is, jump-threading fails to do if (x & 3) ... else thread --> if (x & 1) ... else <--- here with the extra complication of that clobbering ktime_get () call on the true path and x being memory references where DOM sees it. PRE "cleans" that up on the interesting path but still late DOM doesn't perform the threading: <bb 2> [local count: 1073741825]: _1 = BIT_FIELD_REF <tick_nohz_idle_exit_ts, 8, 0>; _2 = _1 & 3; if (_2 != 0) goto <bb 3>; [33.00%] else goto <bb 4>; [67.00%] <bb 3> [local count: 354334802]: now_11 = ktime_get (); pretmp_14 = BIT_FIELD_REF <tick_nohz_idle_exit_ts, 8, 0>; <bb 4> [local count: 1073741825]: # now_5 = PHI <now_11(3), now_9(D)(2)> # prephitmp_15 = PHI <pretmp_14(3), _1(2)> _4 = prephitmp_15 & 1; if (_4 != 0) goto <bb 5>; [33.00%] else else goto <bb 6>; [67.00%] <bb 5> [local count: 354334802]: __tick_nohz_idle_restart_tick (now_5); <bb 6> [local count: 1073741825]: