[Mlir-commits] [mlir] [MLIR][NVVM] Add nvvm.fma Op (PR #184776)
Srinivasa Ravi
llvmlistbot at llvm.org
Fri Mar 6 03:03:58 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);
----------------
Wolfram70 wrote:
Yeah, I think we don't need this lambda altogether. Removed it in the latest revision, thanks!
https://github.com/llvm/llvm-project/pull/184776
More information about the Mlir-commits
mailing list