[Mlir-commits] [mlir] [ROCDL] added math instructions to the ROCDL dialect (PR #169672)
Krzysztof Drewniak
llvmlistbot at llvm.org
Wed Nov 26 10:02:49 PST 2025
================
@@ -1885,6 +1885,27 @@ def ROCDL_FMed3Op : ROCDL_IntrOp<"fmed3", [0], [], [Pure, AllTypesMatch<["res",
}];
}
+//===----------------------------------------------------------------------===//
+// Math operations
+//===----------------------------------------------------------------------===//
+
+class ROCDL_Math_IntrOp<string mnemonic, list<Trait> traits = []> :
+ ROCDL_IntrOp<mnemonic, [0], [], traits, 1>,
+ Arguments<(ins LLVM_AnyFloat:$arg)> {
+ let results = (outs LLVM_AnyFloat:$res);
----------------
krzysz00 wrote:
These will want some explanation of when they should be used over the built-in LLVM ones.
(I _suspect_ it's to do with, say, denormal handling, but I'd check on that. At the very least, I think these are "call the relevant machine instruction" where their LLVM equivalents have contracts to maintain.)
https://github.com/llvm/llvm-project/pull/169672
More information about the Mlir-commits
mailing list