1 // RUN: mlir-opt %s -convert-cf-to-llvm | FileCheck %s
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=cf" --split-input-file %s | FileCheck %s
8 %a = arith.constant 0 : i1
9 cf.assert %a, "assertion foo"
13 // CHECK: llvm.func @puts(!llvm.ptr)
16 // CHECK: llvm.cond_br %{{.*}}, ^{{.*}}, ^[[FALSE_BRANCH:[[:alnum:]]+]]
18 // CHECK: ^[[FALSE_BRANCH]]:
19 // CHECK: %[[ADDRESS_OF:.*]] = llvm.mlir.addressof @{{.*}} : !llvm.ptr{{$}}
20 // CHECK: %[[GEP:.*]] = llvm.getelementptr %[[ADDRESS_OF]][0] : (!llvm.ptr) -> !llvm.ptr, !llvm.array<{{[0-9]+}} x i8>
21 // CHECK: llvm.call @puts(%[[GEP]]) : (!llvm.ptr) -> ()