]> granicus.if.org Git - clang/commit
[X86][AVX] Ensure vector non-temporal load/store intrinsics force pointer alignment...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 29 Jul 2017 15:33:34 +0000 (15:33 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 29 Jul 2017 15:33:34 +0000 (15:33 +0000)
commit87f84e93649852012e6dfa3f8616789b2fd3a27d
treebce634c9a5feefccca255d337d8e6f865a0fdf0b
parent18ebb1b364a028b96837d4145cdb485303e9bd57
[X86][AVX] Ensure vector non-temporal load/store intrinsics force pointer alignment (PR33830)

Clang specifies a max type alignment of 16 bytes on darwin targets (annoyingly in the driver not via cc1), meaning that the builtin nontemporal stores don't correctly align the loads/stores to 32 or 64 bytes when required, resulting in lowering to temporal unaligned loads/stores.

This patch casts the vectors to explicitly aligned types prior to the load/store to ensure that the require alignment is respected.

Differential Revision: https://reviews.llvm.org/D35996

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309488 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Headers/avx2intrin.h
lib/Headers/avx512fintrin.h
lib/Headers/avxintrin.h
test/CodeGen/x86-nontemporal.c