diff options
Diffstat (limited to 'llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp index 79f56a4b68c..5cc64ded465 100644 --- a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp +++ b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp @@ -426,6 +426,15 @@ unsigned ARMTTI::getCmpSelInstrCost(unsigned Opcode, Type *ValTy,  }  unsigned ARMTTI::getAddressComputationCost(Type *Ty, bool IsComplex) const { +  // Address computations in vectorized code with non-consecutive addresses will +  // likely result in more instructions compared to scalar code where the +  // computation can more often be merged into the index mode. The resulting +  // extra micro-ops can significantly decrease throughput. +  unsigned NumVectorInstToHideOverhead = 10; + +  if (Ty->isVectorTy() && IsComplex) +    return NumVectorInstToHideOverhead; +    // In many cases the address computation is not merged into the instruction    // addressing mode.    return 1; | 

