Skip to content

Commit 375f489

Browse files
authored
[Flang] Add standalone tile support (#160298)
Add support for the standalone OpenMP tile construct: ```f90 !$omp tile sizes(...) DO i = 1, 100 ... ``` This is complementary to #143715 which added support for the tile construct as part of another loop-associated construct such as worksharing-loop, distribute, etc.
1 parent 7ceef76 commit 375f489

File tree

27 files changed

+1029
-344
lines changed

27 files changed

+1029
-344
lines changed

flang/lib/Lower/OpenMP/ClauseProcessor.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,19 @@ bool ClauseProcessor::processNumTasks(
431431
return false;
432432
}
433433

434+
bool ClauseProcessor::processSizes(StatementContext &stmtCtx,
435+
mlir::omp::SizesClauseOps &result) const {
436+
if (auto *clause = findUniqueClause<omp::clause::Sizes>()) {
437+
result.sizes.reserve(clause->v.size());
438+
for (const ExprTy &vv : clause->v)
439+
result.sizes.push_back(fir::getBase(converter.genExprValue(vv, stmtCtx)));
440+
441+
return true;
442+
}
443+
444+
return false;
445+
}
446+
434447
bool ClauseProcessor::processNumTeams(
435448
lower::StatementContext &stmtCtx,
436449
mlir::omp::NumTeamsClauseOps &result) const {

flang/lib/Lower/OpenMP/ClauseProcessor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ class ClauseProcessor {
6666
mlir::omp::LoopRelatedClauseOps &loopResult,
6767
mlir::omp::CollapseClauseOps &collapseResult,
6868
llvm::SmallVectorImpl<const semantics::Symbol *> &iv) const;
69+
bool processSizes(StatementContext &stmtCtx,
70+
mlir::omp::SizesClauseOps &result) const;
6971
bool processDevice(lower::StatementContext &stmtCtx,
7072
mlir::omp::DeviceClauseOps &result) const;
7173
bool processDeviceType(mlir::omp::DeviceTypeClauseOps &result) const;

flang/lib/Lower/OpenMP/OpenMP.cpp

Lines changed: 236 additions & 124 deletions
Large diffs are not rendered by default.

flang/lib/Lower/OpenMP/Utils.cpp

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,6 @@ int64_t collectLoopRelatedInfo(
652652
mlir::omp::LoopRelatedClauseOps &result,
653653
llvm::SmallVectorImpl<const semantics::Symbol *> &iv) {
654654
int64_t numCollapse = 1;
655-
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
656655

657656
// Collect the loops to collapse.
658657
lower::pft::Evaluation *doConstructEval = &eval.getFirstNestedEvaluation();
@@ -667,6 +666,25 @@ int64_t collectLoopRelatedInfo(
667666
numCollapse = collapseValue;
668667
}
669668

669+
collectLoopRelatedInfo(converter, currentLocation, eval, numCollapse, result,
670+
iv);
671+
return numCollapse;
672+
}
673+
674+
void collectLoopRelatedInfo(
675+
lower::AbstractConverter &converter, mlir::Location currentLocation,
676+
lower::pft::Evaluation &eval, int64_t numCollapse,
677+
mlir::omp::LoopRelatedClauseOps &result,
678+
llvm::SmallVectorImpl<const semantics::Symbol *> &iv) {
679+
680+
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
681+
682+
// Collect the loops to collapse.
683+
lower::pft::Evaluation *doConstructEval = &eval.getFirstNestedEvaluation();
684+
if (doConstructEval->getIf<parser::DoConstruct>()->IsDoConcurrent()) {
685+
TODO(currentLocation, "Do Concurrent in Worksharing loop construct");
686+
}
687+
670688
// Collect sizes from tile directive if present.
671689
std::int64_t sizesLengthValue = 0l;
672690
if (auto *ompCons{eval.getIf<parser::OpenMPConstruct>()}) {
@@ -676,7 +694,7 @@ int64_t collectLoopRelatedInfo(
676694
});
677695
}
678696

679-
collapseValue = std::max(collapseValue, sizesLengthValue);
697+
std::int64_t collapseValue = std::max(numCollapse, sizesLengthValue);
680698
std::size_t loopVarTypeSize = 0;
681699
do {
682700
lower::pft::Evaluation *doLoop =
@@ -709,8 +727,6 @@ int64_t collectLoopRelatedInfo(
709727
} while (collapseValue > 0);
710728

711729
convertLoopBounds(converter, currentLocation, result, loopVarTypeSize);
712-
713-
return numCollapse;
714730
}
715731

716732
} // namespace omp

flang/lib/Lower/OpenMP/Utils.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,13 @@ int64_t collectLoopRelatedInfo(
165165
mlir::omp::LoopRelatedClauseOps &result,
166166
llvm::SmallVectorImpl<const semantics::Symbol *> &iv);
167167

168+
void collectLoopRelatedInfo(
169+
lower::AbstractConverter &converter, mlir::Location currentLocation,
170+
lower::pft::Evaluation &eval, std::int64_t collapseValue,
171+
// const omp::List<omp::Clause> &clauses,
172+
mlir::omp::LoopRelatedClauseOps &result,
173+
llvm::SmallVectorImpl<const semantics::Symbol *> &iv);
174+
168175
void collectTileSizesFromOpenMPConstruct(
169176
const parser::OpenMPConstruct *ompCons,
170177
llvm::SmallVectorImpl<int64_t> &tileSizes,

flang/lib/Semantics/check-directive-structure.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@ class DirectiveStructureChecker : public virtual BaseChecker {
383383
const C &clause, const parser::ScalarIntConstantExpr &i);
384384

385385
void RequiresPositiveParameter(const C &clause,
386-
const parser::ScalarIntExpr &i, llvm::StringRef paramName = "parameter");
386+
const parser::ScalarIntExpr &i, llvm::StringRef paramName = "parameter",
387+
bool allowZero = true);
387388

388389
void OptionalConstantPositiveParameter(
389390
const C &clause, const std::optional<parser::ScalarIntConstantExpr> &o);
@@ -657,9 +658,9 @@ void DirectiveStructureChecker<D, C, PC, ClauseEnumSize>::SayNotMatching(
657658
template <typename D, typename C, typename PC, std::size_t ClauseEnumSize>
658659
void DirectiveStructureChecker<D, C, PC,
659660
ClauseEnumSize>::RequiresPositiveParameter(const C &clause,
660-
const parser::ScalarIntExpr &i, llvm::StringRef paramName) {
661+
const parser::ScalarIntExpr &i, llvm::StringRef paramName, bool allowZero) {
661662
if (const auto v{GetIntValue(i)}) {
662-
if (*v < 0) {
663+
if (*v < (allowZero ? 0 : 1)) {
663664
context_.Say(GetContext().clauseSource,
664665
"The %s of the %s clause must be "
665666
"a positive integer expression"_err_en_US,

flang/lib/Semantics/check-omp-structure.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3145,6 +3145,13 @@ void OmpStructureChecker::Enter(const parser::OmpClause &x) {
31453145
}
31463146
}
31473147

3148+
void OmpStructureChecker::Enter(const parser::OmpClause::Sizes &c) {
3149+
CheckAllowedClause(llvm::omp::Clause::OMPC_sizes);
3150+
for (const parser::Cosubscript &v : c.v)
3151+
RequiresPositiveParameter(llvm::omp::Clause::OMPC_sizes, v,
3152+
/*paramName=*/"parameter", /*allowZero=*/false);
3153+
}
3154+
31483155
// Following clauses do not have a separate node in parse-tree.h.
31493156
CHECK_SIMPLE_CLAUSE(Absent, OMPC_absent)
31503157
CHECK_SIMPLE_CLAUSE(Affinity, OMPC_affinity)
@@ -3186,7 +3193,6 @@ CHECK_SIMPLE_CLAUSE(Notinbranch, OMPC_notinbranch)
31863193
CHECK_SIMPLE_CLAUSE(Partial, OMPC_partial)
31873194
CHECK_SIMPLE_CLAUSE(ProcBind, OMPC_proc_bind)
31883195
CHECK_SIMPLE_CLAUSE(Simd, OMPC_simd)
3189-
CHECK_SIMPLE_CLAUSE(Sizes, OMPC_sizes)
31903196
CHECK_SIMPLE_CLAUSE(Permutation, OMPC_permutation)
31913197
CHECK_SIMPLE_CLAUSE(Uniform, OMPC_uniform)
31923198
CHECK_SIMPLE_CLAUSE(Unknown, OMPC_unknown)

flang/lib/Semantics/resolve-directives.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2421,10 +2421,18 @@ void OmpAttributeVisitor::PrivatizeAssociatedLoopIndexAndCheckLoopLevel(
24212421
void OmpAttributeVisitor::CheckAssocLoopLevel(
24222422
std::int64_t level, const parser::OmpClause *clause) {
24232423
if (clause && level != 0) {
2424-
context_.Say(clause->source,
2425-
"The value of the parameter in the COLLAPSE or ORDERED clause must"
2426-
" not be larger than the number of nested loops"
2427-
" following the construct."_err_en_US);
2424+
switch (clause->Id()) {
2425+
case llvm::omp::OMPC_sizes:
2426+
context_.Say(clause->source,
2427+
"The SIZES clause has more entries than there are nested canonical loops."_err_en_US);
2428+
break;
2429+
default:
2430+
context_.Say(clause->source,
2431+
"The value of the parameter in the COLLAPSE or ORDERED clause must"
2432+
" not be larger than the number of nested loops"
2433+
" following the construct."_err_en_US);
2434+
break;
2435+
}
24282436
}
24292437
}
24302438

flang/test/Lower/OpenMP/tile01.f90

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=51 -o - %s | FileCheck %s
2+
3+
4+
subroutine omp_tile01(lb, ub, inc)
5+
integer res, i, lb, ub, inc
6+
7+
!$omp tile sizes(4)
8+
do i = lb, ub, inc
9+
res = i
10+
end do
11+
!$omp end tile
12+
13+
end subroutine omp_tile01
14+
15+
16+
! CHECK: func.func @_QPomp_tile01(
17+
! CHECK: %[[ARG0:.*]]: !fir.ref<i32> {fir.bindc_name = "lb"},
18+
! CHECK: %[[ARG1:.*]]: !fir.ref<i32> {fir.bindc_name = "ub"},
19+
! CHECK: %[[ARG2:.*]]: !fir.ref<i32> {fir.bindc_name = "inc"}) {
20+
! CHECK: %[[VAL_0:.*]] = fir.dummy_scope : !fir.dscope
21+
! CHECK: %[[VAL_1:.*]] = fir.alloca i32 {bindc_name = "i", uniq_name = "_QFomp_tile01Ei"}
22+
! CHECK: %[[VAL_2:.*]]:2 = hlfir.declare %[[VAL_1]] {uniq_name = "_QFomp_tile01Ei"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
23+
! CHECK: %[[VAL_3:.*]]:2 = hlfir.declare %[[ARG2]] dummy_scope %[[VAL_0]] {uniq_name = "_QFomp_tile01Einc"} : (!fir.ref<i32>, !fir.dscope) -> (!fir.ref<i32>, !fir.ref<i32>)
24+
! CHECK: %[[VAL_4:.*]]:2 = hlfir.declare %[[ARG0]] dummy_scope %[[VAL_0]] {uniq_name = "_QFomp_tile01Elb"} : (!fir.ref<i32>, !fir.dscope) -> (!fir.ref<i32>, !fir.ref<i32>)
25+
! CHECK: %[[VAL_5:.*]] = fir.alloca i32 {bindc_name = "res", uniq_name = "_QFomp_tile01Eres"}
26+
! CHECK: %[[VAL_6:.*]]:2 = hlfir.declare %[[VAL_5]] {uniq_name = "_QFomp_tile01Eres"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
27+
! CHECK: %[[VAL_7:.*]]:2 = hlfir.declare %[[ARG1]] dummy_scope %[[VAL_0]] {uniq_name = "_QFomp_tile01Eub"} : (!fir.ref<i32>, !fir.dscope) -> (!fir.ref<i32>, !fir.ref<i32>)
28+
! CHECK: %[[VAL_8:.*]] = arith.constant 4 : i32
29+
! CHECK: %[[VAL_9:.*]] = fir.load %[[VAL_4]]#0 : !fir.ref<i32>
30+
! CHECK: %[[VAL_10:.*]] = fir.load %[[VAL_7]]#0 : !fir.ref<i32>
31+
! CHECK: %[[VAL_11:.*]] = fir.load %[[VAL_3]]#0 : !fir.ref<i32>
32+
! CHECK: %[[VAL_12:.*]] = arith.constant 0 : i32
33+
! CHECK: %[[VAL_13:.*]] = arith.constant 1 : i32
34+
! CHECK: %[[VAL_14:.*]] = arith.cmpi slt, %[[VAL_11]], %[[VAL_12]] : i32
35+
! CHECK: %[[VAL_15:.*]] = arith.subi %[[VAL_12]], %[[VAL_11]] : i32
36+
! CHECK: %[[VAL_16:.*]] = arith.select %[[VAL_14]], %[[VAL_15]], %[[VAL_11]] : i32
37+
! CHECK: %[[VAL_17:.*]] = arith.select %[[VAL_14]], %[[VAL_10]], %[[VAL_9]] : i32
38+
! CHECK: %[[VAL_18:.*]] = arith.select %[[VAL_14]], %[[VAL_9]], %[[VAL_10]] : i32
39+
! CHECK: %[[VAL_19:.*]] = arith.subi %[[VAL_18]], %[[VAL_17]] overflow<nuw> : i32
40+
! CHECK: %[[VAL_20:.*]] = arith.divui %[[VAL_19]], %[[VAL_16]] : i32
41+
! CHECK: %[[VAL_21:.*]] = arith.addi %[[VAL_20]], %[[VAL_13]] overflow<nuw> : i32
42+
! CHECK: %[[VAL_22:.*]] = arith.cmpi slt, %[[VAL_18]], %[[VAL_17]] : i32
43+
! CHECK: %[[VAL_23:.*]] = arith.select %[[VAL_22]], %[[VAL_12]], %[[VAL_21]] : i32
44+
! CHECK: %[[VAL_24:.*]] = omp.new_cli
45+
! CHECK: omp.canonical_loop(%[[VAL_24]]) %[[VAL_25:.*]] : i32 in range(%[[VAL_23]]) {
46+
! CHECK: %[[VAL_26:.*]] = arith.muli %[[VAL_25]], %[[VAL_11]] : i32
47+
! CHECK: %[[VAL_27:.*]] = arith.addi %[[VAL_9]], %[[VAL_26]] : i32
48+
! CHECK: hlfir.assign %[[VAL_27]] to %[[VAL_2]]#0 : i32, !fir.ref<i32>
49+
! CHECK: %[[VAL_28:.*]] = fir.load %[[VAL_2]]#0 : !fir.ref<i32>
50+
! CHECK: hlfir.assign %[[VAL_28]] to %[[VAL_6]]#0 : i32, !fir.ref<i32>
51+
! CHECK: omp.terminator
52+
! CHECK: }
53+
! CHECK: %[[VAL_29:.*]] = omp.new_cli
54+
! CHECK: %[[VAL_30:.*]] = omp.new_cli
55+
! CHECK: omp.tile (%[[VAL_29]], %[[VAL_30]]) <- (%[[VAL_24]]) sizes(%[[VAL_8]] : i32)
56+
! CHECK: return
57+
! CHECK: }
58+

flang/test/Lower/OpenMP/tile02.f90

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=51 -o - %s | FileCheck %s
2+
3+
4+
subroutine omp_tile02(lb, ub, inc)
5+
integer res, i, lb, ub, inc
6+
7+
!$omp tile sizes(3,7)
8+
do i = lb, ub, inc
9+
do j = lb, ub, inc
10+
res = i + j
11+
end do
12+
end do
13+
!$omp end tile
14+
15+
end subroutine omp_tile02
16+
17+
18+
! CHECK: func.func @_QPomp_tile02(
19+
! CHECK: %[[ARG0:.*]]: !fir.ref<i32> {fir.bindc_name = "lb"},
20+
! CHECK: %[[ARG1:.*]]: !fir.ref<i32> {fir.bindc_name = "ub"},
21+
! CHECK: %[[ARG2:.*]]: !fir.ref<i32> {fir.bindc_name = "inc"}) {
22+
! CHECK: %[[VAL_0:.*]] = fir.dummy_scope : !fir.dscope
23+
! CHECK: %[[VAL_1:.*]] = fir.alloca i32 {bindc_name = "i", uniq_name = "_QFomp_tile02Ei"}
24+
! CHECK: %[[VAL_2:.*]]:2 = hlfir.declare %[[VAL_1]] {uniq_name = "_QFomp_tile02Ei"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
25+
! CHECK: %[[VAL_3:.*]]:2 = hlfir.declare %[[ARG2]] dummy_scope %[[VAL_0]] {uniq_name = "_QFomp_tile02Einc"} : (!fir.ref<i32>, !fir.dscope) -> (!fir.ref<i32>, !fir.ref<i32>)
26+
! CHECK: %[[VAL_4:.*]] = fir.alloca i32 {bindc_name = "j", uniq_name = "_QFomp_tile02Ej"}
27+
! CHECK: %[[VAL_5:.*]]:2 = hlfir.declare %[[VAL_4]] {uniq_name = "_QFomp_tile02Ej"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
28+
! CHECK: %[[VAL_6:.*]]:2 = hlfir.declare %[[ARG0]] dummy_scope %[[VAL_0]] {uniq_name = "_QFomp_tile02Elb"} : (!fir.ref<i32>, !fir.dscope) -> (!fir.ref<i32>, !fir.ref<i32>)
29+
! CHECK: %[[VAL_7:.*]] = fir.alloca i32 {bindc_name = "res", uniq_name = "_QFomp_tile02Eres"}
30+
! CHECK: %[[VAL_8:.*]]:2 = hlfir.declare %[[VAL_7]] {uniq_name = "_QFomp_tile02Eres"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
31+
! CHECK: %[[VAL_9:.*]]:2 = hlfir.declare %[[ARG1]] dummy_scope %[[VAL_0]] {uniq_name = "_QFomp_tile02Eub"} : (!fir.ref<i32>, !fir.dscope) -> (!fir.ref<i32>, !fir.ref<i32>)
32+
! CHECK: %[[VAL_10:.*]] = arith.constant 3 : i32
33+
! CHECK: %[[VAL_11:.*]] = arith.constant 7 : i32
34+
! CHECK: %[[VAL_12:.*]] = fir.load %[[VAL_6]]#0 : !fir.ref<i32>
35+
! CHECK: %[[VAL_13:.*]] = fir.load %[[VAL_9]]#0 : !fir.ref<i32>
36+
! CHECK: %[[VAL_14:.*]] = fir.load %[[VAL_3]]#0 : !fir.ref<i32>
37+
! CHECK: %[[VAL_15:.*]] = arith.constant 0 : i32
38+
! CHECK: %[[VAL_16:.*]] = arith.constant 1 : i32
39+
! CHECK: %[[VAL_17:.*]] = arith.cmpi slt, %[[VAL_14]], %[[VAL_15]] : i32
40+
! CHECK: %[[VAL_18:.*]] = arith.subi %[[VAL_15]], %[[VAL_14]] : i32
41+
! CHECK: %[[VAL_19:.*]] = arith.select %[[VAL_17]], %[[VAL_18]], %[[VAL_14]] : i32
42+
! CHECK: %[[VAL_20:.*]] = arith.select %[[VAL_17]], %[[VAL_13]], %[[VAL_12]] : i32
43+
! CHECK: %[[VAL_21:.*]] = arith.select %[[VAL_17]], %[[VAL_12]], %[[VAL_13]] : i32
44+
! CHECK: %[[VAL_22:.*]] = arith.subi %[[VAL_21]], %[[VAL_20]] overflow<nuw> : i32
45+
! CHECK: %[[VAL_23:.*]] = arith.divui %[[VAL_22]], %[[VAL_19]] : i32
46+
! CHECK: %[[VAL_24:.*]] = arith.addi %[[VAL_23]], %[[VAL_16]] overflow<nuw> : i32
47+
! CHECK: %[[VAL_25:.*]] = arith.cmpi slt, %[[VAL_21]], %[[VAL_20]] : i32
48+
! CHECK: %[[VAL_26:.*]] = arith.select %[[VAL_25]], %[[VAL_15]], %[[VAL_24]] : i32
49+
! CHECK: %[[VAL_27:.*]] = omp.new_cli
50+
! CHECK: %[[VAL_28:.*]] = fir.load %[[VAL_6]]#0 : !fir.ref<i32>
51+
! CHECK: %[[VAL_29:.*]] = fir.load %[[VAL_9]]#0 : !fir.ref<i32>
52+
! CHECK: %[[VAL_30:.*]] = fir.load %[[VAL_3]]#0 : !fir.ref<i32>
53+
! CHECK: %[[VAL_31:.*]] = arith.constant 0 : i32
54+
! CHECK: %[[VAL_32:.*]] = arith.constant 1 : i32
55+
! CHECK: %[[VAL_33:.*]] = arith.cmpi slt, %[[VAL_30]], %[[VAL_31]] : i32
56+
! CHECK: %[[VAL_34:.*]] = arith.subi %[[VAL_31]], %[[VAL_30]] : i32
57+
! CHECK: %[[VAL_35:.*]] = arith.select %[[VAL_33]], %[[VAL_34]], %[[VAL_30]] : i32
58+
! CHECK: %[[VAL_36:.*]] = arith.select %[[VAL_33]], %[[VAL_29]], %[[VAL_28]] : i32
59+
! CHECK: %[[VAL_37:.*]] = arith.select %[[VAL_33]], %[[VAL_28]], %[[VAL_29]] : i32
60+
! CHECK: %[[VAL_38:.*]] = arith.subi %[[VAL_37]], %[[VAL_36]] overflow<nuw> : i32
61+
! CHECK: %[[VAL_39:.*]] = arith.divui %[[VAL_38]], %[[VAL_35]] : i32
62+
! CHECK: %[[VAL_40:.*]] = arith.addi %[[VAL_39]], %[[VAL_32]] overflow<nuw> : i32
63+
! CHECK: %[[VAL_41:.*]] = arith.cmpi slt, %[[VAL_37]], %[[VAL_36]] : i32
64+
! CHECK: %[[VAL_42:.*]] = arith.select %[[VAL_41]], %[[VAL_31]], %[[VAL_40]] : i32
65+
! CHECK: %[[VAL_43:.*]] = omp.new_cli
66+
! CHECK: omp.canonical_loop(%[[VAL_27]]) %[[VAL_44:.*]] : i32 in range(%[[VAL_26]]) {
67+
! CHECK: omp.canonical_loop(%[[VAL_43]]) %[[VAL_45:.*]] : i32 in range(%[[VAL_42]]) {
68+
! CHECK: %[[VAL_46:.*]] = arith.muli %[[VAL_44]], %[[VAL_14]] : i32
69+
! CHECK: %[[VAL_47:.*]] = arith.addi %[[VAL_12]], %[[VAL_46]] : i32
70+
! CHECK: hlfir.assign %[[VAL_47]] to %[[VAL_2]]#0 : i32, !fir.ref<i32>
71+
! CHECK: %[[VAL_48:.*]] = arith.muli %[[VAL_45]], %[[VAL_30]] : i32
72+
! CHECK: %[[VAL_49:.*]] = arith.addi %[[VAL_28]], %[[VAL_48]] : i32
73+
! CHECK: hlfir.assign %[[VAL_49]] to %[[VAL_5]]#0 : i32, !fir.ref<i32>
74+
! CHECK: %[[VAL_50:.*]] = fir.load %[[VAL_2]]#0 : !fir.ref<i32>
75+
! CHECK: %[[VAL_51:.*]] = fir.load %[[VAL_5]]#0 : !fir.ref<i32>
76+
! CHECK: %[[VAL_52:.*]] = arith.addi %[[VAL_50]], %[[VAL_51]] : i32
77+
! CHECK: hlfir.assign %[[VAL_52]] to %[[VAL_8]]#0 : i32, !fir.ref<i32>
78+
! CHECK: omp.terminator
79+
! CHECK: }
80+
! CHECK: omp.terminator
81+
! CHECK: }
82+
! CHECK: %[[VAL_53:.*]] = omp.new_cli
83+
! CHECK: %[[VAL_54:.*]] = omp.new_cli
84+
! CHECK: %[[VAL_55:.*]] = omp.new_cli
85+
! CHECK: %[[VAL_56:.*]] = omp.new_cli
86+
! CHECK: omp.tile (%[[VAL_53]], %[[VAL_55]], %[[VAL_54]], %[[VAL_56]]) <- (%[[VAL_27]], %[[VAL_43]]) sizes(%[[VAL_10]], %[[VAL_11]] : i32, i32)
87+
! CHECK: return
88+
! CHECK: }

0 commit comments

Comments
 (0)