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.
Paths
| Differential D123392
[flang] Do not fold fir.box_addr when it has a slice ClosedPublic Authored by clementval on Apr 8 2022, 8:17 AM.
Details Summary This patch avoids to fold fir.box_addr when the defining fir.embox op This kind of problem occurred with code like: call check(y(half+1:)) where y is an array.
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 8 2022, 8:17 AM This revision is now accepted and ready to land.Apr 8 2022, 9:48 AM Closed by commit rGab8e1e6e5ace: [flang] Do not fold fir.box_addr when it has a slice (authored by clementval). · Explain WhyApr 8 2022, 12:17 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 421613 flang/lib/Optimizer/Dialect/FIROps.cpp
flang/test/Fir/boxaddr-folding.fir
|