[all-commits] [llvm/llvm-project] ab1c64: Place dynamic condition cleanups before branching

Chi-Chun, Chen via All-commits all-commits at lists.llvm.org
Wed May 27 13:38:52 PDT 2026


  Branch: refs/heads/users/cchen/flang-metadirective-dynamic-user-cond
  Home:   https://github.com/llvm/llvm-project
  Commit: ab1c6441a9614e6734873a120d5d3fc9e3b3d050
      https://github.com/llvm/llvm-project/commit/ab1c6441a9614e6734873a120d5d3fc9e3b3d050
  Author: Chi Chun, Chen <chichun.chen at hpe.com>
  Date:   2026-05-27 (Wed, 27 May 2026)

  Changed paths:
    M flang/lib/Lower/OpenMP/OpenMP.cpp
    M flang/lib/Lower/OpenMP/Utils.cpp
    M flang/lib/Lower/OpenMP/Utils.h
    M flang/test/Lower/OpenMP/metadirective-user.f90

  Log Message:
  -----------
  Place dynamic condition cleanups before branching

A dynamic user condition can create expression temporaries before the
selected variant is lowered. For example, a metadirective condition
such as:

  when(user={condition(getbool("hello"))}: barrier)

passes a character literal through an associated temporary. That
temporary belongs to evaluating the condition, so it must be cleaned
up before lowering enters the generated fir.if that selects between
variants.

Finalize the statement context after evaluating the condition and
before creating the branch. Keep the condition expression and source
location together as DynamicUserCondition, use that source for
generated operations, and add a regression for the temporary-producing
condition case.



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