brintos

brintos / llvm-project-archived public Read only

0
0
Text · 577 B · eff7876 Raw
15 lines · plain
1// RUN: mlir-translate -mlir-to-cpp %s | FileCheck %s -check-prefix=CPP-DEFAULT2// RUN: mlir-translate -mlir-to-cpp -declare-variables-at-top %s | FileCheck %s -check-prefix=CPP-DECLTOP3 4func.func @emitc_literal(%arg0: f32) {5  %p0 = emitc.literal "M_PI" : f326  %1 = "emitc.add" (%arg0, %p0) : (f32, f32) -> f327  return8}9// CPP-DEFAULT: void emitc_literal(float [[V0:[^ ]*]]) {10// CPP-DEFAULT: float [[V2:[^ ]*]] = [[V0:[^ ]*]] + M_PI11 12// CPP-DECLTOP: void emitc_literal(float [[V0:[^ ]*]]) {13// CPP-DECLTOP: float [[V1:[^ ]*]];14// CPP-DECLTOP: [[V1]] = [[V0:[^ ]*]] + M_PI15