tosa.reshape and tosa.concat were moved from TosaToLinalg to TosaToTensor
(D145119 & D145952). So now they are legal after applying TosaToLinalg patterns,
and illegal after applying TosaToTensor patterns.
This includes D146174 (thanks @ramiro050!)
Reviewed By: krzysz00
Differential Revision: https://reviews.llvm.org/D146213
target.addLegalOp<tosa::IfOp>();
target.addLegalOp<tosa::ConstOp>();
target.addLegalOp<tosa::WhileOp>();
+ target.addLegalOp<tosa::ConcatOp>();
target.addLegalOp<tosa::SliceOp>();
target.addLegalOp<tosa::ReshapeOp>();
target.addLegalOp<tosa::PadOp>();
void runOnOperation() override {
RewritePatternSet patterns(&getContext());
ConversionTarget target(getContext());
+ target.addIllegalOp<tosa::ConcatOp>();
+ target.addIllegalOp<tosa::ReshapeOp>();
target.addIllegalOp<tosa::SliceOp>();
target.addIllegalOp<tosa::PadOp>();
target.addLegalDialect<arith::ArithDialect>();