Slightly generalize transformation of memmove(a,a,n) so that it also applies
authorEli Friedman <eli.friedman@gmail.com>
Thu, 17 Dec 2009 21:07:31 +0000 (21:07 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Thu, 17 Dec 2009 21:07:31 +0000 (21:07 +0000)
commit0c826d98b39e941fad96ffaf32c23d3fae447a19
treec50a958058ab16b54ef987519cb3358a3bd01da0
parent88cd3582b6cb70c0283e4c5d6d783114323a1ce1
Slightly generalize transformation of memmove(a,a,n) so that it also applies
to memcpy. (Such a memcpy is technically illegal, but in practice is safe
and is generated by struct self-assignment in C code.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91621 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/memcpy.ll [new file with mode: 0644]