[PATCH] D22399: [LoopDataPrefetch/AArch64] Don't add prefetch intrinsic, when the loop already has InlineAsm prefetch.

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 14:41:21 PDT 2016


t.p.northover added a comment.

This is a pretty nasty hack. The only other place I know of where we inspect inline asm  (also poorly) is in BranchRelaxation when we need to know how big it is. This is justified only by the fact that it's a major correctness issue if we don't.

We have no idea if the prefetch is for the address we're considering, or even if it actually exists! (e.g. asm volatile("; We don't want a prfm here\n\t" ...)).

IMO, users should be encouraged to use the ACLE intrinsics instead. They produce completely sensible @llvm.prefetch instructions LLVM can reason about properly.


https://reviews.llvm.org/D22399





More information about the llvm-commits mailing list