[MemorySSA] Update last_access_in_block check.
authorAlina Sbirlea <asbirlea@google.com>
Tue, 1 Oct 2019 18:34:39 +0000 (18:34 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Tue, 1 Oct 2019 18:34:39 +0000 (18:34 +0000)
commitae40dfc1e3ce5f64be3234ed7958792f15800181
treec4bad81a6b3f16187bcc101b7886012eebf055ee
parent2cee0e2d97c4f6fcb6cfcadf0e449f5ed714a72c
[MemorySSA] Update last_access_in_block check.

The check for "was there an access in this block" should be: is the last
access in this block and is it not a newly inserted phi.
Resolves new test in PR43438.

Also fix a typo when simplifying trivial Phis to match the comment.

llvm-svn: 373380
llvm/lib/Analysis/MemorySSAUpdater.cpp
llvm/test/Analysis/MemorySSA/pr43438.ll