brintos

brintos / llvm-project-archived public Read only

0
0
Text · 588 B · 7e934c9 Raw
22 lines · plain
1// Test tco's -emit-final-mlir option.2 3// RUN: tco -emit-final-mlir %s 2>&1 | FileCheck %s4 5// Check that the FIR file is translated into the LLVM IR6// MLIR dialect, but not into LLVM IR itself.7 8// CHECK-NOT: func.func9// CHECK-LABEL: llvm.func @_QPfoo()10// CHECK-NOT: fir.alloca11// CHECK: %[[VAL_0:.*]] = llvm.mlir.constant(1 : i64) : i6412// CHECK: %[[VAL_1:.*]] = llvm.alloca %[[VAL_0]] x i32 : (i64) -> !llvm.ptr13// CHECK: llvm.return14// CHECK-NOT: func.func15 16func.func @_QPfoo() {17  %1 = fir.alloca i3218  %0 = arith.constant 0 : i3219  fir.store %0 to %1 : !fir.ref<i32>20  return21}22