llvm-project/llvm/test/Transforms/MemCpyOpt
Chandler Carruth 18cee1defc Fix a really bad miscompile introduced in r216865 - the else-if logic
chain became completely broken here as *all* intrinsic users ended up
being skipped, and the ones that seemed to be singled out were actually
the exact wrong set.

This is a great example of why long else-if chains can be easily
confusing. Switch the entire code to use early exits and early continues
to have simpler (and more importantly, correct) logic here, as well as
fixing the reversed logic for detecting and continuing on lifetime
intrinsics.

I've also significantly cleaned up the test case and added another test
case demonstrating an example where the optimization is not (trivially)
safe to perform.

llvm-svn: 216871
2014-09-01 10:09:18 +00:00
..
2008-02-24-MultipleUseofSRet.ll Don't eliminate memcpy's when the address of the pointer may itself be relevant. Fixes PR18304. Patch by David Wiberg! 2014-07-14 18:52:02 +00:00
2008-03-13-ReturnSlotBitcast.ll Don't eliminate memcpy's when the address of the pointer may itself be relevant. Fixes PR18304. Patch by David Wiberg! 2014-07-14 18:52:02 +00:00
2011-06-02-CallSlotOverwritten.ll
align.ll Update Transforms tests to use CHECK-LABEL for easier debugging. No functionality change. 2013-07-14 01:42:54 +00:00
atomic.ll
capturing-func.ll Don't eliminate memcpy's when the address of the pointer may itself be relevant. Fixes PR18304. Patch by David Wiberg! 2014-07-14 18:52:02 +00:00
crash.ll
form-memset.ll MemCpyOpt: When merging memsets also merge the trivial case of two memsets with the same destination. 2014-03-10 21:05:13 +00:00
loadstore-sret.ll Don't eliminate memcpy's when the address of the pointer may itself be relevant. Fixes PR18304. Patch by David Wiberg! 2014-07-14 18:52:02 +00:00
memcpy-to-memset-with-lifetimes.ll Fix a really bad miscompile introduced in r216865 - the else-if logic 2014-09-01 10:09:18 +00:00
memcpy-to-memset.ll Update Transforms tests to use CHECK-LABEL for easier debugging. No functionality change. 2013-07-14 01:42:54 +00:00
memcpy-undef.ll Treat lifetime.start'd memory like we treat freshly alloca'd memory. Patch by Björn Steinbrink! 2014-03-26 23:45:15 +00:00
memcpy.ll Don't eliminate memcpy's when the address of the pointer may itself be relevant. Fixes PR18304. Patch by David Wiberg! 2014-07-14 18:52:02 +00:00
memmove.ll Update Transforms tests to use CHECK-LABEL for easier debugging. No functionality change. 2013-07-14 01:42:54 +00:00
smaller.ll
sret.ll Don't eliminate memcpy's when the address of the pointer may itself be relevant. Fixes PR18304. Patch by David Wiberg! 2014-07-14 18:52:02 +00:00