Unverified Commit 30fe8762 authored by Markus Böck's avatar Markus Böck Committed by GitHub
Browse files

[mlir][cfg-to-scf] Fix invalid transformation when value is used in a subregion (#67544)

The current loop-reduce-form transformation incorrectly assumes that any
value that is used in a block that isn't in the set of loop blocks is a
block outside the loop. This is correct for a pure CFG but is incorrect
if operations with subregions are present. In that case, a use may be in
a subregion of an operation part of the loop and incorrectly deemed
outside the loop. This would later lead to transformations with code
that does not verify.

This PR fixes that issue by checking the transitive parent block that is
in the same region as the loop rather than the immediate parent block.
parent d338acf3
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment