[Mlir-commits] [mlir] [MLIR] Add sincos intrinsic to LLVM dialect (PR #160561)
Asher Mancinelli
llvmlistbot at llvm.org
Wed Sep 24 11:59:33 PDT 2025
================
@@ -4085,6 +4085,24 @@ printIndirectBrOpSucessors(OpAsmPrinter &p, IndirectBrOp op, Type flagType,
p << "]";
}
+//===----------------------------------------------------------------------===//
+// SincosOp (intrinsic)
+//===----------------------------------------------------------------------===//
+
+LogicalResult LLVM::SincosOp::verify() {
+ auto operandType = getOperand().getType();
+ auto resultType = getResult().getType();
+ auto resultStructType =
+ mlir::dyn_cast<mlir::LLVM::LLVMStructType>(resultType);
+ if (!resultStructType || resultStructType.getBody().size() != 2 ||
+ resultStructType.getBody()[0] != operandType ||
+ resultStructType.getBody()[1] != operandType) {
+ return emitOpError("expected result type to be an homogeneous struct with "
+ "two elements matching the operand type");
----------------
ashermancinelli wrote:
Thanks for the suggestion!
https://github.com/llvm/llvm-project/pull/160561
More information about the Mlir-commits
mailing list