This patch updates impliesPoison to look into operands of V up to MaxDepth.
Relevant patch: D94550
I'll leave the diff result after setting -instcombine-unsafe-select-transform=0 at another patch that's going to follow this.
I posted an alternative patch at D94866. It's potentially more expensive, but I think it will cover more of the cases we need.