brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 3bd724f Raw
44 lines · plain
1// RUN: mlir-translate -mlir-to-llvmir %s2 3module attributes {omp.is_target_device = false} {4  llvm.func @main() {5    %0 = llvm.mlir.constant(1 : i64) : i646    %1 = llvm.alloca %0 x f32 : (i64) -> !llvm.ptr7    %3 = llvm.alloca %0 x i32 : (i64) -> !llvm.ptr8    %6 = omp.map.info var_ptr(%1 : !llvm.ptr, f32) map_clauses(tofrom) capture(ByRef) -> !llvm.ptr9    %7 = omp.map.info var_ptr(%3 : !llvm.ptr, i32) map_clauses(implicit, exit_release_or_enter_alloc) capture(ByCopy) -> !llvm.ptr10    omp.target nowait map_entries(%6 -> %arg0, %7 -> %arg1 : !llvm.ptr, !llvm.ptr) {11      %8 = llvm.mlir.constant(0 : i64) : i6412      %9 = llvm.mlir.constant(100 : i32) : i3213      llvm.br ^bb1(%9, %8 : i32, i64)14    ^bb1(%13: i32, %14: i64):  // 2 preds: ^bb0, ^bb215      %15 = llvm.icmp "sgt" %14, %8 : i6416      llvm.cond_br %15, ^bb2, ^bb317    ^bb2:  // pred: ^bb118      llvm.store %13, %arg1 : i32, !llvm.ptr19      llvm.br ^bb1(%13, %14 : i32, i64)20    ^bb3:  // pred: ^bb121      llvm.store %13, %arg1 : i32, !llvm.ptr22      omp.terminator23    } loc(#loc3)24    llvm.return25  } loc(#loc2)26}27 28#file = #llvm.di_file<"test.f90" in "">29#di_null_type = #llvm.di_null_type30#cu = #llvm.di_compile_unit<id = distinct[0]<>,31 sourceLanguage = DW_LANG_Fortran95, file = #file, isOptimized = false,32 emissionKind = Full>33#sp_ty = #llvm.di_subroutine_type<callingConvention = DW_CC_program,34 types = #di_null_type>35#sp = #llvm.di_subprogram<compileUnit = #cu, name = "main", file=#file,36 subprogramFlags = "Definition", type = #sp_ty>37#sp1 = #llvm.di_subprogram<compileUnit = #cu, name = "target", file=#file,38 subprogramFlags = "Definition", type = #sp_ty>39 40#loc1 = loc("test.f90":6:7)41#loc2 = loc(fused<#sp>[#loc1])42#loc3 = loc(fused<#sp1>[#loc1])43 44