Fix invalid OpPhi generated by merge-return. (#2172)
* Fix invalid OpPhi generated by merge-return. When we create a new phi node for a value say %10, we have to replace all of the uses of %10 that are no longer dominated by the def of %10 by the result id of the new phi. However, if the use is in a phi node, it is possible that the bb contains the use is not dominated by either. In this case, needs to be handled differently. * Split loop headers before add a new branch to them. In merge return, Phi node in loop header that are also merges for loop do not get updated correctly. Those cases do not fit in with our current analysis. Doing this will simplify the code by reducing the number of cases that have to be handled.
Loading
Please register or sign in to comment