use v8i32 as optimal mem type over v8f32 if AVX2 is enabled. Similar to SSE2 vs SSE1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148109 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2012-01-13 08:32:21 +00:00
parent 12216172c0
commit 562659ff6b

View File

@ -1327,9 +1327,12 @@ X86TargetLowering::getOptimalMemOpType(uint64_t Size,
((DstAlign == 0 || DstAlign >= 16) && ((DstAlign == 0 || DstAlign >= 16) &&
(SrcAlign == 0 || SrcAlign >= 16))) && (SrcAlign == 0 || SrcAlign >= 16))) &&
Subtarget->getStackAlignment() >= 16) { Subtarget->getStackAlignment() >= 16) {
if (Subtarget->hasAVX() && if (Subtarget->getStackAlignment() >= 32) {
Subtarget->getStackAlignment() >= 32) if (Subtarget->hasAVX2())
return MVT::v8f32; return MVT::v8i32;
if (Subtarget->hasAVX())
return MVT::v8f32;
}
if (Subtarget->hasSSE2()) if (Subtarget->hasSSE2())
return MVT::v4i32; return MVT::v4i32;
if (Subtarget->hasSSE1()) if (Subtarget->hasSSE1())