File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -9720,6 +9720,17 @@ static void emitTargetCallKernelLaunch(
97209720 ++RedVarCount;
97219721 }
97229722 }
9723+ // Process debug info.
9724+ if (CGF.CGM.getCodeGenOpts().getDebugInfo() !=
9725+ llvm::codegenoptions::NoDebugInfo) {
9726+ auto FillInfoMap = [&](MappableExprsHandler::MappingExprInfo &MapExpr) {
9727+ return emitMappingInformation(CGF, OMPBuilder, MapExpr);
9728+ };
9729+
9730+ CombinedInfo.Names.resize(CombinedInfo.Exprs.size());
9731+ llvm::transform(CombinedInfo.Exprs, CombinedInfo.Names.begin(),
9732+ FillInfoMap);
9733+ }
97239734 }
97249735
97259736 CGOpenMPRuntime::TargetDataInfo Info;
Original file line number Diff line number Diff line change 1+ // RUN: %clang -g %s -fopenmp --offload-arch=gfx90a -S --offload-host-only -emit-llvm -o - | FileCheck %s
2+
3+ void test_xteam_red_debug_info () {
4+ int N = 100000 ;
5+ double c [N ];
6+ double sum = 0.0 ;
7+ #pragma omp target teams distribute parallel for reduction(+: sum)
8+ for (int i = 0 ; i < N ; i ++ ){
9+ sum += c [i ];
10+ }
11+ sum = sum /(double )N ;
12+ }
13+
14+ // CHECK: @.offload_sizes = private unnamed_addr constant [6 x i64]
15+ // CHECK-NEXT: @.offload_maptypes = private unnamed_addr constant [6 x i64]
16+ // CHECK-NEXT: @.offload_mapnames = private constant [6 x ptr]
You can’t perform that action at this time.
0 commit comments