Commit 9ce82ae
[LLVM][MemCpyOpt] Unify alias tags if we optimize allocas (llvm#129537)
Optimization of alloca instructions may lead to invalid alias tags.
Incorrect alias tags can result in incorrect optimization outcomes for
Fortran source code compiled by Flang with flags: `-O3 -mmlir
-local-alloc-tbaa -flto`.
This commit removes alias tags when memcpy optimization replaces two
arrays with one array, thus ensuring correct compilation of Fortran
source code using flags: `-O3 -mmlir -local-alloc-tbaa -flto`.
This commit is also a proposal to fix the reported issue:
llvm#133984
---------
Co-authored-by: Shilei Tian <[email protected]>
(cherry picked from commit 716b02d)1 parent ccda9ec commit 9ce82ae
1 file changed
+12
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1535 | 1535 | | |
1536 | 1536 | | |
1537 | 1537 | | |
1538 | | - | |
| 1538 | + | |
1539 | 1539 | | |
1540 | 1540 | | |
1541 | 1541 | | |
| |||
1590 | 1590 | | |
1591 | 1591 | | |
1592 | 1592 | | |
1593 | | - | |
1594 | | - | |
| 1593 | + | |
| 1594 | + | |
1595 | 1595 | | |
1596 | 1596 | | |
1597 | 1597 | | |
| |||
1696 | 1696 | | |
1697 | 1697 | | |
1698 | 1698 | | |
1699 | | - | |
1700 | | - | |
1701 | | - | |
1702 | | - | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
1703 | 1705 | | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
1704 | 1709 | | |
1705 | 1710 | | |
1706 | 1711 | | |
| |||
0 commit comments