bolt/deps/llvm-18.1.8/mlir/test/Transforms/test-operation-folder-commutative.mlir

12 lines
456 B
MLIR
Raw Normal View History

2025-02-14 19:21:04 +01:00
// RUN: mlir-opt --pass-pipeline="builtin.module(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
}