47 lines · plain
1// RUN: mlir-opt %s | FileCheck %s2// Verify the printed output can be parsed.3// RUN: mlir-opt %s | mlir-opt | FileCheck %s4// Verify the generic form can be parsed.5// RUN: mlir-opt -mlir-print-op-generic %s | mlir-opt | FileCheck %s6 7// CHECK-LABEL: func @poison()8// CHECK: %{{.*}} = ub.poison : i329func.func @poison() -> i32 {10 %0 = ub.poison : i3211 return %0 : i3212}13 14// CHECK-LABEL: func @poison_full_form()15// CHECK: %{{.*}} = ub.poison : i3216func.func @poison_full_form() -> i32 {17 %0 = ub.poison <#ub.poison> : i3218 return %0 : i3219}20 21// CHECK-LABEL: func @poison_complex()22// CHECK: %{{.*}} = ub.poison : complex<f32>23func.func @poison_complex() -> complex<f32> {24 %0 = ub.poison : complex<f32>25 return %0 : complex<f32>26}27 28// CHECK-LABEL: func @poison_vec()29// CHECK: %{{.*}} = ub.poison : vector<4xi64>30func.func @poison_vec() -> vector<4xi64> {31 %0 = ub.poison : vector<4xi64>32 return %0 : vector<4xi64>33}34 35// CHECK-LABEL: func @poison_tensor()36// CHECK: %{{.*}} = ub.poison : tensor<8x?xf64>37func.func @poison_tensor() -> tensor<8x?xf64> {38 %0 = ub.poison : tensor<8x?xf64>39 return %0 : tensor<8x?xf64>40}41 42// CHECK-LABEL: func @unreachable()43// CHECK: ub.unreachable44func.func @unreachable() {45 ub.unreachable46}47