spirv-fuzz: Skip dead blocks in FuzzerPassAddOpPhiSynonyms (#3965)

Fixes #3949.
This commit is contained in:
Alastair Donaldson 2020-10-21 20:49:33 +01:00 committed by GitHub
parent 5600fb85b6
commit 26954c281e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,12 @@ void FuzzerPassAddOpPhiSynonyms::Apply() {
continue;
}
// The block must not be dead.
if (GetTransformationContext()->GetFactManager()->BlockIsDead(
block.id())) {
continue;
}
// The block must have at least one predecessor.
size_t num_preds = GetIRContext()->cfg()->preds(block.id()).size();
if (num_preds == 0) {