llvm-project/llvm/test/Transforms/MemCpyOpt
Reid Kleckner 84a2d29681 [BasicAA] Fix AA bug on dynamic allocas and stackrestore
Summary:
BasicAA has special logic for unescaped allocas, which normally applies
equally well to dynamic and static allocas. However, llvm.stackrestore
has the power to end the lifetime of dynamic allocas, without referring
to them directly.

stackrestore is already marked with the most conservative memory
modification attributes, but because the alloca is not escaped, the
normal logic produces incorrect results. I think BasicAA needs a special
case here to teach it about the relationship between dynamic allocas and
stackrestore.

Fixes PR40118

Reviewers: gbiv, efriedma, george.burgess.iv

Subscribers: hiraditya, llvm-commits

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

llvm-svn: 349945
2018-12-21 19:59:03 +00:00
..
2008-02-24-MultipleUseofSRet.ll
2008-03-13-ReturnSlotBitcast.ll
2011-06-02-CallSlotOverwritten.ll
align.ll
atomic.ll
callslot_aa.ll
callslot_deref.ll
callslot_throw.ll
capturing-func.ll
crash.ll
fca2memcpy.ll Merge clang's isRepeatedBytePattern with LLVM's isBytewiseValue 2018-09-21 05:17:42 +00:00
form-memset.ll
invariant.start.ll
lifetime.ll
load-store-to-memcpy.ll
loadstore-sret.ll
memcpy-to-memset-with-lifetimes.ll
memcpy-to-memset.ll Merge clang's isRepeatedBytePattern with LLVM's isBytewiseValue 2018-09-21 05:17:42 +00:00
memcpy-undef.ll
memcpy.ll
memmove.ll
memset-memcpy-oversized.ll Reapply "[MemCpyOpt] memset->memcpy forwarding with undef tail" 2018-12-13 20:04:27 +00:00
memset-memcpy-redundant-memset.ll
memset-memcpy-to-2x-memset.ll
nontemporal.ll
pr29105.ll
process_store.ll [MemCpyOpt] Skip optimizing basic blocks not reachable from entry 2018-04-23 19:55:04 +00:00
profitable-memset.ll
smaller.ll
sret.ll
stackrestore.ll [BasicAA] Fix AA bug on dynamic allocas and stackrestore 2018-12-21 19:59:03 +00:00