[all-commits] [llvm/llvm-project] 716b02: [LLVM][MemCpyOpt] Unify alias tags if we optimize ...

Dominik Adamski via All-commits all-commits at lists.llvm.org
Thu Apr 10 03:24:15 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 716b02d8c575afde7af1af13df145019659abca2
      https://github.com/llvm/llvm-project/commit/716b02d8c575afde7af1af13df145019659abca2
  Author: Dominik Adamski <dominik.adamski at amd.com>
  Date:   2025-04-10 (Thu, 10 Apr 2025)

  Changed paths:
    M llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
    A llvm/test/Transforms/MemCpyOpt/memcpy-tbaa.ll
    M llvm/test/Transforms/MemCpyOpt/stack-move.ll

  Log Message:
  -----------
  [LLVM][MemCpyOpt] Unify alias tags if we optimize allocas (#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:
https://github.com/llvm/llvm-project/issues/133984

---------

Co-authored-by: Shilei Tian <i at tianshilei.me>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list