[all-commits] [llvm/llvm-project] 9f302e: [flang] Inline hlfir.eoshift during HLFIR intrinsi...

Slava Zakharin via All-commits all-commits at lists.llvm.org
Fri Aug 15 15:22:27 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9f302ed0cf433114faf4ab07655166634630e1e2
      https://github.com/llvm/llvm-project/commit/9f302ed0cf433114faf4ab07655166634630e1e2
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2025-08-15 (Fri, 15 Aug 2025)

  Changed paths:
    M flang/lib/Optimizer/Builder/HLFIRTools.cpp
    M flang/lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp
    M flang/test/HLFIR/simplify-hlfir-intrinsics-cshift.fir
    A flang/test/HLFIR/simplify-hlfir-intrinsics-eoshift.fir

  Log Message:
  -----------
  [flang] Inline hlfir.eoshift during HLFIR intrinsics simplication. (#153108)

This patch generalizes the code for hlfir.cshift to be applicable
for hlfir.eoshift. The major difference is the selection
of the boundary value that might be statically/dynamically absent,
in which case the default scalar value has to be used.
The scalar value of the boundary is always computed before
the hlfir.elemental or the assignment loop.
Contrary to hlfir.cshift simplication, the SHIFT value is not
normalized,
because the original value (and its sign) participate in the EOSHIFT
index computation for addressing the input array and selecting
which elements of the results are assigned from the boundary operand.



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