[Mlir-commits] [mlir] [mlir][math] Add vector support for math-to-apfloat (PR #172715)
Matthias Springer
llvmlistbot at llvm.org
Sat Jan 10 02:26:51 PST 2026
================
@@ -9,13 +9,74 @@
#ifndef MLIR_CONVERSION_ARITHANDMATHTOAPFLOAT_UTILS_H_
#define MLIR_CONVERSION_ARITHANDMATHTOAPFLOAT_UTILS_H_
+#include "mlir/Dialect/Vector/IR/VectorOps.h"
+#include "mlir/IR/PatternMatch.h"
+#include "mlir/Pass/Pass.h"
+#include "llvm/ADT/SmallVector.h"
+
namespace mlir {
class Value;
class OpBuilder;
class Location;
class FloatType;
Value getAPFloatSemanticsValue(OpBuilder &b, Location loc, FloatType floatTy);
+
+/// Given two operands of vector type and vector result type (with the same
+/// shape), call the given function for each pair of scalar operands and
+/// package the result into a vector. If the given operands and result type are
+/// not vectors, call the function directly. The second operand is optional.
+template <typename Fn, typename... Values>
----------------
matthias-springer wrote:
`typename... Values` is unused? (This seems already redundant in the original code.)
https://github.com/llvm/llvm-project/pull/172715
More information about the Mlir-commits
mailing list