[llvm] [SPIR-V] Add OpSMulExtended and OpUMulExtended builtin support (PR #187474)
Dmitry Sidorov via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 27 09:05:02 PDT 2026
================
@@ -1996,6 +1996,97 @@ static bool generateICarryBorrowInst(const SPIRV::IncomingCall *Call,
return true;
}
+// We expect a builtin in one of two forms:
+//
+// (1) sret convention (3 arguments):
+// void Name(ptr sret([RetType]) %result, Type %operand1, Type %operand2)
+// => Res = Opcode RetType Operand1 Operand2
+// OpStore %result Res
+//
+// (2) direct return convention (2 arguments):
+// RetType Name(Type %operand1, Type %operand2)
+// => Res = Opcode RetType Operand1 Operand2
+//
+// RetType is a struct with two members of the same type as the operands.
+static bool generateMulExtendedInst(const SPIRV::IncomingCall *Call,
----------------
MrSidims wrote:
I feel like that sret path here is essentially the same as for generateICarryBorrowInst. Can they be unified?
https://github.com/llvm/llvm-project/pull/187474
More information about the llvm-commits
mailing list