[DAGCombiner] cache negative result from getMergeStoreCandidates() (#106949)
commitb3731b36421e23737be2b4785700267b96c3241f
authorPrinceton Ferro <pferro@nvidia.com>
Wed, 4 Sep 2024 14:18:53 +0000 (4 07:18 -0700)
committerTobias Hieta <tobias@hieta.se>
Tue, 1 Oct 2024 06:47:51 +0000 (1 08:47 +0200)
treea07a1660a909ff45b200dec88b84537514135b90
parent149bfdd61c961edbf49c2ea7fadf9d3c1a79a55e
[DAGCombiner] cache negative result from getMergeStoreCandidates() (#106949)

Cache negative search result from getStoreMergeCandidates() so that
mergeConsecutiveStores() does not iterate quadratically over a
potentially long sequence of unmergeable stores.

(cherry picked from commit 8f77d37f256809766fd83a09c6d144b785e9165a)
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp