1 // RUN: mlir-opt --pass-pipeline="builtin.module(test-greedy-patterns)" %s | FileCheck %s
3 // CHECK-LABEL: func @test_reorder_constants_and_match
4 func.func @test_reorder_constants_and_match(%arg0 : i32) -> (i32) {
5 // CHECK: %[[CST:.+]] = arith.constant 43
6 %cst = arith.constant 43 : i32
7 // CHECK: return %[[CST]]
8 %y = "test.op_commutative2"(%cst, %arg0) : (i32, i32) -> i32
9 %x = "test.op_commutative2"(%y, %arg0) : (i32, i32) -> i32