[mlir][complex] Mark all supported operation illegal explicitly for complex to libm

We can mark all supported operations illegal explicitly to ensure no convertible ops remain.

Differential Revision: https://reviews.llvm.org/D131877
This commit is contained in:
Kai Sasaki 2022-08-15 15:54:12 -04:00 committed by Frederik Gossen
parent 6d17254df4
commit 5605f17a4d
1 changed files with 2 additions and 1 deletions

View File

@ -131,7 +131,8 @@ void ConvertComplexToLibmPass::runOnOperation() {
ConversionTarget target(getContext());
target.addLegalDialect<func::FuncDialect>();
target.addIllegalOp<complex::PowOp, complex::SqrtOp, complex::TanhOp,
complex::AbsOp, complex::AngleOp>();
complex::CosOp, complex::SinOp, complex::ConjOp,
complex::LogOp, complex::AbsOp, complex::AngleOp>();
if (failed(applyPartialConversion(module, target, std::move(patterns))))
signalPassFailure();
}