I'm not actually sure this patch does the right thing, but then
i'm not sure i understand why we would want to do that promotion
if we don't have CMOV, and thus will expand it to a branch?
Shouldn't some later code be responsible for these decisions?
The real reason for this patch:
I've looked at extending CMOV promotion to support i8, (PR40965)
and if this check is not in place, llvm/test/CodeGen/X86/pseudo_cmov_lower.ll goes real bad.
Do you understand why we went from one conditional branch to two?