[all-commits] [llvm/llvm-project] 0601a0: [flang] Fix fir.embox codegen with constant interi...

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


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

  Changed paths:
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    A flang/test/Fir/embox.fir

  Log Message:
  -----------
  [flang] Fix fir.embox codegen with constant interior shape

Fix https://github.com/flang-compiler/f18-llvm-project/issues/1416.

The `constRows` variable was being decremented too soon, causing the
last constant interior dimension extent being used to multiply the GEP
offset. This lead to wrong address computation and caused segfaults.

Note: also upstream fir.embox tests that can be upstreamed.

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




More information about the All-commits mailing list