DAGCombiner: fix use-after-free when merging consecutive stores
authorNicolai Haehnle <nhaehnle@gmail.com>
Thu, 3 Nov 2016 14:25:04 +0000 (14:25 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Thu, 3 Nov 2016 14:25:04 +0000 (14:25 +0000)
commitbea772c6dc0ea4b9c102f9ff132967452bb3e8fa
treed47029216c22256b06426643f67939945339975f
parentf75d9d5863d93670459d75ac860019f80744026a
DAGCombiner: fix use-after-free when merging consecutive stores

Summary:
Have MergeConsecutiveStores explicitly return information about the stores
that were merged, so that we can safely determine whether the starting
node has been freed.

Reviewers: chandlerc, bogner, niravd

Subscribers: llvm-commits

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

llvm-svn: 285916
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp