[Mlir-commits] [mlir] [MLIR][NVVM] Add nvvm.fma Op (PR #184776)
Durgadoss R
llvmlistbot at llvm.org
Fri Mar 6 02:37:35 PST 2026
================
@@ -446,6 +446,41 @@ getFenceProxySyncRestrictID(NVVM::MemOrderKind order) {
nvvm_fence_proxy_async_generic_release_sync_restrict_space_cta_scope_cluster;
}
+// Calls an LLVM intrinsic on the given operands. For f32/f64 vector types,
+// the intrinsic is called per-element and the results are packed back into a
+// vector. If retType is non-null, it is forwarded as the return-type
+// overload to `createIntrinsicCall`.
+static llvm::Value *
+createScalarizedIntrinsicCall(llvm::IRBuilderBase &builder,
+ llvm::Intrinsic::ID IID, llvm::Type *opTypeLLVM,
+ ArrayRef<llvm::Value *> operands,
+ llvm::Type *retType = nullptr) {
+ auto callIntrinsic = [&](ArrayRef<llvm::Value *> args) -> llvm::CallInst * {
+ llvm::SmallVector<llvm::Value *> callArgs(args);
+ if (retType)
+ return createIntrinsicCall(builder, IID, retType,
+ callArgs); // overloaded intrinsic call
+ return createIntrinsicCall(builder, IID, callArgs);
----------------
durga4github wrote:
I think we added a wrapper for these two cases recently.
Let us double-check and use only one.
https://github.com/llvm/llvm-project/pull/184776
More information about the Mlir-commits
mailing list