/* Only PHIs with three or more arguments have opportunities. */
if (EDGE_COUNT (bb->preds) < 3)
continue;
- /* Do not touch loop headers. */
- if (bb->loop_father->header == bb)
+ /* Do not touch loop headers or blocks with abnormal predecessors.
+ ??? This is to avoid creating valid loops here, see PR103458.
+ We might want to improve things to either explicitely add those
+ loops or at least consider blocks with no backedges. */
+ if (bb->loop_father->header == bb
+ || bb_has_abnormal_pred (bb))
continue;
/* Take one PHI node as template to look for identical