diff options
| author | Renato Golin <renato.golin@linaro.org> | 2013-08-02 17:10:04 +0000 |
|---|---|---|
| committer | Renato Golin <renato.golin@linaro.org> | 2013-08-02 17:10:04 +0000 |
| commit | 38ffffeebc22ca8ea67456193672109a3adc11b6 (patch) | |
| tree | 53bc5400afc4d2d85115ff7dd9a6d6ed5252db2b /lib/Target/ARM | |
| parent | fdabd9f391c1c32c8800d1a07b03604b4a00ef3b (diff) | |
| download | external_llvm-38ffffeebc22ca8ea67456193672109a3adc11b6.zip external_llvm-38ffffeebc22ca8ea67456193672109a3adc11b6.tar.gz external_llvm-38ffffeebc22ca8ea67456193672109a3adc11b6.tar.bz2 | |
Fixes ARM LNT bot from SLP change in O3
This patch fixes the multiple breakages on ARM test-suite after the SLP
vectorizer was introduced by default on O3. The problem was an illegal
vector type on ARMTTI::getCmpSelInstrCost() <3 x i1> which is not simple.
The guard protects this code from breaking (cause of the problems) but
doesn't fix the issue that is generating the odd vector in the first
place, which also needs to be investigated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187658 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
| -rw-r--r-- | lib/Target/ARM/ARMTargetTransformInfo.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Target/ARM/ARMTargetTransformInfo.cpp b/lib/Target/ARM/ARMTargetTransformInfo.cpp index 5cc64de..34576ba 100644 --- a/lib/Target/ARM/ARMTargetTransformInfo.cpp +++ b/lib/Target/ARM/ARMTargetTransformInfo.cpp @@ -411,12 +411,14 @@ unsigned ARMTTI::getCmpSelInstrCost(unsigned Opcode, Type *ValTy, EVT SelCondTy = TLI->getValueType(CondTy); EVT SelValTy = TLI->getValueType(ValTy); - int Idx = ConvertCostTableLookup<MVT>(NEONVectorSelectTbl, - array_lengthof(NEONVectorSelectTbl), - ISD, SelCondTy.getSimpleVT(), - SelValTy.getSimpleVT()); - if (Idx != -1) - return NEONVectorSelectTbl[Idx].Cost; + if (SelCondTy.isSimple() && SelValTy.isSimple()) { + int Idx = ConvertCostTableLookup<MVT>(NEONVectorSelectTbl, + array_lengthof(NEONVectorSelectTbl), + ISD, SelCondTy.getSimpleVT(), + SelValTy.getSimpleVT()); + if (Idx != -1) + return NEONVectorSelectTbl[Idx].Cost; + } std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(ValTy); return LT.first; |
