Add a feature flag for slow 32-byte unaligned memory accesses [x86].
authorSanjay Patel <spatel@rotateright.com>
Fri, 21 Nov 2014 17:40:04 +0000 (17:40 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 21 Nov 2014 17:40:04 +0000 (17:40 +0000)
commit28660d4b2fd710ff4b41d34e45c1e577d0f07e80
tree7b5a78e18fd5953d47a4cb838673330b27762782
parent95bafa2a1fbdf7ddcd2f027afe40f9c17cb9516f
Add a feature flag for slow 32-byte unaligned memory accesses [x86].

This patch adds a feature flag to avoid unaligned 32-byte load/store AVX codegen
for Sandy Bridge and Ivy Bridge. There is no functionality change intended for
those chips. Previously, the absence of AVX2 was being used as a proxy to detect
this feature. But that hindered codegen for AVX-enabled AMD chips such as btver2
that do not have the 32-byte unaligned access slowdown.

Performance measurements are included in PR21541 ( http://llvm.org/bugs/show_bug.cgi?id=21541 ).

Differential Revision: http://reviews.llvm.org/D6355

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222544 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86.td
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86Subtarget.cpp
lib/Target/X86/X86Subtarget.h
test/CodeGen/X86/2012-05-19-avx2-store.ll [deleted file]
test/CodeGen/X86/unaligned-32-byte-memops.ll [new file with mode: 0644]