[OpenMP] Insert missing variable update inside loop

While loop within task priority code did not have necessary update of
variable which could lead to hangs if two threads collided when both
attempted to execute the compare_and_exchange.

Fixes: https://github.com/llvm/llvm-project/issues/62867
Differential Revision: https://reviews.llvm.org/D151138
GitOrigin-RevId: d67c91b5e728d94376873c04ffac3ba6d29b95b8
2 files changed