spirv-fuzz: Fixes to preconditions for adding dead break/continue edges (#2904)
Issues #2898 and #2900 identify some cases where adding a dead continue would lead to an invalid module, and these turned out to be due to the lack of sensible dominance information when a continue target is unreachable. This change requires that the header of a loop dominates the loop's continue target if a dead continue is to be added. Furthermore, issue #2905 identified a shortcoming in the algorithm being used to identify when it is OK, from a dominance point of view, to add a new break/continue edge to a control flow graph. This change replaces that algorithm with a simpler and more obviously correct algorithm (that incidentally does not require the new edge to be a break/continue edge in particular). Fixes #2898. Fixes #2900. Fixes #2905.
Loading
Please register or sign in to comment