[PATCH] D79159: [MLIR] Add complex numbers to standard dialect
Alex Zinenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 4 04:14:27 PDT 2020
ftynse accepted this revision.
ftynse added a comment.
This revision is now accepted and ready to land.
Thanks!
================
Comment at: mlir/include/mlir/Dialect/StandardOps/EDSC/Intrinsics.h:34
using std_memref_cast = ValueBuilder<MemRefCastOp>;
+using std_real = ValueBuilder<ReOp>;
using std_ret = OperationBuilder<ReturnOp>;
----------------
Nit: let's use `std_re` to be consistent with the assembly spelling.
================
Comment at: mlir/test/IR/invalid-ops.mlir:1236
+func @complex_number_from_different_float_types(%real: f32, %imag: f64) {
+ // expected-error at +1 {{use of value '%imag' expects different type than prior uses: 'f32' vs 'f64'}}
+ std.create_complex %real, %imag : complex<f32>
----------------
Nit: let's not hardcode SSA value names in checks, I think it's fine to shorten the expected-error message to `expects different type than prior uses: 'f32' vs 'f64'`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79159/new/
https://reviews.llvm.org/D79159
More information about the llvm-commits
mailing list