[all-commits] [llvm/llvm-project] baf031: [MemCpyOpt] fix miscompile for non-dominated use o...

Kohei Asano via All-commits all-commits at lists.llvm.org
Mon Sep 18 05:29:26 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: baf031a853d1d301d6798ef3277b89875625a0b1
  Author: Kohei Asano <32860920+khei4 at users.noreply.github.com>
  Date:   2023-09-18 (Mon, 18 Sep 2023)

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

  Log Message:
  [MemCpyOpt] fix miscompile for non-dominated use of src alloca for stack-move optimization (#66618)

Stack-move optimization, the optimization that merges src and dest
alloca of the full-size copy, replaces all uses of the dest alloca with
src alloca. For safety, we needed to check all uses of the dest alloca
locations are dominated by src alloca, to be replaced. This PR adds the
check for that.

Fixes #65225

More information about the All-commits mailing list