The transform:
llvm.lifetime.start(%tmp5) llvm.lifetime.memcpy(%arg1, %tmp5)
->
llvm.lifeitme.memcpy(%arg1, %tmp5) llvm.lifetime.start(%arg1)
is wrong, since then lifetime.start doesn't operate on an alloca, and lifetime.start and lifetime.end don't match anymore.
We might be able to move this check to line 1184 before we call the function... or maybe hoist the conditions a bit and handle it for processStore as well?
Thoughts?