1 // RUN: mlir-opt %s -canonicalize -split-input-file | FileCheck %s
3 func.func @test() -> i32 {
4 %c5 = "test.constant"() {value = 5 : i32} : () -> i32
5 %c1 = "test.constant"() {value = 1 : i32} : () -> i32
6 %c2 = "test.constant"() {value = 2 : i32} : () -> i32
7 %c3 = "test.constant"() {value = 3 : i32} : () -> i32
8 %res = test.fold_with_fold_adaptor %c5, [ %c1, %c2], { (%c3), (%c3) } {
9 %c0 = "test.constant"() {value = 0 : i32} : () -> i32
14 // CHECK-LABEL: func.func @test
15 // CHECK-NEXT: %[[C:.*]] = "test.constant"() <{value = 33 : i32}>
16 // CHECK-NEXT: return %[[C]]