https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117954
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Looking into this further. It looks like if ifcombine was after thread1, then pre would have caught it. Note r15-5022-gadd4bb94459d6c and related patches I did were designed to fix the issue when `--param logical-op-non-short-circuit=1` after r15-5024-g2a2e6784074e1f . I just didn't notice that `--param logical-op-non-short-circuit=0` case was depending on the unroll when I had committed the testcase.