[all-commits] [llvm/llvm-project] ab8e1e: [flang] Do not fold fir.box_addr when it has a slice

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Fri Apr 8 12:17:07 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ab8e1e6e5ace6ba9b7c44caa2409bf8e33cdee96
      https://github.com/llvm/llvm-project/commit/ab8e1e6e5ace6ba9b7c44caa2409bf8e33cdee96
  Author: Valentin Clement <clementval at gmail.com>
  Date:   2022-04-08 (Fri, 08 Apr 2022)

  Changed paths:
    M flang/lib/Optimizer/Dialect/FIROps.cpp
    A flang/test/Fir/boxaddr-folding.fir

  Log Message:
  -----------
  [flang] Do not fold fir.box_addr when it has a slice

This patch avoids to fold `fir.box_addr` when the defining `fir.embox` op
has a slice. If the op is folded the slice information are lost.

This kind of problem occurred with code like:

```
call check(y(half+1:))
```

where `y` is an array.

Reviewed By: jeanPerier

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




More information about the All-commits mailing list