Reland "[InstCombine] Fold nested selects"
The change was reverted because one of the changes were suspected of
causing a miscompile, but said miscompile was (confirmed to be) fixed
before the revert happened, by
07ecdd9b1a8af51f07d5f4dfe46845c801482a39.
https://alive2.llvm.org/ce/z/GjCXkB
https://alive2.llvm.org/ce/z/Guz2tt
Fixes https://github.com/llvm/llvm-project/issues/59393
This reverts commit
d73383c145ea83d25063246e0c34f5a41fd35293,
and relands commmit
9ddff66d0c9c3e18d56e6b20aa26a2a8cdfb6d2b.