[PATCH] D13698: [x86][FastISel] Teach how to select nontemporal stores.

Andrea Di Biagio via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 13 07:48:48 PDT 2015


andreadb created this revision.
andreadb added reviewers: qcolombet, ributzka.
andreadb added a subscriber: llvm-commits.

This patch teaches x86 fast-isel how to select nontemporal stores.

On x86, we can use MOVNTI for nontemporal stores of doublewords/quadwords.
Instructions (V)MOVNTPS/PD/DQ can be used for SSE2/AVX aligned nontemporal vector stores.

Before this patch, fast-isel always selected 'movd/movq' instead of 'movnti' for doubleword/quadword nontemporal stores. In the case of nontemporal stores of aligned vectors, fast-isel always selected movaps/movapd/movdqa instead of movntps/movntpd/movntdq.

With this patch, if we use SSE2/AVX intrinsics for nontemporal stores we now always get the expected (V)MOVNT instructions. The lack of fast-isel support for nontemporal stores was spotted when analyzing the -O0 codegen for nontemporal stores.
This patch is a very minor improvement over the existing behavior (at -O0 we probably don't care so much about improving the performance of these stores..).

Please let me know if okay to submit.

Thanks!

http://reviews.llvm.org/D13698

Files:
  lib/Target/X86/X86FastISel.cpp
  test/CodeGen/X86/fast-isel-nontemporal.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13698.37249.patch
Type: text/x-patch
Size: 5176 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151013/89f47d15/attachment.bin>


More information about the llvm-commits mailing list