llvm-project/llvm/test/Analysis/MemorySSA
Alina Sbirlea fcfa7c5f92 [MemorySSA] Make insertDef insert corresponding phi nodes.
Summary:
The original assumption for the insertDef method was that it would not
materialize Defs out of no-where, hence it will not insert phis needed
after inserting a Def.

However, when cloning an instruction (use case used in LICM), we do
materialize Defs "out of no-where". If the block receiving a Def has at
least one other Def, then no processing is needed. If the block just
received its first Def, we must check where Phi placement is needed.
The only new usage of insertDef is in LICM, hence the trigger for the bug.

But the original goal of the method also fails to apply for the move()
method. If we move a Def from the entry point of a diamond to either the
left or right blocks, then the merge block must add a phi.
While this usecase does not currently occur, or may be viewed as an
incorrect transformation, MSSA must behave corectly given the scenario.

Resolves PR40749 and PR40754.

Reviewers: george.burgess.iv

Subscribers: sanjoy, jlebar, Prazek, jdoerfert, llvm-commits

Tags: #llvm

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

llvm-svn: 355040
2019-02-27 22:20:22 +00:00
..
assume.ll
atomic-clobber.ll
basicaa-memcpy.ll
constant-memory.ll
cyclicphi.ll llvm: Add support for "-fno-delete-null-pointer-checks" 2018-07-09 22:27:23 +00:00
forward-unreachable.ll
function-clobber.ll
function-mem-attrs.ll
invariant-groups.ll [MemorySSA] Don't sort IDF blocks. 2018-05-15 18:40:29 +00:00
lifetime-simple.ll
load-invariant.ll
many-dom-backedge.ll [MemorySSA] Don't sort IDF blocks. 2018-05-15 18:40:29 +00:00
many-doms.ll [MemorySSA] Don't sort IDF blocks. 2018-05-15 18:40:29 +00:00
multi-edges.ll [MemorySSA] Don't sort IDF blocks. 2018-05-15 18:40:29 +00:00
multiple-backedges-hal.ll [MemorySSA] Don't sort IDF blocks. 2018-05-15 18:40:29 +00:00
multiple-locations.ll
no-disconnected.ll
optimize-use.ll [MSSA] Print more optimization information 2018-06-14 19:55:53 +00:00
phi-translation.ll [MemorySSA] Don't sort IDF blocks. 2018-05-15 18:40:29 +00:00
pr28880.ll
pr36883.ll [MemorySSA] Consider callsite args for hashing and equality. 2018-03-29 00:54:39 +00:00
pr39197.ll [MemorySSA & SimpleLoopUnswitch] Update MemorySSA in ReplaceUsesOfWith. 2019-02-26 19:44:52 +00:00
pr40037.ll [MemorySSA] Update test with minimized one. NFCI 2019-02-22 07:34:54 +00:00
pr40038.ll [MemorySSA & LoopPassManager] Resolve PR40038. 2019-02-22 07:18:37 +00:00
pr40509.ll [MemorySSA] Remove verifyClobberSanity. 2019-02-11 19:51:21 +00:00
pr40749.ll [MemorySSA] Make insertDef insert corresponding phi nodes. 2019-02-27 22:20:22 +00:00
pr40754.ll [MemorySSA] Make insertDef insert corresponding phi nodes. 2019-02-27 22:20:22 +00:00
ptr-const-mem.ll
volatile-clobber.ll