[all-commits] [llvm/llvm-project] 665c2e: [Flang][OpenMP] Remove dead restoreIP in OpenMP ta...

Sairudra More via All-commits all-commits at lists.llvm.org
Tue Mar 24 21:54:14 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 665c2e91e29ddfc2a60746d7d2e6bc60fe5d3e08
      https://github.com/llvm/llvm-project/commit/665c2e91e29ddfc2a60746d7d2e6bc60fe5d3e08
  Author: Sairudra More <sairudra60 at gmail.com>
  Date:   2026-03-25 (Wed, 25 Mar 2026)

  Changed paths:
    A flang/test/Integration/OpenMP/taskloop-bounds-cast.f90
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
    A mlir/test/Target/LLVMIR/openmp-taskloop-bounds-cast.mlir

  Log Message:
  -----------
  [Flang][OpenMP] Remove dead restoreIP in OpenMP taskloop lowering (#187222)

This fixes an intermittent crash in `OpenMP` taskloop lowering.

In `OMPIRBuilder::createTaskloop`, the `restoreIP` in `PostOutlineCB`
was immediately overwritten by the following
`Builder.SetInsertPoint(StaleCI)` with no instructions created in
between, so it was effectively dead. This patch removes that dead
restore, which is the smallest change and preserves the intended IR
placement.

Adds a regression test that compiles a taskloop to LLVM IR and verifies
the bounds casts and __kmpc_taskloop call are present.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list