[mlir][NFC] Remove illegal TanhOp in LLVMConversionTarget
authorTres Popp <tpopp@google.com>
Sun, 30 May 2021 17:50:54 +0000 (19:50 +0200)
committerTres Popp <tpopp@google.com>
Mon, 31 May 2021 08:40:09 +0000 (10:40 +0200)
No tests fail and this seems to be technical debt from when the math
dialect was created. This should not be there as it prevents users from
configuring their converion target freely and results in unexpected
behavior on seemingly unrelated ops.

Differential Revision: https://reviews.llvm.org/D103388

mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp

index 2fbfa11..6ddc333 100644 (file)
@@ -4132,7 +4132,6 @@ mlir::LLVMConversionTarget::LLVMConversionTarget(MLIRContext &ctx)
     : ConversionTarget(ctx) {
   this->addLegalDialect<LLVM::LLVMDialect>();
   this->addIllegalOp<LLVM::DialectCastOp>();
-  this->addIllegalOp<math::TanhOp>();
 }
 
 std::unique_ptr<OperationPass<ModuleOp>> mlir::createLowerToLLVMPass() {