11bb48c44SGil Rapaport// RUN: mlir-translate -mlir-to-cpp %s | FileCheck %s -check-prefix=CPP-DEFAULT 21bb48c44SGil Rapaport// RUN: mlir-translate -mlir-to-cpp -declare-variables-at-top %s | FileCheck %s -check-prefix=CPP-DECLTOP 31bb48c44SGil Rapaport 41bb48c44SGil Rapaportfunc.func @emitc_call_operand() { 51bb48c44SGil Rapaport %p0 = emitc.literal "M_PI" : f32 6*c4fd1fd6SMarius Brehler %1 = emitc.call_opaque "foo"(%p0) : (f32) -> f32 71bb48c44SGil Rapaport return 81bb48c44SGil Rapaport} 91bb48c44SGil Rapaport// CPP-DEFAULT: void emitc_call_operand() { 101bb48c44SGil Rapaport// CPP-DEFAULT-NEXT: float v1 = foo(M_PI); 111bb48c44SGil Rapaport 121bb48c44SGil Rapaport// CPP-DECLTOP: void emitc_call_operand() { 131bb48c44SGil Rapaport// CPP-DECLTOP-NEXT: float v1; 141bb48c44SGil Rapaport// CPP-DECLTOP-NEXT: v1 = foo(M_PI); 1568b071d9SSimon Camphausen 1668b071d9SSimon Camphausenfunc.func @emitc_call_operand_arg() { 1768b071d9SSimon Camphausen %p0 = emitc.literal "M_PI" : f32 18*c4fd1fd6SMarius Brehler %1 = emitc.call_opaque "bar"(%p0) {args = [42 : i32, 0 : index]} : (f32) -> f32 1968b071d9SSimon Camphausen return 2068b071d9SSimon Camphausen} 2168b071d9SSimon Camphausen// CPP-DEFAULT: void emitc_call_operand_arg() { 2268b071d9SSimon Camphausen// CPP-DEFAULT-NEXT: float v1 = bar(42, M_PI); 2368b071d9SSimon Camphausen 2468b071d9SSimon Camphausen// CPP-DECLTOP: void emitc_call_operand_arg() { 2568b071d9SSimon Camphausen// CPP-DECLTOP-NEXT: float v1; 2668b071d9SSimon Camphausen// CPP-DECLTOP-NEXT: v1 = bar(42, M_PI); 27