D146349 Introduced the ability to use the information from the
select condition to deduce constants as we folded a binop into
select. I.e if the select cond was icmp eq %A, 10, then in the
true-arm of select, we would be able to replace usage of A with
10.
This is broken for vectors that contain undef elements. I.e with
icmp eq %A, <10, undef>, subsituting <10, undef> for A can
result in creating a more undefined result than we otherwise would
have.
We fix the issue with simply checking if the candidate constant for
substituting may contain undef elements and don't do it in that
case.
I think this needs to use isGuaranteedNotToBeUndefOrPoison to handle constant expressions correctly.