This is the minimum patch needed to solve the missed SRA fold that was noted in:
and partially fixed with:
Of course, we could move more of the related analysis functions in DAGCombiner that are currently static/local to have a more unified approach.
Ie, move all of these (some were recently added in D25374)?
It's not clear to me exactly where the handling of undef elements is different and where that is intentional.