[all-commits] [llvm/llvm-project] 198e0a: [MemCpyOpt] Fix up debug loc for simplified memset...

Björn Pettersson via All-commits all-commits at lists.llvm.org
Tue May 16 07:55:47 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 198e0a12f66b6da7af1cafc116864ff8f2ec0b70
      https://github.com/llvm/llvm-project/commit/198e0a12f66b6da7af1cafc116864ff8f2ec0b70
  Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
  Date:   2023-05-16 (Tue, 16 May 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
    A llvm/test/Transforms/MemCpyOpt/memset-memcpy-dbgloc.ll

  Log Message:
  -----------
  [MemCpyOpt] Fix up debug loc for simplified memset in processMemSetMemCpyDependence

Make sure the code comments in processMemSetMemCpyDependence match
with the actual transform. They indicated that the memset being
rewritten was sunk to after a memcpy, while it actually is inserted
just before the memcpy.

Also make sure we use the debug location of the original memset
when creating the new simplified memset. In the past we've been
using the debug location for the memcpy which could be a bit
confusing.

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




More information about the All-commits mailing list