[all-commits] [llvm/llvm-project] 42ab5d: [InstCombine] Handle PHI nodes in isOnlyCopiedFrom...

Anshil Gandhi via All-commits all-commits at lists.llvm.org
Wed Jan 11 08:24:59 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 42ab5dc5a5dd6c79476104bdc921afa2a18559cf
      https://github.com/llvm/llvm-project/commit/42ab5dc5a5dd6c79476104bdc921afa2a18559cf
  Author: Anshil Gandhi <Anshil.Gandhi at amd.com>
  Date:   2023-01-11 (Wed, 11 Jan 2023)

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

  Log Message:
  -----------
  [InstCombine] Handle PHI nodes in isOnlyCopiedFromConstantMemory()

As long as the memcpy occurs on a phi input (rather than the phi
output), we can look through phi nodes in
isOnlyCopiedFromConstantMemory().

This is split out of D136201, to only handle the case where the
address spaces are the same, and no pointer rewrite is necessary.




More information about the All-commits mailing list