Earlier, in the sparse backward dataflow analysis, data from the results
of an op implementing RegionBranchOpInterface was considered to flow
into the operands of every op that did not implement the
RegionBranchTerminatorOpInterface but was return-like and present
in a region of the former. It was thus also expected that the number of
results of the former be equal to the number of operands in the latter.
This understanding of dataflow is incorrect and thus this expectation is
also not justified. This commit fixes this incorrect understanding.
This commit ensures that these return-like ops are handled just like the
ops implementing the RegionBranchTerminatorOpInterface, which means
that, if this op has a region A whose successors are regions B, C,
and D, then data flows from the arguments (successor inputs) of B,
C, and D to the corresponding successor operands of this op.
This fix is also propagated to liveness analysis that earlier relied on
this incorrect implementation of the sparse backward dataflow analysis
framework and corrects some incorrect assumptions made in it.
Also cleaned up some unnecessary comments from the test file.
Issue: https://github.com/llvm/llvm-project/issues/64139.
Signed-off-by: Srishti Srivastava <srishtisrivastava.ai@gmail.com>