Fix a bug in memcpyopt where the memcpy-memcpy transform was never being applied...
authorOwen Anderson <resistor@mac.com>
Tue, 29 Apr 2008 21:26:06 +0000 (21:26 +0000)
committerOwen Anderson <resistor@mac.com>
Tue, 29 Apr 2008 21:26:06 +0000 (21:26 +0000)
commit9dcace3cafb4da5c3d94f3b89e54ea0d7164a286
tree44fe6fef30ab0ade1fffb7605e2acf6837b7d7b8
parent7b6fafaa8d2cd98c37a8978e8ccbbba91f834b3d
Fix a bug in memcpyopt where the memcpy-memcpy transform was never being applied because
we were checking for it in the wrong order.  This caused a miscompilation because the
return slot optimization assumes that the call it is dealing with is NOT a memcpy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50444 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/MemCpyOptimizer.cpp
test/Transforms/MemCpyOpt/2008-04-29-SRetRemoval.ll [new file with mode: 0644]