diff options
author | Jakub Staszak <kubastaszak@gmail.com> | 2012-12-18 22:57:56 +0000 |
---|---|---|
committer | Jakub Staszak <kubastaszak@gmail.com> | 2012-12-18 22:57:56 +0000 |
commit | 270bfbd3d1fb42000b23e5747ac7957b0e9fcab8 (patch) | |
tree | a02a1200432bd5837eecf165aa62f24aad708bad /lib/Target/X86/X86ISelLowering.cpp | |
parent | 9466bdebb7a239c0f469ae5c9aa1b94d2e2700f9 (diff) | |
download | llvm-270bfbd3d1fb42000b23e5747ac7957b0e9fcab8.tar.gz llvm-270bfbd3d1fb42000b23e5747ac7957b0e9fcab8.tar.bz2 llvm-270bfbd3d1fb42000b23e5747ac7957b0e9fcab8.tar.xz |
Reverse order of checking SSE level when calculating compare cost, so we check
AVX2 before AVX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170464 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 34ca24f6d1..42d62b2a72 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -17866,10 +17866,10 @@ unsigned X86VectorTargetTransformInfo::getCmpSelInstrCost(unsigned Opcode, { ISD::SETCC, MVT::v32i8, 1 }, }; - if (ST.hasSSE42()) { - int Idx = FindInTable(SSE42CostTbl, array_lengthof(SSE42CostTbl), ISD, MTy); + if (ST.hasAVX2()) { + int Idx = FindInTable(AVX2CostTbl, array_lengthof(AVX2CostTbl), ISD, MTy); if (Idx != -1) - return LT.first * SSE42CostTbl[Idx].Cost; + return LT.first * AVX2CostTbl[Idx].Cost; } if (ST.hasAVX()) { @@ -17878,10 +17878,10 @@ unsigned X86VectorTargetTransformInfo::getCmpSelInstrCost(unsigned Opcode, return LT.first * AVX1CostTbl[Idx].Cost; } - if (ST.hasAVX2()) { - int Idx = FindInTable(AVX2CostTbl, array_lengthof(AVX2CostTbl), ISD, MTy); + if (ST.hasSSE42()) { + int Idx = FindInTable(SSE42CostTbl, array_lengthof(SSE42CostTbl), ISD, MTy); if (Idx != -1) - return LT.first * AVX2CostTbl[Idx].Cost; + return LT.first * SSE42CostTbl[Idx].Cost; } return VectorTargetTransformImpl::getCmpSelInstrCost(Opcode, ValTy, CondTy); |