[all-commits] [llvm/llvm-project] ed9793: [flang][OpenMP] Fix LASTPRIVATE for iteration vari...

Leandro Lupori via All-commits all-commits at lists.llvm.org
Tue Oct 24 05:46:14 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ed979323d87b780e698bdd88c0d75c1a3dc2ea57
      https://github.com/llvm/llvm-project/commit/ed979323d87b780e698bdd88c0d75c1a3dc2ea57
  Author: Leandro Lupori <leandro.lupori at linaro.org>
  Date:   2023-10-24 (Tue, 24 Oct 2023)

  Changed paths:
    M flang/lib/Lower/OpenMP.cpp
    M flang/test/Lower/OpenMP/FIR/lastprivate-commonblock.f90
    M flang/test/Lower/OpenMP/FIR/parallel-lastprivate-clause-scalar.f90
    M flang/test/Lower/OpenMP/lastprivate-commonblock.f90
    A flang/test/Lower/OpenMP/lastprivate-iv.f90

  Log Message:
  -----------
  [flang][OpenMP] Fix LASTPRIVATE for iteration variables (#69773)

Iteration variables behave slightly different with LASTPRIVATE,
as they must be assigned the value that the copy would have after
sequential execution of the loop. This case is now handled.

This patch also fixes LASTPRIVATE for loops where the step is
different from 1.

Fixes https://github.com/llvm/llvm-project/issues/64055




More information about the All-commits mailing list