summaryrefslogtreecommitdiffstats
path: root/mlir/test/Target/Cpp/conditional.mlir
blob: 2470fbeb33adaec99fbaf46b2788182c9015a254 (plain)
1
2
3
4
5
6
7
8
9
// RUN: mlir-translate -mlir-to-cpp %s | FileCheck %s

func.func @cond(%cond: i1, %arg0: i32, %arg1: i32) -> () {
  %0 = emitc.conditional %cond, %arg0, %arg1 : i32
  return
}

// CHECK-LABEL: void cond
// CHECK-NEXT:  int32_t [[V3:[^ ]*]] = [[V0:[^ ]*]] ? [[V1:[^ ]*]] : [[V2:[^ ]*]];