summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2014-08-02 14:51:24 +0000
committerJames Molloy <james.molloy@arm.com>2014-08-02 14:51:24 +0000
commitce45be04656bd33b6c35367677982293a06da7cc (patch)
tree5bd05a4b002a1cf48d2eaec2ea546d0fa501a3c2 /llvm/lib/CodeGen/SelectionDAG
parent8c112d838c34cef46adcf97bc1538f6ec24eb0b3 (diff)
downloadbcm5719-llvm-ce45be04656bd33b6c35367677982293a06da7cc.tar.gz
bcm5719-llvm-ce45be04656bd33b6c35367677982293a06da7cc.zip
[AArch64] Teach DAGCombiner that converting two consecutive loads into a vector load is not a good transform when paired loads are available.
The combiner was creating Q-register loads and stores, which then had to be spilled because there are no callee-save Q registers! llvm-svn: 214634
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index f71b956bcdc..b8baaadffcd 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -9414,6 +9414,13 @@ bool DAGCombiner::MergeConsecutiveStores(StoreSDNode* St) {
if (LoadNodes.size() < 2)
return false;
+ // If we have load/store pair instructions and we only have two values,
+ // don't bother.
+ unsigned RequiredAlignment;
+ if (LoadNodes.size() == 2 && TLI.hasPairedLoad(MemVT, RequiredAlignment) &&
+ St->getAlignment() >= RequiredAlignment)
+ return false;
+
// Scan the memory operations on the chain and find the first non-consecutive
// load memory address. These variables hold the index in the store node
// array.
OpenPOWER on IntegriCloud