[MLIR] Fix afterIP for dynamic worksharing-loop after collaping loops
authorPeixin-Qiao <qiaopeixin@huawei.com>
Thu, 3 Mar 2022 07:21:44 +0000 (15:21 +0800)
committerPeixin-Qiao <qiaopeixin@huawei.com>
Thu, 3 Mar 2022 07:22:20 +0000 (15:22 +0800)
commita5605c9a15b30da42821a8238ebc8f7177a904e9
treeaccda63afb30e78e5920db9c24849529383c9e79
parent59630917d6cc7c4a273f617f92bf6190ee2992e1
[MLIR] Fix afterIP for dynamic worksharing-loop after collaping loops

The loopInfos gets invalidated after collapsing nested loops. Use the
saved afterIP since the returned afterIP by applyDynamicWorkshareLoop
may be not valid.

Reviewed By: shraiysh

Differential Revision: https://reviews.llvm.org/D120294
mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
mlir/test/Target/LLVMIR/openmp-llvm.mlir