Relax the checking on zextload generation a bit, since as sabre pointed out
authorNate Begeman <natebegeman@mac.com>
Fri, 14 Oct 2005 01:12:21 +0000 (01:12 +0000)
committerNate Begeman <natebegeman@mac.com>
Fri, 14 Oct 2005 01:12:21 +0000 (01:12 +0000)
commit5054f162127f19ad43bc4d0b8ab232f0fee32953
tree446b76ebb11cca31c486a85b8f4845bdceaa7564
parent40f44f1f58f823994b7f4ec4005887c3955fb1e7
Relax the checking on zextload generation a bit, since as sabre pointed out
you could be AND'ing with the result of a shift that shifts out all the
bits you care about, in addition to a constant.

Also, move over an add/sub_parts fold from legalize to the dag combiner,
where it works for things other than constants.  Woot!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23720 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp