[all-commits] [llvm/llvm-project] bb3afa: [flang] Set lower bounds of array section fir.embo...

jeanPerier via All-commits all-commits at lists.llvm.org
Tue Apr 5 08:26:42 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bb3afae99b5ba5e865b237913104ca7ab2ed2baa
      https://github.com/llvm/llvm-project/commit/bb3afae99b5ba5e865b237913104ca7ab2ed2baa
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2022-04-05 (Tue, 05 Apr 2022)

  Changed paths:
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    M flang/test/Fir/convert-to-llvm.fir

  Log Message:
  -----------
  [flang] Set lower bounds of array section fir.embox to one

Do not use the shift of a fir.embox to set lower bounds if there is
a fir.slice operand. This matches Fortran semantics where lower bounds
of array sections are ones.
Note that in case there is a fir.slice, the array shift may be provided
because it is used to calculate the origin/base address of an array slice.

Add a TODO for substring codegen since I noticed it was not upstreamed
yet and would cause some program to silently compile incorrectly.

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




More information about the All-commits mailing list