Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions clang/test/OpenMP/cancel_codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,7 @@ for (int i = 0; i < argc; ++i) {
// CHECK3-NEXT: store ptr [[ARGV_ADDR]], ptr [[GEP_ARGV_ADDR]], align 8
// CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @main..omp_par, ptr [[STRUCTARG]])
// CHECK3-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
// CHECK3: omp.par.outlined.exit:
// CHECK3-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
// CHECK3: omp.par.exit.split:
// CHECK3: omp.par.exit:
// CHECK3-NEXT: br label [[OMP_SECTION_LOOP_PREHEADER:%.*]]
// CHECK3: omp_section_loop.preheader:
// CHECK3-NEXT: store i32 0, ptr [[P_LOWERBOUND]], align 4
Expand Down Expand Up @@ -998,7 +996,7 @@ for (int i = 0; i < argc; ++i) {
// CHECK3-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB]]
// CHECK3: .split:
// CHECK3-NEXT: br label [[TMP4]]
// CHECK3: omp.par.outlined.exit.exitStub:
// CHECK3: omp.par.exit.exitStub:
// CHECK3-NEXT: ret void
//
//
Expand Down
18 changes: 7 additions & 11 deletions clang/test/OpenMP/irbuilder_nested_openmp_parallel_empty.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
// ALL-NEXT: br label [[OMP_PARALLEL:%.*]]
// ALL: omp_parallel:
// ALL-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 0, ptr @_Z17nested_parallel_0v..omp_par.1)
// ALL-NEXT: br label [[OMP_PAR_OUTLINED_EXIT12:%.*]]
// ALL: omp.par.outlined.exit12:
// ALL-NEXT: br label [[OMP_PAR_EXIT:%.*]]
// ALL: omp.par.exit7:
// ALL-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
// ALL: omp.par.exit.split:
// ALL: omp.par.exit.exitStub:
// ALL-NEXT: ret void
//
void nested_parallel_0(void) {
Expand Down Expand Up @@ -50,10 +50,8 @@ void nested_parallel_0(void) {
// ALL-NEXT: [[GEP_R_ADDR17:%.*]] = getelementptr { ptr, ptr, ptr }, ptr [[STRUCTARG14]], i32 0, i32 2
// ALL-NEXT: store ptr [[R_ADDR]], ptr [[GEP_R_ADDR17]], align 8
// ALL-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @_Z17nested_parallel_1Pfid..omp_par.2, ptr [[STRUCTARG14]])
// ALL-NEXT: br label [[OMP_PAR_OUTLINED_EXIT13:%.*]]
// ALL: omp.par.outlined.exit13:
// ALL-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
// ALL: omp.par.exit.split:
// ALL-NEXT: br label [[OMP_PAR_EXIT:%.*]]
// ALL: omp.par.exit:
// ALL-NEXT: ret void
//
void nested_parallel_1(float *r, int a, double b) {
Expand Down Expand Up @@ -85,10 +83,8 @@ void nested_parallel_1(float *r, int a, double b) {
// ALL-NEXT: [[GEP_R_ADDR:%.*]] = getelementptr { ptr, ptr, ptr }, ptr [[STRUCTARG]], i32 0, i32 2
// ALL-NEXT: store ptr [[R_ADDR]], ptr [[GEP_R_ADDR]], align 8
// ALL-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @_Z17nested_parallel_2Pfid..omp_par.5, ptr [[STRUCTARG]])
// ALL-NEXT: br label [[OMP_PAR_OUTLINED_EXIT55:%.*]]
// ALL: omp.par.outlined.exit55:
// ALL-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
// ALL: omp.par.exit.split:
// ALL-NEXT: br label [[OMP_PAR_EXIT:%.*]]
// ALL: omp.par.exit:
// ALL-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
// ALL-NEXT: [[CONV56:%.*]] = sitofp i32 [[TMP0]] to double
// ALL-NEXT: [[TMP1:%.*]] = load double, ptr [[B_ADDR]], align 8
Expand Down
188 changes: 80 additions & 108 deletions clang/test/OpenMP/irbuilder_nested_parallel_for.c

Large diffs are not rendered by default.

26 changes: 9 additions & 17 deletions clang/test/OpenMP/nested_loop_codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,8 @@ int inline_decl() {
// CHECK3-NEXT: [[GEP_K:%.*]] = getelementptr { ptr, ptr }, ptr [[STRUCTARG]], i32 0, i32 1
// CHECK3-NEXT: store ptr [[K]], ptr [[GEP_K]], align 8
// CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @_Z12outline_declv..omp_par, ptr [[STRUCTARG]])
// CHECK3-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
// CHECK3: omp.par.outlined.exit:
// CHECK3-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
// CHECK3: omp.par.exit.split:
// CHECK3-NEXT: br label [[OMP_PAR_EXIT:%.*]]
// CHECK3: omp.par.exit:
// CHECK3-NEXT: [[TMP0:%.*]] = load i32, ptr [[K]], align 4
// CHECK3-NEXT: ret i32 [[TMP0]]
//
Expand Down Expand Up @@ -620,7 +618,7 @@ int inline_decl() {
// CHECK3: omp_loop.inc:
// CHECK3-NEXT: [[OMP_LOOP_NEXT]] = add nuw i32 [[OMP_LOOP_IV]], 1
// CHECK3-NEXT: br label [[OMP_LOOP_HEADER]]
// CHECK3: omp.par.outlined.exit.exitStub:
// CHECK3: omp.par.exit.exitStub:
// CHECK3-NEXT: ret void
//
//
Expand Down Expand Up @@ -699,9 +697,7 @@ int inline_decl() {
// CHECK3-NEXT: store ptr [[RES]], ptr [[GEP_RES]], align 8
// CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @_Z11inline_declv..omp_par, ptr [[STRUCTARG]])
// CHECK3-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
// CHECK3: omp.par.outlined.exit:
// CHECK3-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
// CHECK3: omp.par.exit.split:
// CHECK3: omp.par.exit:
// CHECK3-NEXT: [[TMP0:%.*]] = load i32, ptr [[RES]], align 4
// CHECK3-NEXT: ret i32 [[TMP0]]
//
Expand Down Expand Up @@ -789,7 +785,7 @@ int inline_decl() {
// CHECK3: omp_loop.inc:
// CHECK3-NEXT: [[OMP_LOOP_NEXT]] = add nuw i32 [[OMP_LOOP_IV]], 1
// CHECK3-NEXT: br label [[OMP_LOOP_HEADER]]
// CHECK3: omp.par.outlined.exit.exitStub:
// CHECK3: omp.par.exit.exitStub:
// CHECK3-NEXT: ret void
//
//
Expand Down Expand Up @@ -870,9 +866,7 @@ int inline_decl() {
// CHECK4-NEXT: store ptr [[K]], ptr [[GEP_K]], align 8
// CHECK4-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @_Z12outline_declv..omp_par, ptr [[STRUCTARG]]), !dbg [[DBG18:![0-9]+]]
// CHECK4-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
// CHECK4: omp.par.outlined.exit:
// CHECK4-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
// CHECK4: omp.par.exit.split:
// CHECK4: omp.par.exit:
// CHECK4-NEXT: [[TMP0:%.*]] = load i32, ptr [[K]], align 4, !dbg [[DBG20:![0-9]+]]
// CHECK4-NEXT: ret i32 [[TMP0]], !dbg [[DBG20]]
//
Expand Down Expand Up @@ -959,7 +953,7 @@ int inline_decl() {
// CHECK4: omp_loop.inc:
// CHECK4-NEXT: [[OMP_LOOP_NEXT]] = add nuw i32 [[OMP_LOOP_IV]], 1, !dbg [[DBG28]]
// CHECK4-NEXT: br label [[OMP_LOOP_HEADER]], !dbg [[DBG28]]
// CHECK4: omp.par.outlined.exit.exitStub:
// CHECK4: omp.par.exit.exitStub:
// CHECK4-NEXT: ret void
//
//
Expand Down Expand Up @@ -1048,9 +1042,7 @@ int inline_decl() {
// CHECK4-NEXT: store ptr [[RES]], ptr [[GEP_RES]], align 8
// CHECK4-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB6]], i32 1, ptr @_Z11inline_declv..omp_par, ptr [[STRUCTARG]]), !dbg [[DBG82:![0-9]+]]
// CHECK4-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
// CHECK4: omp.par.outlined.exit:
// CHECK4-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
// CHECK4: omp.par.exit.split:
// CHECK4: omp.par.exit:
// CHECK4-NEXT: [[TMP0:%.*]] = load i32, ptr [[RES]], align 4, !dbg [[DBG84:![0-9]+]]
// CHECK4-NEXT: ret i32 [[TMP0]], !dbg [[DBG84]]
//
Expand Down Expand Up @@ -1139,7 +1131,7 @@ int inline_decl() {
// CHECK4: omp_loop.inc:
// CHECK4-NEXT: [[OMP_LOOP_NEXT]] = add nuw i32 [[OMP_LOOP_IV]], 1, !dbg [[META95]]
// CHECK4-NEXT: br label [[OMP_LOOP_HEADER]], !dbg [[META95]]
// CHECK4: omp.par.outlined.exit.exitStub:
// CHECK4: omp.par.exit.exitStub:
// CHECK4-NEXT: ret void
//
//
Expand Down
24 changes: 8 additions & 16 deletions clang/test/OpenMP/parallel_codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,7 @@ int main (int argc, char **argv) {
// CHECK3-NEXT: store ptr [[VLA]], ptr [[GEP_VLA]], align 8
// CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @main..omp_par, ptr [[STRUCTARG]])
// CHECK3-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
// CHECK3: omp.par.outlined.exit:
// CHECK3-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
// CHECK3: omp.par.exit.split:
// CHECK3: omp.par.exit:
// CHECK3-NEXT: [[TMP3:%.*]] = load ptr, ptr [[ARGV_ADDR]], align 8
// CHECK3-NEXT: [[CALL:%.*]] = call noundef i32 @_Z5tmainIPPcEiT_(ptr noundef [[TMP3]])
// CHECK3-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
Expand Down Expand Up @@ -770,7 +768,7 @@ int main (int argc, char **argv) {
// CHECK3-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
// CHECK3: omp.par.pre_finalize:
// CHECK3-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
// CHECK3: omp.par.outlined.exit.exitStub:
// CHECK3: omp.par.exit.exitStub:
// CHECK3-NEXT: ret void
//
//
Expand Down Expand Up @@ -805,9 +803,7 @@ int main (int argc, char **argv) {
// CHECK3-NEXT: store ptr [[ARGC_ADDR]], ptr [[GEP_ARGC_ADDR]], align 8
// CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @_Z5tmainIPPcEiT_..omp_par, ptr [[STRUCTARG]])
// CHECK3-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
// CHECK3: omp.par.outlined.exit:
// CHECK3-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
// CHECK3: omp.par.exit.split:
// CHECK3: omp.par.exit:
// CHECK3-NEXT: ret i32 0
//
//
Expand Down Expand Up @@ -837,7 +833,7 @@ int main (int argc, char **argv) {
// CHECK3-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
// CHECK3: omp.par.pre_finalize:
// CHECK3-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
// CHECK3: omp.par.outlined.exit.exitStub:
// CHECK3: omp.par.exit.exitStub:
// CHECK3-NEXT: ret void
//
//
Expand Down Expand Up @@ -878,9 +874,7 @@ int main (int argc, char **argv) {
// CHECK4-NEXT: store ptr [[VLA]], ptr [[GEP_VLA]], align 8
// CHECK4-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @main..omp_par, ptr [[STRUCTARG]]), !dbg [[DBG30:![0-9]+]]
// CHECK4-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
// CHECK4: omp.par.outlined.exit:
// CHECK4-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
// CHECK4: omp.par.exit.split:
// CHECK4: omp.par.exit:
// CHECK4-NEXT: [[TMP3:%.*]] = load ptr, ptr [[ARGV_ADDR]], align 8, !dbg [[DBG31:![0-9]+]]
// CHECK4-NEXT: [[CALL:%.*]] = call noundef i32 @_Z5tmainIPPcEiT_(ptr noundef [[TMP3]]), !dbg [[DBG31]]
// CHECK4-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4, !dbg [[DBG31]]
Expand Down Expand Up @@ -912,7 +906,7 @@ int main (int argc, char **argv) {
// CHECK4-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
// CHECK4: omp.par.pre_finalize:
// CHECK4-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]], !dbg [[DBG35]]
// CHECK4: omp.par.outlined.exit.exitStub:
// CHECK4: omp.par.exit.exitStub:
// CHECK4-NEXT: ret void
//
//
Expand Down Expand Up @@ -949,9 +943,7 @@ int main (int argc, char **argv) {
// CHECK4-NEXT: store ptr [[ARGC_ADDR]], ptr [[GEP_ARGC_ADDR]], align 8
// CHECK4-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 1, ptr @_Z5tmainIPPcEiT_..omp_par, ptr [[STRUCTARG]]), !dbg [[DBG52:![0-9]+]]
// CHECK4-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
// CHECK4: omp.par.outlined.exit:
// CHECK4-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
// CHECK4: omp.par.exit.split:
// CHECK4: omp.par.exit:
// CHECK4-NEXT: ret i32 0, !dbg [[DBG54:![0-9]+]]
//
//
Expand Down Expand Up @@ -982,7 +974,7 @@ int main (int argc, char **argv) {
// CHECK4-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
// CHECK4: omp.par.pre_finalize:
// CHECK4-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]], !dbg [[DBG66]]
// CHECK4: omp.par.outlined.exit.exitStub:
// CHECK4: omp.par.exit.exitStub:
// CHECK4-NEXT: ret void
//
//
Expand Down
6 changes: 2 additions & 4 deletions clang/test/OpenMP/taskgroup_codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ void parallel_taskgroup() {
// CHECK2: omp_parallel:
// CHECK2-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 0, ptr @_Z18parallel_taskgroupv..omp_par)
// CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
// CHECK2: omp.par.outlined.exit:
// CHECK2-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
// CHECK2: omp.par.exit.split:
// CHECK2: omp.par.exit:
// CHECK2-NEXT: ret void
//
//
Expand All @@ -250,6 +248,6 @@ void parallel_taskgroup() {
// CHECK2-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
// CHECK2: omp.par.pre_finalize:
// CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
// CHECK2: omp.par.outlined.exit.exitStub:
// CHECK2: omp.par.exit.exitStub:
// CHECK2-NEXT: ret void
//
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,5 @@ subroutine worst_case(a, b, c, d)
! [var extent was non-zero: malloc a private array]
! CHECK: br label %omp.private.init5

! CHECK: omp.par.outlined.exit.exitStub: ; preds = %omp.region.cont52
! CHECK: omp.par.exit.exitStub: ; preds = %omp.region.cont52
! CHECK-NEXT: ret void
8 changes: 0 additions & 8 deletions llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1602,14 +1602,6 @@ OpenMPIRBuilder::InsertPointOrErrorTy OpenMPIRBuilder::createParallel(
SmallVector<BasicBlock *, 32> Blocks;
OI.collectBlocks(ParallelRegionBlockSet, Blocks);

// Ensure a single exit node for the outlined region by creating one.
// We might have multiple incoming edges to the exit now due to finalizations,
// e.g., cancel calls that cause the control flow to leave the region.
BasicBlock *PRegOutlinedExitBB = PRegExitBB;
PRegExitBB = SplitBlock(PRegExitBB, &*PRegExitBB->getFirstInsertionPt());
PRegOutlinedExitBB->setName("omp.par.outlined.exit");
Blocks.push_back(PRegOutlinedExitBB);

CodeExtractorAnalysisCache CEAC(*OuterFn);
CodeExtractor Extractor(Blocks, /* DominatorTree */ nullptr,
/* AggregateArgs */ false,
Expand Down
4 changes: 1 addition & 3 deletions mlir/test/Target/LLVMIR/openmp-llvm.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,12 @@ llvm.func @test_omp_parallel_if_1(%arg0: i32) -> () {
// CHECK: %[[I32_IF_COND_VAR_1:.*]] = sext i1 %[[IF_COND_VAR_1]] to i32
// CHECK: call void @__kmpc_fork_call_if(ptr @[[SI_VAR_IF_1]], i32 0, ptr @[[OMP_OUTLINED_FN_IF_1:.*]], i32 %[[I32_IF_COND_VAR_1]], ptr null)
// CHECK: br label %[[OUTLINED_EXIT_IF_1:.*]]
// CHECK: [[OUTLINED_EXIT_IF_1]]:
// CHECK: br label %[[RETURN_BLOCK_IF_1:.*]]
omp.parallel if(%1) {
omp.barrier
omp.terminator
}

// CHECK: [[RETURN_BLOCK_IF_1]]:
// CHECK: [[OUTLINED_EXIT_IF_1]]:
// CHECK: ret void
llvm.return
}
Expand Down
44 changes: 44 additions & 0 deletions mlir/test/Target/LLVMIR/openmp-outline-infinite-loop.mlir
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s

// Test that trying to outline an infinite loop doesn't lead to an assertion
// failure.

llvm.func @parallel_infinite_loop() -> () {
omp.parallel {
llvm.br ^bb1
^bb1:
llvm.br ^bb1
}
llvm.return
}

// CHECK-LABEL: define void @parallel_infinite_loop() {
// CHECK: %[[VAL_2:.*]] = call i32 @__kmpc_global_thread_num(ptr @1)
// CHECK: br label %[[VAL_3:.*]]
// CHECK: omp_parallel:
// CHECK: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @1, i32 0, ptr @parallel_infinite_loop..omp_par)
// CHECK: unreachable
// CHECK: omp.region.cont: ; No predecessors!
// CHECK: br label %[[VAL_4:.*]]
// CHECK: omp.par.pre_finalize: ; preds = %[[VAL_5:.*]]
// CHECK: br label %[[VAL_6:.*]]
// CHECK: omp.par.exit: ; preds = %[[VAL_4]]
// CHECK: ret void
// CHECK: }

// CHECK-LABEL: define internal void @parallel_infinite_loop..omp_par(
// CHECK-SAME: ptr noalias %[[TID_ADDR:.*]], ptr noalias %[[ZERO_ADDR:.*]])
// CHECK: omp.par.entry:
// CHECK: %[[VAL_7:.*]] = alloca i32, align 4
// CHECK: %[[VAL_8:.*]] = load i32, ptr %[[VAL_9:.*]], align 4
// CHECK: store i32 %[[VAL_8]], ptr %[[VAL_7]], align 4
// CHECK: %[[VAL_10:.*]] = load i32, ptr %[[VAL_7]], align 4
// CHECK: br label %[[VAL_11:.*]]
// CHECK: omp.region.after_alloca: ; preds = %[[VAL_12:.*]]
// CHECK: br label %[[VAL_13:.*]]
// CHECK: omp.par.region: ; preds = %[[VAL_11]]
// CHECK: br label %[[VAL_14:.*]]
// CHECK: omp.par.region1: ; preds = %[[VAL_13]]
// CHECK: br label %[[VAL_15:.*]]
// CHECK: omp.par.region2: ; preds = %[[VAL_15]], %[[VAL_14]]
// CHECK: br label %[[VAL_15]]
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ llvm.func @missordered_blocks_(%arg0: !llvm.ptr {fir.bindc_name = "x"}, %arg1: !
// CHECK: store ptr %[[VAL_8:.*]], ptr %[[VAL_7]], align 8
// CHECK: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @1, i32 1, ptr @missordered_blocks_..omp_par, ptr %[[VAL_0]])
// CHECK: br label %[[VAL_9:.*]]
// CHECK: omp.par.outlined.exit: ; preds = %[[VAL_4]]
// CHECK: br label %[[VAL_10:.*]]
// CHECK: omp.par.exit.split: ; preds = %[[VAL_9]]
// CHECK: omp.par.exit: ; preds = %[[VAL_4]]
// CHECK: ret void
// CHECK: [[PAR_ENTRY:omp.par.entry]]:
// CHECK: %[[VAL_11:.*]] = getelementptr { ptr, ptr }, ptr %[[VAL_12:.*]], i32 0, i32 0
Expand Down Expand Up @@ -117,5 +115,5 @@ llvm.func @missordered_blocks_(%arg0: !llvm.ptr {fir.bindc_name = "x"}, %arg1: !
// CHECK: br label %[[VAL_38]]
// CHECK: omp.reduction.neutral1: ; preds = %[[VAL_25]]
// CHECK: br label %[[VAL_30]]
// CHECK: omp.par.outlined.exit.exitStub: ; preds = %[[VAL_53]]
// CHECK: omp.par.exit.exitStub: ; preds = %[[VAL_53]]
// CHECK: ret void
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,5 @@ llvm.func @sectionsreduction_(%arg0: !llvm.ptr {fir.bindc_name = "x"}) attribute
// CHECK: omp_section_loop.inc: ; preds = %[[VAL_69]]
// CHECK: %[[VAL_31]] = add nuw i32 %[[VAL_30]], 1
// CHECK: br label %[[VAL_28]]
// CHECK: omp.par.outlined.exit.exitStub: ; preds = %[[VAL_64]]
// CHECK: omp.par.exit.exitStub: ; preds = %[[VAL_64]]
// CHECK: ret void
6 changes: 2 additions & 4 deletions mlir/test/Target/LLVMIR/openmp-reduction-init-arg.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ module {
// CHECK: store ptr %[[VAL_2]], ptr %[[VAL_8]], align 8
// CHECK: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @1, i32 1, ptr @_QFPreduce..omp_par, ptr %[[VAL_0]])
// CHECK: br label %[[VAL_9:.*]]
// CHECK: omp.par.outlined.exit: ; preds = %[[VAL_6]]
// CHECK: br label %[[VAL_10:.*]]
// CHECK: omp.par.exit.split: ; preds = %[[VAL_9]]
// CHECK: omp.par.exit: ; preds = %[[VAL_6]]
// CHECK: ret void
// CHECK: [[PAR_ENTRY:omp.par.entry]]:
// CHECK: %[[VAL_11:.*]] = getelementptr { ptr, ptr }, ptr %[[VAL_12:.*]], i32 0, i32 0
Expand Down Expand Up @@ -99,7 +97,7 @@ module {
// CHECK: br label %[[VAL_38:.*]]
// CHECK: omp.par.pre_finalize: ; preds = %[[VAL_33]]
// CHECK: br label %[[VAL_39:.*]]
// CHECK: omp.par.outlined.exit.exitStub: ; preds = %[[VAL_38]]
// CHECK: omp.par.exit.exitStub: ; preds = %[[VAL_38]]
// CHECK: ret void
// CHECK: %[[VAL_40:.*]] = getelementptr inbounds [2 x ptr], ptr %[[VAL_41:.*]], i64 0, i64 0
// CHECK: %[[VAL_42:.*]] = load ptr, ptr %[[VAL_40]], align 8
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Target/LLVMIR/openmp-reduction-sections.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ llvm.func @sections_(%arg0: !llvm.ptr {fir.bindc_name = "x"}) attributes {fir.in
// CHECK: omp_section_loop.inc: ; preds = %[[VAL_59]]
// CHECK: %[[VAL_35]] = add nuw i32 %[[VAL_34]], 1
// CHECK: br label %[[VAL_32]]
// CHECK: omp.par.outlined.exit.exitStub: ; preds = %[[VAL_54]]
// CHECK: omp.par.exit.exitStub: ; preds = %[[VAL_54]]
// CHECK: ret void
// CHECK: %[[VAL_70:.*]] = getelementptr inbounds [1 x ptr], ptr %[[VAL_71:.*]], i64 0, i64 0
// CHECK: %[[VAL_72:.*]] = load ptr, ptr %[[VAL_70]], align 8
Expand Down
Loading