This is an intentionally limited/different form of D90113. That patch bravely tries to generalize folds where we pull a binop into the arms of a select:
N0 + (Cond ? 0 : FVal) --> Cond ? N0 : (N0 + FVal)
...across types and targets. This is the inverse of IR canonicalization as discussed in D113442
I'm not sure if this is even profitable within x86, so I'm only proposing to handle x86 vector fadd/fsub as a 1st step. The intent is to prevent AVX512 regressions as mentioned in D113442. Please look closely at the test diffs to confirm if this is correct and better.
Target independent location with target hook?