xref: /llvm-project/mlir/test/Conversion/UBToLLVM/ub-to-llvm.mlir (revision a8599ac242e2d08c3eb157ab9331d7a32c3483b0)
1// RUN: mlir-opt -pass-pipeline="builtin.module(func.func(convert-ub-to-llvm))" %s -split-input-file | FileCheck %s
2
3// Same below, but using the `ConvertToLLVMPatternInterface` entry point
4// and the generic `convert-to-llvm` pass.
5// RUN: mlir-opt --convert-to-llvm="filter-dialects=ub" --split-input-file %s | FileCheck %s
6
7// CHECK-LABEL: @check_poison
8func.func @check_poison() {
9// CHECK: {{.*}} = llvm.mlir.poison : i64
10  %0 = ub.poison : index
11// CHECK: {{.*}} = llvm.mlir.poison : i16
12  %1 = ub.poison : i16
13// CHECK: {{.*}} = llvm.mlir.poison : f64
14  %2 = ub.poison : f64
15// CHECK: {{.*}} = llvm.mlir.poison : !llvm.ptr
16  %3 = ub.poison : !llvm.ptr
17  return
18}
19