From 0b032d7ba7157b62cd0d39f8d2dc0b0efa57a710 Mon Sep 17 00:00:00 2001 From: Denis Khalikov Date: Fri, 10 Jan 2020 11:56:10 -0500 Subject: [PATCH] [mlir][spirv] Fix typos related to (de)serialization. Fix typos related to (de)serialization of spv.selection. Differential Revision: https://reviews.llvm.org/D72503 --- mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp | 4 ++-- mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp b/mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp index 17ddc48..4e030217 100644 --- a/mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp +++ b/mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp @@ -1558,10 +1558,10 @@ LogicalResult Deserializer::processSelectionMerge(ArrayRef operands) { if (operands.size() < 2) { return emitError( unknownLoc, - "OpLoopMerge must specify merge target and selection control"); + "OpSelectionMerge must specify merge target and selection control"); } - if (static_cast(spirv::LoopControl::None) != operands[1]) { + if (static_cast(spirv::SelectionControl::None) != operands[1]) { return emitError(unknownLoc, "unimplmented OpSelectionMerge selection control: ") << operands[2]; diff --git a/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp b/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp index 0cdcc25..d7971eb 100644 --- a/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp +++ b/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp @@ -1448,13 +1448,13 @@ LogicalResult Serializer::processSelectionOp(spirv::SelectionOp selectionOp) { auto mergeID = getBlockID(mergeBlock); // Emit the selection header block, which dominates all other blocks, first. - // We need to emit an OpSelectionMerge instruction before the loop header + // We need to emit an OpSelectionMerge instruction before the selection header // block's terminator. auto emitSelectionMerge = [&]() { - // TODO(antiagainst): properly support loop control here + // TODO(antiagainst): properly support selection control here encodeInstructionInto( functionBody, spirv::Opcode::OpSelectionMerge, - {mergeID, static_cast(spirv::LoopControl::None)}); + {mergeID, static_cast(spirv::SelectionControl::None)}); }; // For structured selection, we cannot have blocks in the selection construct // branching to the selection header block. Entering the selection (and -- 2.7.4