Fixed instantiation of threadprivate construct

e1cdea5e0ec9d28dcc0bb9f3aabd4b3c653974c4 by Alexey Bataev
Generate llvm.mem.parallel_loop_access only for loops without safelen

35083b615d34ca79c854d30bc3beae06dd304c8e by Alexander Musman