X86: Enable SSE memory intrinsics even when stack alignment is less than 16 bytes.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 14 Nov 2012 20:08:40 +0000 (20:08 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 14 Nov 2012 20:08:40 +0000 (20:08 +0000)
commit2dbe929685da37e904d6bb0c5a3504e1bafe348f
tree1d50f76beb60b492c0c66395316c637c02baa262
parent97d19ebe5b5bf27617e536a16fa232116cefe914
X86: Enable SSE memory intrinsics even when stack alignment is less than 16 bytes.

The stack realignment code was fixed to work when there is stack realignment and
a dynamic alloca is present so this shouldn't cause correctness issues anymore.

Note that this also enables generation of AVX instructions for memset
under the assumptions:
- Unaligned loads/stores are always fast on CPUs supporting AVX
- AVX is not slower than SSE
We may need some tweaked heuristics if one of those assumptions turns out not to
be true.

Effectively reverts r58317. Part of PR2962.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167967 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/2008-10-27-StackRealignment.ll [deleted file]
test/CodeGen/X86/memcpy-2.ll
test/CodeGen/X86/memset-sse-stack-realignment.ll [new file with mode: 0644]
test/CodeGen/X86/memset64-on-x86-32.ll