[llvm] r293892 - [X86, ISEL] Fix X86 increment chain dependence calculation

Nirav Dave via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 06:39:27 PST 2017


Author: niravd
Date: Thu Feb  2 08:39:26 2017
New Revision: 293892

URL: http://llvm.org/viewvc/llvm-project?rev=293892&view=rev
Log:
[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.

Modified:
    llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=293892&r1=293891&r2=293892&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Feb  2 08:39:26 2017
@@ -1905,6 +1905,8 @@ static bool isLoadIncOrDecStore(StoreSDN
       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;
       }
 




More information about the llvm-commits mailing list