Files
clang-p2996/mlir/test/Transforms/test-operation-folder-commutative.mlir
River Riddle cda6aa78f8 [mlir][NFC] Update textual references of func to func.func in Transform tests
The special case parsing of `func` operations is being removed.
2022-04-20 22:17:30 -07:00

12 lines
451 B
MLIR

// RUN: mlir-opt --pass-pipeline="func.func(test-patterns)" %s | FileCheck %s
// CHECK-LABEL: func @test_reorder_constants_and_match
func.func @test_reorder_constants_and_match(%arg0 : i32) -> (i32) {
// CHECK: %[[CST:.+]] = arith.constant 43
%cst = arith.constant 43 : i32
// CHECK: return %[[CST]]
%y = "test.op_commutative2"(%cst, %arg0) : (i32, i32) -> i32
%x = "test.op_commutative2"(%y, %arg0) : (i32, i32) -> i32
return %x : i32
}