[all-commits] [llvm/llvm-project] 39e8e5: [Flang][OpenMP] Use fir.if instead of scf.if in la...

kiranchandramohan via All-commits all-commits at lists.llvm.org
Tue May 2 05:04:56 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 39e8e59950b1a4b5dadd398d1788bc79bb7b2879
      https://github.com/llvm/llvm-project/commit/39e8e59950b1a4b5dadd398d1788bc79bb7b2879
  Author: Kiran Chandramohan <kiran.chandramohan at arm.com>
  Date:   2023-05-02 (Tue, 02 May 2023)

  Changed paths:
    M flang/lib/Lower/OpenMP.cpp
    M flang/test/Lower/OpenMP/parallel-lastprivate-clause-scalar.f90
    M flang/test/Lower/OpenMP/sections.f90

  Log Message:
  -----------
  [Flang][OpenMP] Use fir.if instead of scf.if in lastprivate lowering

For finding the last iteration of a loop, or the last section an
if condition is generated. Using scf::if can cause some lowering
issues since the code contained inside it can have branches. Using
fir::if instead ensures that the fir::if is lowered into branches
along with any code contained inside that can generate branches.

Fixes #62458.

Reviewed By: NimishMishra

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




More information about the All-commits mailing list