While converting the existing Control flow to Data flow graph there are some logic problems when dealing with PHI nodes that results in faulty DFG from given CFG.
The syntax of PHI nodes is like this -
su.0 = phi i32 [0, %0], [%su.1, %"5"]
The current pass will directly connect the output of su.1 to su.0 but this is not the correct output. Instead it means that su.1 should be connected to su.0 from %"5" labeled block. So su.1 should be connected to su.0 gated via the predicate that one encounters while traversing from the definition of su.0 to the labeled block.
While converting the existing Control flow to Data flow graph there are some logic problems when dealing with PHI nodes that results in faulty DFG from given CFG.
The syntax of PHI nodes is like this - su.0 = phi i32 [0, %0], [%su.1, %"5"]
The current pass will directly connect the output of su.1 to su.0 but this is not the correct output. Instead it means that su.1 should be connected to su.0 from %"5" labeled block. So su.1 should be connected to su.0 gated via the predicate that one encounters while traversing from the definition of su.0 to the labeled block.