<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62803>62803</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[MLIR] BufferViewFlowAnalysis.cpp - incorrect code
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
bondhugula
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bondhugula
</td>
</tr>
</table>
<pre>
The code/assert check here looks clearly incorrect. A RegionBranchOpInterface's `getSuccessors` can either give you the successor region or a list of zero or more Values in case the successor is a parent operation to which control flows (the values being typically the results of such an operation to which the predecessor region yields).
https://github.com/llvm/llvm-project/blob/2ef8ae134828876ab3ebda4a81bb2df7b095d030/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp#L96
This will crash assert when the list of successors has one that just has a range of `Value`s.
CC: @frgossen @joker-eph
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUk01r9DgMxz-NcxEdPM7rHHKYPkOg0GWhW3pXHCV267GD5XSYfvol6dt22T08l8TI0g9Zf_2R2U6eqBXlrVCqD34wy7Q4FEqJ8pThkkyI7Xc868NwbR8NgQ4DCdUhM8UE2pB-AUORwIXwwqAdYXRXsF6HGEmnHRzhgSYb_G1Er82f851PFEfUJFTNICo5Ufpr0ZqYQ2RRSdDogWwyFGGyrwTXsEAyBPyZBXEjQoiA4CwnCCO8UQxr5BwiwRO6hRisB41M_6q2DAgzRvIJwkwR0wpLAS7GagM6-BSDg9GFC4NQzVr9-g7syfoJ0nW2Gp27buBIvLjEaw-8aAPo_4u6Zs6RBvr5hKslN7BQh52QJyGP71-T0swiPwrVCdVNNpml3-lwFqpz7vXzdzPH8Ew6CdX1LvRCdYrGBmmfF41qmrrCPqd-wAKbfd-rYax7eSgHmUuhurOzceXYte5k0b2DbpdxpGjftu6F6h4jeh5DPPPX5ZOlS-fC5ejRXdnyTs-zUPn9ofrnEx6NZbhY50BHZAMfG3Mx5LdZfMr2JQuDQYbgV7UwwfPCaYsgRPQTrbmikpuwopL8Y16_fon8CKKQY5wCM_n1_BxeKN7QbCAb2nw45AfMqN1XTVHU-6quMtOOUuYlSb3va9lTPY5jQTSoqlSl1BXKzLZKqlyW-4MsirqsdrnWWucqH4tC04hSFJLOaN1uFWQX4pRZ5oXaSjUyzxz25PjDZp4usF1-uCy2m4j9MrEo5DoP_qYkm9zmzz_u7x5EeYL_nz3cfNtt82e2RNf-9gptra0qb63_HQAA___stGQP">