This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add `complex.abs`, `complex.div` and `complex.mul` to ComplexOps.
ClosedPublic

Authored by pifon2a on Jan 18 2021, 5:27 AM.

Diff Detail

Event Timeline

pifon2a created this revision.Jan 18 2021, 5:27 AM
pifon2a requested review of this revision.Jan 18 2021, 5:27 AM
ftynse added inline comments.Jan 18 2021, 6:17 AM
mlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp
34

camelBack please

mlir/test/Conversion/ComplexToLLVM/convert-to-llvm.mlir
72

Nit: I think we converged to putting % outside the named pattern so %[[NAME]] is still indicative of it being an SSA value.

Thanks for adding these. Beyond coding style this looks great!

mlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp
265

nit: Sorting is off

mlir/test/Conversion/ComplexToLLVM/convert-to-llvm.mlir
1

Does this work without the extra RUN and the \ at the end?

pifon2a updated this revision to Diff 317497.Jan 19 2021, 2:18 AM
pifon2a marked 4 inline comments as done.

Address the comments.

pifon2a updated this revision to Diff 317498.Jan 19 2021, 2:20 AM

Add complex namespace to examples in ComplexOps.td.

herhut accepted this revision.Jan 19 2021, 2:25 AM

Thanks!

This revision is now accepted and ready to land.Jan 19 2021, 2:25 AM
This revision was landed with ongoing or failed builds.Jan 19 2021, 3:10 AM
This revision was automatically updated to reflect the committed changes.