https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118867
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- So for my reduced test, only DOM is able to optimize it (still); you just need to disable ifcombine as ifcombine combines the if statements together before dom is able to run. So maybe my reduced testcase and the original are different issues.