llvm-project/llvm/test/Transforms/MemCpyOpt
Chris Lattner 83791ced7b Teach valuetracking that byval arguments with a specified alignment are
aligned.

Teach memcpyopt to not give up all hope when confonted with an underaligned
memcpy feeding an overaligned byval.  If the *source* of the memcpy can be
determined to be adequeately aligned, or if it can be forced to be, we can
eliminate the memcpy.

This addresses PR9794.  We now compile the example into:

define i32 @f(%struct.p* nocapture byval align 8 %q) nounwind ssp {
entry:
  %call = call i32 @g(%struct.p* byval align 8 %q) nounwind
  ret i32 %call
}

in both x86-64 and x86-32 mode.  We still don't get a tailcall though,
because tailcalls apparently can't handle byval.

llvm-svn: 131884
2011-05-23 00:03:39 +00:00
..
2008-02-24-MultipleUseofSRet.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
2008-03-13-ReturnSlotBitcast.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
align.ll fix typo 2011-01-10 02:33:34 +00:00
crash.ll fix PR8753, eliminating a case where we'd infinitely make a 2010-12-09 07:39:50 +00:00
dg.exp
form-memset.ll revert 123144, reenabling the rest of memset formation. 2011-01-12 03:25:15 +00:00
loadstore-sret.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
memcpy-to-memset.ll MemCpyOpt: Turn memcpys from a constant into a memset if possible. 2010-12-24 21:17:12 +00:00
memcpy.ll Teach valuetracking that byval arguments with a specified alignment are 2011-05-23 00:03:39 +00:00
memmove.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
smaller.ll Actually check memcpy lengths, instead of just commenting about 2011-01-21 22:07:57 +00:00
sret.ll Implement PR8644: forwarding a memcpy value to a byval, 2010-11-21 00:28:59 +00:00