summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2015-04-17 21:02:30 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2015-04-17 21:02:30 +0000
commit2448ef5f33efb4e8a539d965f9d39d2ed4fd8fa9 (patch)
treebd72d7a1b118757ebba78b8bbb66ce76189f2fe2 /llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
parentdcd89368cb921d499ffde64e67995109adfe3fda (diff)
downloadbcm5719-llvm-2448ef5f33efb4e8a539d965f9d39d2ed4fd8fa9.tar.gz
bcm5719-llvm-2448ef5f33efb4e8a539d965f9d39d2ed4fd8fa9.zip
[AArch64] Avoid vector->load dependency cycles when creating LD1*post.
They would break the SelectionDAG. Note that the opposite load->vector dependency is already obvious in: (LD1*post vec, ..) llvm-svn: 235224
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64ISelLowering.cpp')
-rw-r--r--llvm/lib/Target/AArch64/AArch64ISelLowering.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 90a5e5ef6b7..3dc236a89da 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -8116,6 +8116,13 @@ static SDValue performPostLD1Combine(SDNode *N,
Inc = DAG.getRegister(AArch64::XZR, MVT::i64);
}
+ // Finally, check that the vector doesn't depend on the load.
+ // Again, this would create a cycle.
+ // The load depending on the vector is fine, as that's the case for the
+ // LD1*post we'll eventually generate anyway.
+ if (LoadSDN->isPredecessorOf(Vector.getNode()))
+ continue;
+
SmallVector<SDValue, 8> Ops;
Ops.push_back(LD->getOperand(0)); // Chain
if (IsLaneOp) {
OpenPOWER on IntegriCloud