Fix a potential bug in r183584.
authorShuxin Yang <shuxin.llvm@gmail.com>
Sat, 8 Jun 2013 04:56:05 +0000 (04:56 +0000)
committerShuxin Yang <shuxin.llvm@gmail.com>
Sat, 8 Jun 2013 04:56:05 +0000 (04:56 +0000)
commit9792b646c68d0dcee4049662091f1496b4c85ce7
tree3770a7ba7fe041ccb747d7ae33b4870ede6614d7
parentdbfb960e74cc37e7a066f7fbcf78e6936a9e7794
  Fix a potential bug in r183584.

  r183584 tries to derive some info from the code *AFTER* a call and apply
these derived info to the code *BEFORE* the call, which is not always safe
as the call in question may never return, and in this case, the derived
info is invalid.

  Thank Duncan for pointing out this potential bug.

rdar://14073661

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183606 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/MemCpyOptimizer.cpp
test/Transforms/MemCpyOpt/memcpy.ll