[all-commits] [llvm/llvm-project] 89f4b8: [InstCombine] Use copyMetadata in PointerReplacer:...

Justin Lebar via All-commits all-commits at lists.llvm.org
Fri Jun 5 09:12:54 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 89f4b84d8b2cd0a5c54dc9a819090f131bf87d0d
      https://github.com/llvm/llvm-project/commit/89f4b84d8b2cd0a5c54dc9a819090f131bf87d0d
  Author: Justin Lebar <justin.lebar at gmail.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
    M llvm/test/Transforms/InstCombine/ptr-replace-alloca.ll

  Log Message:
  -----------
  [InstCombine] Use copyMetadata in PointerReplacer::replace (#201827)

PointerReplacer::replace creates a new load that differs from the
original only in its pointer operand; the loaded type is unchanged.  It
was using copyMetadataForLoad(), which is meant for the case where the
load's *type* changes.  Since the type is the same here, plain
copyMetadata() is correct and preserves all metadata directly.



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