[InstCombine] Expand redundant phi cycle elimination (#67968)
There is a combine in instcombine that will look for phi cycles that only have a single incoming value: ``` %0 = phi i64 [ %3, %exit ], [ %othervalue, %preheader ] %3 = phi i64 [ %0, %body ], [ %othervalue, %body2 ] ``` This currently doesn't handle if %othervalue is a phi though, as the algorithm will recurse into the phi and fail with multiple incoming values. This adjusts the algorithm, not requiring the initial value to be found immediately, allowing it to be set to the value of one of the phis that would otherwise fail due to having multiple input values.
Loading
Please sign in to comment