The changeToCall function did not preserve the invoke's metadata. Whether a call or invoke, the callee will access the same elements and therefore we can preserve the loop-parallel access metadata.
Copy the llvm.mem.parallel_loop_access from the invoke instruction before replacing it.
This fixes http://llvm.org/PR39994
Suggested-by: Moritz Kreutzer <moritz.kreutzer@siemens.com>