spirv-fuzz: Fix FuzzerPassCopyObjects (#3638)

Fixes #3637.
This commit is contained in:
Vasyl Teliman 2020-08-05 13:54:11 +03:00 committed by GitHub
parent 8bc27a1cfb
commit 28f32ca53e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,13 +54,13 @@ void FuzzerPassCopyObjects::Apply() {
return;
}
std::vector<opt::Instruction*> relevant_instructions =
FindAvailableInstructions(
function, block, inst_it,
[this](opt::IRContext* ir_context, opt::Instruction* inst) {
return fuzzerutil::CanMakeSynonymOf(
ir_context, *GetTransformationContext(), inst);
});
const auto relevant_instructions = FindAvailableInstructions(
function, block, inst_it,
[this](opt::IRContext* ir_context, opt::Instruction* inst) {
return TransformationAddSynonym::IsInstructionValid(
ir_context, *GetTransformationContext(), inst,
protobufs::TransformationAddSynonym::COPY_OBJECT);
});
// At this point, |relevant_instructions| contains all the instructions
// we might think of copying.