llvm-project/llvm/test/Transforms/DeadStoreElimination
Reid Kleckner 40e7663b1f [BasicAA] Don't assume tail calls with byval don't alias allocas
Summary:
Calls marked 'tail' cannot read or write allocas from the current frame
because the current frame might be destroyed by the time they run.
However, a tail call may use an alloca with byval. Calling with byval
copies the contents of the alloca into argument registers or stack
slots, so there is no lifetime issue. Tail calls never modify allocas,
so we can return just ModRefInfo::Ref.

Fixes PR38466, a longstanding bug.

Reviewers: hfinkel, nlewycky, gbiv, george.burgess.iv

Subscribers: hiraditya, llvm-commits

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

llvm-svn: 339636
2018-08-14 01:24:35 +00:00
..
2011-03-25-DSEMiscompile.ll
2011-09-06-EndOfFunction.ll
2011-09-06-MemCpy.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
2016-07-17-UseAfterFree.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
OverwriteStoreBegin.ll [DSE] Teach the pass about partial overwrite of atomic memory intrinsics 2018-05-10 15:12:49 +00:00
OverwriteStoreEnd.ll [DSE] Teach the pass about partial overwrite of atomic memory intrinsics 2018-05-10 15:12:49 +00:00
PartialStore.ll
atomic.ll
calloc-store.ll
combined-partial-overwrites.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
const-pointers.ll
crash.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
cs-cs-aliasing.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
debuginfo.ll [Debugify] Move debug value intrinsics closer to their operand defs 2018-06-06 19:05:42 +00:00
dominate.ll
fence.ll
free.ll
inst-limits.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
int_sideeffect.ll
invariant.start.ll
launder.invariant.group.ll Implement strip.invariant.group 2018-07-02 04:49:30 +00:00
libcalls.ll
lifetime.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
mda-with-dbg-values.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
memintrinsics.ll [DSE] Teach the pass that atomic memory intrinsics are stores. 2018-04-23 19:06:49 +00:00
merge-stores-big-endian.ll
merge-stores.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
no-targetdata.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
operand-bundles.ll
pr11390.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
simple.ll [DSE] Teach the pass that atomic memory intrinsics are stores. 2018-04-23 19:06:49 +00:00
tail-byval.ll [BasicAA] Don't assume tail calls with byval don't alias allocas 2018-08-14 01:24:35 +00:00