[DAGCombine] Refactor DAGCombiner::ReduceLoadWidth. NFCI
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Tue, 11 Jan 2022 21:59:18 +0000 (22:59 +0100)
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Sun, 16 Jan 2022 19:24:52 +0000 (20:24 +0100)
commit9f237c9e7d88033bd777494dcc06fa5b74ee4fec
treeea93eda05dad7d63029c1d1b3e3852bf9370bfc7
parent37e6496c800b33cbf6f7967d90eab53327147478
[DAGCombine] Refactor DAGCombiner::ReduceLoadWidth. NFCI

Update code comments in DAGCombiner::ReduceLoadWidth and refactor
the handling of SRL a bit. The refactoring is done with the intent
of adding support for folding away SRA by using SEXTLOAD in a
follow-up patch.

The function is also renamed as DAGCombiner::reduceLoadWidth.

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