[PATCH] D61764: [LV] Suppress vectorization in some nontemporal cases

Warren Ristow via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 15:27:59 PDT 2019


wristow added a comment.

One point I want to explicitly raise, is that prior to this proposed change, the current vectorization implementation ignores the nontemporal hint when checking whether a memory op is vectorizable.  So conceptually, it's as though the two new routines:
`bool isLegalNTStore(Type *DataType, unsigned Alignment)`
`bool isLegalNTLoad(Type *DataType, unsigned Alignment)`
return true for all types and alignments.  With that in mind, I've made the (default) target-independent implementations of these functions return true -- it's only the overriding functions on X86 (which is the target PR40759 was reported against) that will ever return false here (so on non X86 targets, this would be an NFC commit).  But in looking through the other backends, I believe that none of them support misaligned nontemporal mem ops.  So possibly a better default would be to have these new functions return true only if the specified `DataType` is minimally aligned at `Alignment`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61764/new/

https://reviews.llvm.org/D61764





More information about the llvm-commits mailing list