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)
commit501890e909c20869a3d2a092d0c4548fc2f3fcd3
treea37e77af9f6f68bfbb52ada242819ea5caecfa94
parent44b82359c930bf35a6a03a0db4d0fe322c025a17
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

llvm-svn: 222544
llvm/lib/Target/X86/X86.td
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86Subtarget.cpp
llvm/lib/Target/X86/X86Subtarget.h
llvm/test/CodeGen/X86/2012-05-19-avx2-store.ll [deleted file]
llvm/test/CodeGen/X86/unaligned-32-byte-memops.ll [new file with mode: 0644]