Recommit r360171: [DAGCombiner] Avoid creating large tokenfactors in visitTokenFactor.
authorFlorian Hahn <flo@fhahn.com>
Mon, 3 Jun 2019 01:30:19 +0000 (01:30 +0000)
committerFlorian Hahn <flo@fhahn.com>
Mon, 3 Jun 2019 01:30:19 +0000 (01:30 +0000)
commite71963c850d42f6d318af984d88afe859c2ba5ff
tree3fc67ee55b2328b4021486572ec682c1a439a712
parent382320ea025ff5c2c4d54389c822c6b817d67d4a
Recommit r360171: [DAGCombiner] Avoid creating large tokenfactors in visitTokenFactor.

If we hit the limit, we do expand the outstanding tokenfactors.
Otherwise, we might drop nodes with users in the unexpanded
tokenfactors. This fixes the crashes reported by Jordan Rupprecht.

Reviewers: niravd, spatel, craig.topper, rupprecht

Reviewed By: niravd

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

llvm-svn: 362350
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/dagcombine-tokenfactor-limit-crash.ll [new file with mode: 0644]