https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59660
--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #13) > Using the C front-end we still have a casting issue. There are a few issues of even for the C++ front-end IR: In phiopt1 we have: if (n_6(D) == m_7(D)) goto <bb 4>; [INV] else goto <bb 3>; [INV] <bb 3> : _1 = n_6(D) + -1; # .MEM_9 = VDEF <.MEM_8(D)> _10 = m_is_less_than_n (_1, m_7(D)); if (_10 != 0) goto <bb 4>; [INV] else goto <bb 5>; [INV] <bb 4> : # .MEM_4 = PHI <.MEM_9(3), .MEM_8(D)(2)> <bb 5> : # iftmp.0_3 = PHI <1(4), 0(3)> # .MEM_5 = PHI <.MEM_4(4), .MEM_9(3)> the conditional in "bb 3" could be replaced with tmp = _10. I will have to think of how to handle this in the current code but it is definitely more complex really because you have 2 phi nodes to worry about and such.