// RUN: cir-opt %s --cir-to-llvm | FileCheck %s // Verify that OpenMP operations have their CIR types properly converted to // LLVM types during CIR-to-LLVM lowering. Without the OpenMP-to-LLVM // conversion patterns, this would fail with unrealized_conversion_cast errors. !s32i = !cir.int module { // CHECK-LABEL: llvm.func @target_map_from cir.func @target_map_from(%arg0 : !s32i) { %0 = cir.alloca !s32i, !cir.ptr, ["x", init] {alignment = 4 : i64} cir.store %arg0, %0 : !s32i, !cir.ptr // CHECK: %[[ALLOCA:.*]] = llvm.alloca {{.*}} x i32 // CHECK: %[[MAP:.*]] = omp.map.info var_ptr(%[[ALLOCA]] : !llvm.ptr, i32) map_clauses(from) capture(ByRef) -> !llvm.ptr {name = "x"} %1 = omp.map.info var_ptr(%0 : !cir.ptr, !s32i) map_clauses(from) capture(ByRef) -> !cir.ptr {name = "x"} // CHECK: omp.target map_entries(%[[MAP]] -> %[[ARG:.*]] : !llvm.ptr) omp.target map_entries(%1 -> %arg1 : !cir.ptr) { // CHECK: %[[C10:.*]] = llvm.mlir.constant(10 : i32) : i32 // CHECK: llvm.store %[[C10]], %[[ARG]] %c10 = cir.const #cir.int<10> : !s32i cir.store %c10, %arg1 : !s32i, !cir.ptr // CHECK: omp.terminator omp.terminator } cir.return } }