Hopefully, the change itself is straightforward - plug another hole where we drop branch weight metadata while creating a select.
I'm curious about the lack of use of BranchProbability in SimplifyCFG though. Is there a reason we don't use that here (and therefore need duplicate functionality like "FitWeights()")?
The select is newly created instruction that does not exist before -- it sits at the same BB where the original phi, so it is not 'speculatively' executed.
The original PBI's branch weights do not apply because the select's 'logical' edges are incoming edges of the phi that is eliminated, not the out edges of PBI.