This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Fix visitSTORE to continue processing current SDNode, if findBetterNeighborChains doesn't actually CombineTo it.
ClosedPublic

Authored by timshen on Jun 24 2016, 11:02 AM.

Details

Summary

findBetterNeighborChains may or may not find a better chain for each node it finds, which include the node ("St") that visitSTORE is currently processing. If no better chain is found for St, visitSTORE should continue instead of return SDValue(St, 0), as if it's CombinedTo'ed.

This fixes bug 28130. There might be other ways to make the test pass (see D21409). I think both of the patches are fixing actual bugs revealed by the same testcase.

Diff Detail

Repository
rL LLVM

Event Timeline

timshen updated this revision to Diff 61812.Jun 24 2016, 11:02 AM
timshen retitled this revision from to [DAGCombiner] Fix visitSTORE to continue processing current SDNode, if findBetterNeighborChains doesn't actually CombineTo it..
timshen updated this object.
timshen updated this revision to Diff 62441.Jun 30 2016, 4:42 PM

Update Chain outside of findBetterNeighborChains.

timshen updated this revision to Diff 62514.Jul 1 2016, 11:18 AM

Updated comment for findBetterNeighborChains.

timshen accepted this revision.Jul 5 2016, 2:49 PM
timshen added a reviewer: timshen.

LGTMed by bogner in the email thread.

This revision is now accepted and ready to land.Jul 5 2016, 2:49 PM
This revision was automatically updated to reflect the committed changes.