[DAGCombine] Refactor ReduceLoadWidth
authorSam Parker <sam.parker@arm.com>
Thu, 30 Nov 2017 11:49:11 +0000 (11:49 +0000)
committerSam Parker <sam.parker@arm.com>
Thu, 30 Nov 2017 11:49:11 +0000 (11:49 +0000)
commit4bd776e0019c33fcb878dc52e0cceb41c3b74766
tree795dbec2c06cbe64085302fa6a33016c10b21fbf
parenta4097075e243b9943be94a21e93e2f82655e9de3
[DAGCombine] Refactor ReduceLoadWidth

visitAND attempts to narrow the width of extending loads that are
then masked off. ReduceLoadWidth already exists for a similar purpose
and handles shifts, so I've moved the code to handle AND nodes there.

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

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