brintos

brintos / llvm-project-archived public Read only

0
0
Text · 605 B · a7dec9b Raw
17 lines · plain
1// RUN: mlir-opt %s -canonicalize -split-input-file | FileCheck %s2 3func.func @test() -> i32 {4  %c5 = "test.constant"() {value = 5 : i32} : () -> i325  %c1 = "test.constant"() {value = 1 : i32} : () -> i326  %c2 = "test.constant"() {value = 2 : i32} : () -> i327  %c3 = "test.constant"() {value = 3 : i32} : () -> i328  %res = test.fold_with_fold_adaptor %c5, [ %c1, %c2], { (%c3), (%c3) } {9    %c0 = "test.constant"() {value = 0 : i32} : () -> i3210  }11  return %res : i3212}13 14// CHECK-LABEL: func.func @test15// CHECK-NEXT: %[[C:.*]] = "test.constant"() <{value = 33 : i32}>16// CHECK-NEXT: return %[[C]]17