[Mlir-commits] [mlir] [mlir][arith][NFC] Use type parser instead of hard-coding type keywords (PR #186753)

Matthias Springer llvmlistbot at llvm.org
Tue Mar 17 03:59:52 PDT 2026


================
@@ -1,4 +1,9 @@
-// RUN: mlir-opt --split-input-file --arith-emulate-unsupported-floats="source-types=bf16,f8E4M3FNUZ target-type=f32" %s | FileCheck %s
+// RUN: mlir-opt --arith-emulate-unsupported-floats="source-types=bf16,f8E4M3FNUZ target-type=f32" %s | FileCheck %s
+// RUN: mlir-opt --arith-emulate-unsupported-floats="source-types=bf16,f8E4M3FNUZ target-type=!llvm.ppc_fp128" %s | FileCheck %s --check-prefix=CHECK-PPC
+
+// Arbitrary op from the LLVM dialect to ensure that the LLVM dialect is loaded.
+// The LLVM dialect is needed for the !llvm.ppc_fp128 test run.
----------------
matthias-springer wrote:

> On the other hand, if a type doesn't parse, you can skip it, maybe? Because if the type doesn't exist in the code, there'll be nothing to emulate.

The type parses, but MLIR crashes because the dialect was not loaded yet.

I deactivated support for non-builtin types. It would be nice to allow loading of dialects without having to know the TypeID in `getDependentDialects.


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


More information about the Mlir-commits mailing list