This is the DAGCombine companion fold for the InstCombine version in D124763. This time we only need to handle A + (B & ~A) to A | B (https://alive2.llvm.org/ce/z/N5fWZ9), because there's only one canonical form.
The reason why this needs to be a DAGCombine is that in the motivating case the add is actually a getelementptr, which only gets converted into an add on the DAG level. This patch is not quite sufficient to handle the getelementptr case yet, because of an interfering demanded bits simplification.