llvm-project/clang/test/OpenMP/omp_with_loop_pragma_instr_profile.c
Itay Bookstein 782c59a4ee [OpenMP] Prefix outlined and reduction func names with original func's name
This patch prefixes omp outlined helpers and reduction funcs
with the original function's name.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D140722
2023-04-19 23:00:26 +03:00

23 lines
762 B
C

// RUN: %clang_cc1 -verify -fopenmp -x c -emit-llvm %s -triple x86_64-unknown-linux -o - -femit-all-decls -disable-llvm-passes -fprofile-instrument=clang | FileCheck %s
// expected-no-diagnostics
void sub(double *restrict a, double *restrict b, int n) {
int i;
#pragma omp parallel for
#pragma clang loop vectorize(disable)
for (i = 0; i < n; i++) {
a[i] = a[i] + b[i];
}
}
// CHECK-LABEL: @sub.omp_outlined(
// CHECK-NEXT: entry:
// CHECK: call void @llvm.instrprof.increment(
// CHECK: omp.precond.then:
// CHECK-NEXT: call void @llvm.instrprof.increment(
// CHECK: cond.true:
// CHECK-NEXT: call void @llvm.instrprof.increment(
// CHECK: omp.inner.for.body:
// CHECK-NEXT: call void @llvm.instrprof.increment(