This is not the transform direction we want in general, but by the time we have a CMOV, we've already tried everything else that could be better.
The transform increases the uses of the other add operand, but that is safe according to Alive2:
https://alive2.llvm.org/ce/z/Yn6p-A
We could probably extend this to other binops (not just add), but this is the motivating pattern discussed in:
https://llvm.org/PR51069
The test with i8 shows a missed fold because there's a trunc sitting in front of the add. I haven't checked to see what it would take to get that case.
It's not really hoisting, pushAddThroughCmovOfConsts/pushAddIntoCmovOfConsts maybe or something?