24 lines · plain
1// Test that the target_features and target_cpu llvm.func attributes are2// forwarded to outlined target region functions.3 4// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s5 6module attributes {omp.is_target_device = false} {7 llvm.func @omp_target_region() attributes {8 target_cpu = "x86-64",9 target_features = #llvm.target_features<["+mmx", "+sse"]>10 } {11 omp.target {12 omp.terminator13 }14 llvm.return15 }16}17 18// CHECK: define void @omp_target_region() #[[ATTRS:.*]] {19// CHECK: define internal void @__omp_offloading_{{.*}}_omp_target_region_{{.*}}() #[[ATTRS]] {20 21// CHECK: attributes #[[ATTRS]] = {22// CHECK-SAME: "target-cpu"="x86-64"23// CHECK-SAME: "target-features"="+mmx,+sse"24