brintos

brintos / llvm-project-archived public Read only

0
0
Text · 901 B · 0fe63f5 Raw
26 lines · plain
1// RUN: mlir-opt -pass-pipeline="builtin.module(func.func(convert-ub-to-llvm))" %s -split-input-file | FileCheck %s2 3// Same below, but using the `ConvertToLLVMPatternInterface` entry point4// and the generic `convert-to-llvm` pass.5// RUN: mlir-opt --convert-to-llvm="filter-dialects=ub" --split-input-file %s | FileCheck %s6// RUN: mlir-opt --convert-to-llvm="filter-dialects=ub allow-pattern-rollback=0" --split-input-file %s | FileCheck %s7 8// CHECK-LABEL: @check_poison9func.func @check_poison() {10// CHECK: {{.*}} = llvm.mlir.poison : i6411  %0 = ub.poison : index12// CHECK: {{.*}} = llvm.mlir.poison : i1613  %1 = ub.poison : i1614// CHECK: {{.*}} = llvm.mlir.poison : f6415  %2 = ub.poison : f6416// CHECK: {{.*}} = llvm.mlir.poison : !llvm.ptr17  %3 = ub.poison : !llvm.ptr18  return19}20 21// CHECK-LABEL: @check_unrechable22func.func @check_unrechable() {23// CHECK: llvm.unreachable24  ub.unreachable25}26