From 11af4e2ebda9902fc04faa342266620516857217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Thu, 22 Aug 2024 17:39:00 +0200 Subject: [PATCH] python format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nathan Gauër --- llvm/utils/spirv-sim/instructions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm/utils/spirv-sim/instructions.py b/llvm/utils/spirv-sim/instructions.py index 5ae0f826648ee4e..c1e3d1e1ef7ab07 100644 --- a/llvm/utils/spirv-sim/instructions.py +++ b/llvm/utils/spirv-sim/instructions.py @@ -1,5 +1,6 @@ from typing import Optional + # Base class for an instruction. To implement a basic instruction that doesn't # impact the control-flow, create a new class inheriting from this. class Instruction: @@ -256,14 +257,16 @@ def _impl(self, module, lane): output.append(lane.get_register(op)) lane.set_register(self._result, output) + class OpCompositeExtract(Instruction): def _impl(self, module, lane): value = lane.get_register(self._operands[1]) output = value for op in self._operands[2:]: - output = output[int(op)] + output = output[int(op)] lane.set_register(self._result, output) + class OpStore(Instruction): def _impl(self, module, lane): lane.set_register(self._operands[0], lane.get_register(self._operands[1]))