[Mlir-commits] [mlir] [MLIR][LLVMIR] Add an operation to handle constrained FP intrinsics (PR #199754)
Tobias Gysi
llvmlistbot at llvm.org
Tue May 26 22:20:53 PDT 2026
https://github.com/gysit commented:
I have som high-level comments and questions.
Can you quantify the number of extra intrinsics needed? If it is a single digit number we may consider adding explicit intrinsics but I doubt it.
If we go for a call operation, I would have a slight preference for reusing the existing `CallIntrinsicOp`. That probably requires some plumbing to import and export the metadata.
I think the steps needed to make `CallIntrinsicOp` work here would be:
- Adding rounding mode and exception behavior arguments to `CallIntrinsicOp`
- Add the `FPExceptionBehaviorOpInterface` and `RoundingModeOpInterface`
- `convertUnregisteredIntrinsic` needs to be extended to import the extra metadata
- `convertCallLLVMIntrinsicOp` needs to be extended to export the extra metadata
Alternatively, we could also go the route of your PR. However, then I would probably avoid the work `call` in the name and just use something like `ConstrainedFPIntrinsicOp` that has an enum argument that specifies the op code rather than the string attribute? Also for consistency we should then probably replace the existing intrinsics with this new "generic" intrinsic.
https://github.com/llvm/llvm-project/pull/199754
More information about the Mlir-commits
mailing list