Handle the case where Merge node of Conditional A is used as Conditional B's predicate.
For Conditional B's If node, we should use Conditional A's If output as predicate (instead of Conditional A's merge node). Otherwise, Conditional A's Merge node is still connected to Conditional B's If node, and when we call DeleteReachableAndDeadNodes(), Conditional A's Merge node and Conditional B's If node will be removed, which is wrong. Notice that we cannot just modify merge_to_predicate_; because in all nodes' CondState, we still use Conditional A's Merge node name as CondState predicate. PiperOrigin-RevId: 231304145
Loading
Please sign in to comment