diff options
author | kkyzylov <ksenia.kyzylova@intel.com> | 2016-09-02 18:59:08 +0300 |
---|---|---|
committer | Yaxun (Sam) Liu <yaxun.liu@amd.com> | 2016-09-02 11:59:08 -0400 |
commit | dec9da5d5bf77719719f4a0fb5192ba659b31d86 (patch) | |
tree | e14b844014db381f9e89ee696f6e9ac3da369102 /lib/SPIRV/libSPIRV/SPIRVModule.cpp | |
parent | 1b507a33d9b52d3cd7fb331b0053e33b9417a410 (diff) |
Support translation of OpVectorTimesScalar instruction (#177)
Diffstat (limited to 'lib/SPIRV/libSPIRV/SPIRVModule.cpp')
-rw-r--r-- | lib/SPIRV/libSPIRV/SPIRVModule.cpp | 9 |
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) {
|