]> granicus.if.org Git - llvm/commitdiff
[SelectionDAG] Split very large token factors for chained stores to 64k chunks.
authorFlorian Hahn <flo@fhahn.com>
Fri, 18 Jan 2019 18:37:38 +0000 (18:37 +0000)
committerFlorian Hahn <flo@fhahn.com>
Fri, 18 Jan 2019 18:37:38 +0000 (18:37 +0000)
Similar to D55073. Without this change, the DAG combiner crashes on code
with more than 64k of stores in a single basic block that form parallelizable
chains.

No test case, as it would be very IR file.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D56740

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351571 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index ff5505c9772137251442e7e68b80a59b20530dab..416f535870aea2061a94a9e7299a1d105279f746 100644 (file)
@@ -19349,7 +19349,7 @@ bool DAGCombiner::parallelizeChainedStores(StoreSDNode *St) {
   if (AddNewChain)
     TFOps.insert(TFOps.begin(), NewChain);
 
-  SDValue TF = DAG.getNode(ISD::TokenFactor, SDLoc(STChain), MVT::Other, TFOps);
+  SDValue TF = DAG.getTokenFactor(SDLoc(STChain), TFOps);
   CombineTo(St, TF);
 
   AddToWorklist(STChain);