[all-commits] [llvm/llvm-project] 752bd7: [flang][hlfir] Apply component lower bounds in hlf...

jeanPerier via All-commits all-commits at lists.llvm.org
Wed Apr 19 00:02:36 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 752bd78f06d7db1af98a9ae41668b084874d7081
      https://github.com/llvm/llvm-project/commit/752bd78f06d7db1af98a9ae41668b084874d7081
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2023-04-19 (Wed, 19 Apr 2023)

  Changed paths:
    M flang/include/flang/Optimizer/Builder/HLFIRTools.h
    M flang/lib/Optimizer/Builder/HLFIRTools.cpp
    M flang/lib/Optimizer/HLFIR/Transforms/ConvertToFIR.cpp
    M flang/test/HLFIR/designate-codegen-component-refs.fir

  Log Message:
  -----------
  [flang][hlfir] Apply component lower bounds in hlfir.designate codegen

The array component indices in the "path" of a fir.slice are zero based
because FIR does not know about the component lower bounds.
When lowering hlfir.designate to FIR for `array%x(i, j)`, convert `i` and
`j` to zero based indices before generating the fir.slice.

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




More information about the All-commits mailing list