xref: /llvm-project/mlir/test/Target/Cpp/conditional.mlir (revision 19266ca389e3fc3bce9d24c074b836d6e69873ce)
1// RUN: mlir-translate -mlir-to-cpp %s | FileCheck %s
2
3func.func @cond(%cond: i1, %arg0: i32, %arg1: i32) -> () {
4  %0 = emitc.conditional %cond, %arg0, %arg1 : i32
5  return
6}
7
8// CHECK-LABEL: void cond
9// CHECK-NEXT:  int32_t [[V3:[^ ]*]] = [[V0:[^ ]*]] ? [[V1:[^ ]*]] : [[V2:[^ ]*]];
10