[mlir] Lower complex.sqrt and complex.atan2 to Arithmetic dialect.
authorAlexander Belyaev <pifon@google.com>
Fri, 27 May 2022 13:59:19 +0000 (15:59 +0200)
committerAlexander Belyaev <pifon@google.com>
Mon, 30 May 2022 07:44:36 +0000 (09:44 +0200)
commitf5fa633b0955a8cee878b384801038fccef11fdc
tree9ffd3fbd4a77e9a20172972bc081ec0e9eb92645
parentbcf3d5248678db3bc12eda9fbc212ab2c4fbcc0f
[mlir] Lower complex.sqrt and complex.atan2 to Arithmetic dialect.

I don't see a point here in the lit tests here since sqrt, mul and other ops
expand as well. I just added "smoke" tests to verify that the conversion works
and does not create any illegal ops.

I will create a patch that adds a simple integration test to
mlir/test/Integration/Dialect/ComplexOps/ that will compare the values.

Differential Revision: https://reviews.llvm.org/D126539
mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
mlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir