Being dereferenceable isn't sufficient for call slot optimization.
Added a big comment clarifying when exactly the optimization is safe.
Fixes PR27849. Reverts code change from r219950.
| Paths 
 |  Differential  D20553  
Fix over-aggressive call slot optimization in memcpyopt. AbandonedPublic Authored by eli.friedman on May 23 2016, 9:13 PM. 
Details 
Diff Detail Event Timelineeli.friedman retitled this revision from  to Fix over-aggressive call slot optimization in memcpyopt.. eli.friedman updated this object. This revision is now accepted and ready to land.May 24 2016, 7:01 PM Comment Actions Ugh, I forgot you had this review out; I committed a fix for the same issue in r270892... Sorry about that :/ 
Revision Contents 
 
 
Diff 58186 lib/Transforms/Scalar/MemCpyOptimizer.cpp
 test/Transforms/MemCpyOpt/callslot_deref.ll
 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||