Commit de41f64
committed
[flang] Inline hlfir.eoshift during HLFIR intrinsics simplication.
This patch generalizes the code for hlfir.cshift to be applicable
for hlfir.eoshift. The major difference is the selection
of the boundary value that might be statically/dynamically absent,
in which case the default scalar value has to be used.
The scalar value of the boundary is always computed before
the hlfir.elemental or the assignment loop.
Contrary to hlfir.cshift simplication, the SHIFT value is not normalized,
because the original value (and its sign) participate in the EOSHIFT
index computation for addressing the input array and selecting
which elements of the results are assigned from the boundary operand.1 parent 5c51a88 commit de41f64
File tree
4 files changed
+2748
-133
lines changed- flang
- lib/Optimizer
- Builder
- HLFIR/Transforms
- test/HLFIR
4 files changed
+2748
-133
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
419 | | - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
420 | 423 | | |
421 | 424 | | |
422 | 425 | | |
| |||
0 commit comments