[Mlir-commits] [mlir] [mlir][EmitC] Add tests for arith.max/min float/signed int conversions (PR #190160)

Andrzej WarzyƄski llvmlistbot at llvm.org
Thu Apr 23 03:16:36 PDT 2026


================
@@ -0,0 +1,65 @@
+// RUN: mlir-opt -arith-expand -convert-arith-to-emitc %s | FileCheck %s
+
+/// This file checks the combined `-arith-expand | -convert-arith-to-emitc`
+/// pipeline with intentionally minimal FileCheck coverage.
+/// The full expansion is covered in `test/Dialect/Arith/expand-ops.mlir`, and
+/// the full ArithToEmitC lowering is covered in
+/// `test/Conversion/ArithToEmitC/arith-to-emitc.mlir`; this test only covers
+/// that the combination of the two produces the expected EmitC ops.
+
+/// Vector cases excluded because `arith.maximumf`/`arith.minimumf` expansion
+/// introduces `arith.cmpf`, and ArithToEmitC cannot convert `VectorType`.
+/// i.e. operand conversion for `vector<...>` fails before `cmpf` lowering.
+
+/// Tensor cases excluded because `arith.maximumf`/`arith.minimumf` expansion
+/// introduces `arith.cmpf`, but ArithToEmitC only lowers scalar `cmpf`.
+/// i.e. `cmpf` rejects tensors with: "only supported on floats, not
+/// tensors/vectors thereof".
----------------
banach-space wrote:

These paragraphs seem to duplicate each other, no?

https://github.com/llvm/llvm-project/pull/190160


More information about the Mlir-commits mailing list