[all-commits] [llvm/llvm-project] b7e915: [flang] Conditional expressions lowering: use fir....

Caroline Newcombe via All-commits all-commits at lists.llvm.org
Fri Apr 17 08:21:04 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b7e915c59354cf4e78a37363fab514ad21ebb29c
      https://github.com/llvm/llvm-project/commit/b7e915c59354cf4e78a37363fab514ad21ebb29c
  Author: Caroline Newcombe <caroline.newcombe at hpe.com>
  Date:   2026-04-17 (Fri, 17 Apr 2026)

  Changed paths:
    M flang/lib/Lower/ConvertExprToHLFIR.cpp
    M flang/test/Lower/HLFIR/conditional-expr.f90

  Log Message:
  -----------
  [flang] Conditional expressions lowering: use fir.if SSA results for trivial scalar types (#192338)

For trivial scalar types (INTEGER, REAL, COMPLEX, LOGICAL, UNSIGNED),
generate `fir.if` with SSA results instead of allocating a temporary and
using `hlfir.assign`. This avoids the alloca/declare/assign/load pattern
for types that can be passed directly as SSA values.

Non-trivial scalar types (derived types, characters) continue to use the
existing temporary-based paths.

The LIT test expectations have been updated accordingly, and a test case
was added.



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