[OpenMP] Fix main thread barrier for Pascal and amdgpu

Fixes what's left of https://bugs.llvm.org/show_bug.cgi?id=51781.

Reviewed By: jdoerfert, JonChesterfield, tianshilei1992

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

GitOrigin-RevId: c9dfe322eefca14ce07f73452f7327ecda57da30
5 files changed