[PATCH] D79159: [MLIR] Add complex numbers to standard dialect

Frederik Gossen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 04:11:05 PDT 2020


frgossen added inline comments.


================
Comment at: mlir/test/mlir-cpu-runner/complex_numbers.mlir:6
+// Create complex number and extracit real part.
+func @create_and_extract_real() -> f32 {
+  %real = constant 1.2 : f32
----------------
bondhugula wrote:
> CHECK-LABEL to prevent things from matching past this. 
I double-checked the output of `mlir-opt %s -convert-std-to-llvm | mlir-cpu-runner -e create_and_extract_real -entry-point-result=f32` and it is no more than the result of the computation, i.e. `1.200000e+00`. 
Because the two functions are compiled and executed separately, I believe matching past things is not an issue here and I don't see how I can use `CHECK-LABEL` in a useful way. 
Do let me know if there is a more elegant way to write this test. 


================
Comment at: mlir/test/mlir-cpu-runner/complex_numbers.mlir:21
+
+// Create complex number and extract imaginary part.
+func @create_and_extract_imag() -> f32 {
----------------
bondhugula wrote:
> CHECK-LABEL here please. 
See above.


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