[OpenMP][FIX] Data race in the SPMD execution of the new runtime

We need to synchronize the threads *before* we destroy the RAII objects
that hold the old values and not after to avoid threads executing the
parallel region but seeing an inconsistent state.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D111369

GitOrigin-RevId: 44710940af5bed3c338c4c397c561bfb83790218
1 file changed