SROA doesn't preserve the llvm.mem.parallel_loop_access metadata when it transforms loads/stores.
(This patch is not a systematic effort to catch all the cases missed by SROA, but it at least covers those exposed by this testcase / by PR28981).
Differential D23549
[SROA] Preserve llvm.mem.parallel_loop_access metadata dorit on Aug 16 2016, 5:32 AM. Authored by
Details SROA doesn't preserve the llvm.mem.parallel_loop_access metadata when it transforms loads/stores. (This patch is not a systematic effort to catch all the cases missed by SROA, but it at least covers those exposed by this testcase / by PR28981).
Diff Detail Event TimelineComment Actions
The higher-level questions here clearly seem to be:
Comment Actions Off the top of my head I can't figure out how it could do this anywhere other than the PHI speculation parts.
I can absolutely believe we're dropping metadata when we rewrite stuff but fail to promote it to registers. I think the rewriting logic here never got the most careful of analysis because we "usually" think of it as rewriting in preparation for promotion, but we definitely have lots of rewrites at this point that don't involve in promotion so we should probably systematically go through this. Comment Actions Slightly updated the testcase: Moved the RUN command to the top of the file; added CHECK and CHECK-NOTs to verify not only that stores without metadata don't appear before the first positive match, but that they also don't appear between and after the positive matches. Comment Actions ...
Agreed... Is it ok though to commit this patch, as a tiny step towards that (which allows the mem.parallel tags reach the vectorizer) ?
|
Please use copyMetadata() instead.