From: Nirav Dave Date: Thu, 2 Feb 2017 14:39:26 +0000 (+0000) Subject: [X86,ISEL] Fix X86 increment chain dependence calculation X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a25e135627ee6e4cbd7bd73b00b2e184d9f243ea;p=llvm [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293892 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index 8ab4c061688..7f08d2dea9d 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/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; }