Skip to content

Commit bf61151

Browse files
[rebase][OpenMP] Fix simd (until D112526 is merged)
https://reviews.llvm.org/D112526 fixed a SIMD bug that wrongly caused the change 3rd arg of __kmpc_dispatch_init_4 from 47 to 37 in wsloop-simd.f90 test. Only reproduce the part required for the fix until https://reviews.llvm.org/D112526 is reviewed and merged and can be cherry-picked and replace this code. Co-authored-by: Mats Petersson <[email protected]>
1 parent 7e51f21 commit bf61151

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,12 @@ parseScheduleClause(OpAsmParser &parser, SmallString<8> &schedule,
286286
modifiers.push_back(mod);
287287
}
288288

289+
// Fix up "only simd specified"
290+
if (modifiers.size() == 1 && modifiers[0] == "simd") {
291+
modifiers[0] = "none";
292+
modifiers.push_back(StringRef("simd"));
293+
}
294+
289295
if (parser.parseRParen())
290296
return failure();
291297

0 commit comments

Comments
 (0)