From 28f32ca53e43653163554cf668055e3232031f7a Mon Sep 17 00:00:00 2001 From: Vasyl Teliman Date: Wed, 5 Aug 2020 13:54:11 +0300 Subject: [PATCH] spirv-fuzz: Fix FuzzerPassCopyObjects (#3638) Fixes #3637. --- source/fuzz/fuzzer_pass_copy_objects.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/fuzz/fuzzer_pass_copy_objects.cpp b/source/fuzz/fuzzer_pass_copy_objects.cpp index 81326ac7f..4cc4044fe 100644 --- a/source/fuzz/fuzzer_pass_copy_objects.cpp +++ b/source/fuzz/fuzzer_pass_copy_objects.cpp @@ -54,13 +54,13 @@ void FuzzerPassCopyObjects::Apply() { return; } - std::vector 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.