[OpenMP]Fix PR55970: Miscompile of collapse(3) with non-rectangular loop nest.
authorAlexey Bataev <a.bataev@outlook.com>
Tue, 14 Feb 2023 15:19:45 +0000 (07:19 -0800)
committerAlexey Bataev <a.bataev@outlook.com>
Tue, 14 Feb 2023 18:39:04 +0000 (10:39 -0800)
commitddde06906be11ea540870d5c0e1b3336a4460612
tree85d00b45b68b0ed01a7dce57a2889dc8469261b5
parent5dc400ea2f065e95067aa32b146118e2f4c8b45b
[OpenMP]Fix PR55970: Miscompile of collapse(3) with non-rectangular loop nest.

Need to assign the calculated lower bound back to temp variable,
otherwise incorrect value (upper bound instead of lower bound) might be
used.

Differential Revision: https://reviews.llvm.org/D144015
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/for_codegen.cpp
clang/test/OpenMP/tile_codegen.cpp
openmp/runtime/test/worksharing/for/omp_for_collapse_non_rectangular.c [new file with mode: 0644]