summaryrefslogtreecommitdiff
path: root/mlir/test/lib/Transforms/TestDialectConversion.pdll
blob: a6cd21159d7d60cb8839733805c573b42b9562ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//===- TestPDLL.pdll - Test PDLL functionality ----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "TestOps.td"
#include "mlir/Transforms/DialectConversion.pdll"

/// Change the result type of a producer.
Pattern => replace op<test.cast> -> (results: TypeRange)
  with op<test.cast> -> (convertTypes(results));

/// Pass through test.return conversion.
Pattern => replace op<test.return>(args: ValueRange)
  with op<test.return>(convertValues(args));