summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorMatthew Simpson <mssimpso@codeaurora.org>2016-12-15 18:36:59 +0000
committerMatthew Simpson <mssimpso@codeaurora.org>2016-12-15 18:36:59 +0000
commit2c8de192a1eab0f60c3c3ccc3652e22cba275a82 (patch)
tree4270af75ada1c147a736e2e6221687360da1266b /llvm/lib
parent2a26a5f1f0694c07a3d6f4dcb312476c912d1ea9 (diff)
downloadbcm5719-llvm-2c8de192a1eab0f60c3c3ccc3652e22cba275a82.tar.gz
bcm5719-llvm-2c8de192a1eab0f60c3c3ccc3652e22cba275a82.zip
[AArch64] Guard Misaligned 128-bit store penalty by subtarget feature
This patch checks that the SlowMisaligned128Store subtarget feature is set when penalizing such stores in getMemoryOpCost. Differential Revision: https://reviews.llvm.org/D27677 llvm-svn: 289845
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index ecf4d93068a..88c98865bbc 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -467,7 +467,8 @@ int AArch64TTIImpl::getMemoryOpCost(unsigned Opcode, Type *Src,
unsigned Alignment, unsigned AddressSpace) {
std::pair<int, MVT> LT = TLI->getTypeLegalizationCost(DL, Src);
- if (Opcode == Instruction::Store && Src->isVectorTy() && Alignment != 16 &&
+ if (ST->isMisaligned128StoreSlow() && Opcode == Instruction::Store &&
+ Src->isVectorTy() && Alignment != 16 &&
Src->getVectorElementType()->isIntegerTy(64)) {
// Unaligned stores are extremely inefficient. We don't split
// unaligned v2i64 stores because the negative impact that has shown in
OpenPOWER on IntegriCloud