summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorNirav Dave <niravd@google.com>2017-02-02 14:39:26 +0000
committerNirav Dave <niravd@google.com>2017-02-02 14:39:26 +0000
commite14300e2706a7a1716559cc2afeaaf91fa0b2f01 (patch)
tree5625179fca5b2126426c0e4237c52a2679ae0f96 /llvm
parentb6ccd38deecfcdb62280491553ad558efe5db6ec (diff)
downloadbcm5719-llvm-e14300e2706a7a1716559cc2afeaaf91fa0b2f01.tar.gz
bcm5719-llvm-e14300e2706a7a1716559cc2afeaaf91fa0b2f01.zip
[X86,ISEL] Fix X86 increment chain dependence calculation
Merging Load-add-store pattern into a increment op previously dropped the load's chain from the instructions dependence if the store is chained to a TokenFactor. llvm-svn: 293892
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/X86/X86ISelDAGToDAG.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index 8ab4c061688..7f08d2dea9d 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -1905,6 +1905,8 @@ static bool isLoadIncOrDecStore(StoreSDNode *StoreNode, unsigned Opc,
SDValue Op = Chain.getOperand(i);
if (Op == Load.getValue(1)) {
ChainCheck = true;
+ // Drop Load, but keep its chain. No cycle check necessary.
+ ChainOps.push_back(Load.getOperand(0));
continue;
}
OpenPOWER on IntegriCloud