[SDAG] clean up scalarizing load transform
authorSanjay Patel <spatel@rotateright.com>
Sat, 12 Feb 2022 15:34:51 +0000 (10:34 -0500)
committerSanjay Patel <spatel@rotateright.com>
Sat, 12 Feb 2022 16:41:19 +0000 (11:41 -0500)
commit96b7e0b5a0c6bd5742af783ed83cc41c299e9472
treee04b15f6f3c8322b18ee341e15bbb1d116c8f9fd
parent1f43367377d517a9da3b7fbfb457d92ad68146a1
[SDAG] clean up scalarizing load transform

I have not found a way to expose a difference for this patch in a test
because it only triggers for a one-use load, but this is the code that
was adapted into D118376 and caused miscompiles. The new code pattern
is the same as what we do in narrowExtractedVectorLoad() (reduces load
width for a subvector extract).

This removes seemingly unnecessary manual worklist management and fixes
the chain updating via "SelectionDAG::makeEquivalentMemoryOrdering()".

Differential Revision: https://reviews.llvm.org/D119549
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp