[Mlir-commits] [mlir] [MLIR] Add sincos intrinsic to LLVM dialect (PR #160561)
Mehdi Amini
llvmlistbot at llvm.org
Wed Sep 24 11:18:19 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");
----------------
joker-eph wrote:
```suggestion
"two elements matching the operand type, but got ") << resultType;
```
https://github.com/llvm/llvm-project/pull/160561
More information about the Mlir-commits
mailing list