================
@@ -1694,6 +1701,110 @@ bool
SPIRVInstructionSelector::selectIntegerDot(Register ResVReg,
return Result;
}
+template <bool Signed>
+bool SPIRVInstructionSelector::selectDot4AddPacked(Register ResVReg,
+ const SPIRVType *ResType,
+ MachineInstr &I) const {
+ assert(I.getNumOperands() == 5);
+ assert(I.getOperand(2).isReg());
+ assert(I.getOperand(3).isReg());
+ assert(I.getOperand(4).isReg());
+ MachineBasicBlock &BB = *I.getParent();
+
+ Register Dot = MRI->createVirtualRegister(&SPIRV::IDRegClass);
+ bool Result = BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpDot))
----------------
s-perron wrote:
You want to use the
[OpSDot](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpSDot)
and
[OpUDot](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpUDot)
instructions. If I said OpDot before that was a mistake on my part.
https://github.com/llvm/llvm-project/pull/113623
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits