summaryrefslogtreecommitdiff
path: root/lib/SPIRV/libSPIRV/SPIRVModule.cpp
diff options
context:
space:
mode:
authorkkyzylov <ksenia.kyzylova@intel.com>2016-09-02 18:59:08 +0300
committerYaxun (Sam) Liu <yaxun.liu@amd.com>2016-09-02 11:59:08 -0400
commitdec9da5d5bf77719719f4a0fb5192ba659b31d86 (patch)
treee14b844014db381f9e89ee696f6e9ac3da369102 /lib/SPIRV/libSPIRV/SPIRVModule.cpp
parent1b507a33d9b52d3cd7fb331b0053e33b9417a410 (diff)
Support translation of OpVectorTimesScalar instruction (#177)
Diffstat (limited to 'lib/SPIRV/libSPIRV/SPIRVModule.cpp')
-rw-r--r--lib/SPIRV/libSPIRV/SPIRVModule.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/SPIRV/libSPIRV/SPIRVModule.cpp b/lib/SPIRV/libSPIRV/SPIRVModule.cpp
index 2419746..387f5a7 100644
--- a/lib/SPIRV/libSPIRV/SPIRVModule.cpp
+++ b/lib/SPIRV/libSPIRV/SPIRVModule.cpp
@@ -286,6 +286,8 @@ public:
SPIRVBasicBlock *);
virtual SPIRVInstruction *addFModInst(SPIRVType *TheType, SPIRVId TheDividend,
SPIRVId TheDivisor, SPIRVBasicBlock *BB);
+ virtual SPIRVInstruction *addVectorTimesScalarInst(SPIRVType *TheType,
+ SPIRVId TheVector, SPIRVId TheScalar, SPIRVBasicBlock *BB);
virtual SPIRVInstruction *addUnaryInst(Op, SPIRVType *, SPIRVValue *,
SPIRVBasicBlock *);
virtual SPIRVInstruction *addVariable(SPIRVType *, bool, SPIRVLinkageTypeKind,
@@ -949,6 +951,13 @@ SPIRVModuleImpl::addFModInst(SPIRVType *TheType, SPIRVId TheDividend,
}
SPIRVInstruction *
+SPIRVModuleImpl::addVectorTimesScalarInst(SPIRVType *TheType, SPIRVId TheVector,
+ SPIRVId TheScalar, SPIRVBasicBlock *BB) {
+ return BB->addInstruction(new SPIRVVectorTimesScalar(TheType, getId(),
+ TheVector, TheScalar, BB));
+}
+
+SPIRVInstruction *
SPIRVModuleImpl::addGroupInst(Op OpCode, SPIRVType *Type,
Scope Scope, const std::vector<SPIRVValue *> &Ops,
SPIRVBasicBlock *BB) {