[all-commits] [llvm/llvm-project] abdf0d: [LoopIdiom] Fix bailout for aliasing in memcpy tra...

Eli Friedman via All-commits all-commits at lists.llvm.org
Tue May 31 17:24:51 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: abdf0da8009f272f6c3d6398cf63f9f0a8257637
      https://github.com/llvm/llvm-project/commit/abdf0da8009f272f6c3d6398cf63f9f0a8257637
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2022-05-31 (Tue, 31 May 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
    M llvm/test/Transforms/LoopIdiom/basic.ll

  Log Message:
  -----------
  [LoopIdiom] Fix bailout for aliasing in memcpy transform.

Commit dd5991cc modified the aliasing checks here to allow transforming
a memcpy where the source and destination point into the same object.
However, the change accidentally made the code skip the alias check for
other operations in the loop.

Instead of completely skipping the alias check, just skip the check for
whether the memcpy aliases itself.

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




More information about the All-commits mailing list