DAGCombiner: Factor out some and/or combines.
authorMatthias Braun <matze@braunis.de>
Fri, 6 Mar 2015 19:49:06 +0000 (19:49 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 6 Mar 2015 19:49:06 +0000 (19:49 +0000)
commitfdd8f37dc6bed238496c8f5ce18bd52eaac760b0
tree7381a40dcb9401f2a6b82d2ec3ccb8913dc3fa29
parent664388cd2a70a8c904cb6f21f6818b5045500e45
DAGCombiner: Factor out some and/or combines.

This is in preparation for changing visitSELECT to normalize towards
select(Cond0, select(Cond1, X, Y), Y);
select(Cond0, X, select(Cond1, X, Y)) which perfom an implicit and/or of
the conditions.

The factored function contains all DAGCombine rules which reduce two values
combined by an And/Or operation to a single value. This does not include rules
involving constants as visitSELECT already handles that case.

Differential Revision: http://reviews.llvm.org/D8026

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