+/-0 is obviously foldable. Other non-special, non-subnormal
values are also probably OK. For denormal values, check
the calling function's denormal mode. For now, don't fold
denormals to the input for IEEE mode because as far as I know
the langref is still pretending LLVM's float isn't IEEE.
Also folds undef to 0, although NaN may make more sense. Skips
folding nans and infinities, although it should be OK to fold those
in a future change.
I'm not sure I like the name "IEEELike", but, admittedly, I'm struggling to keep up with anything better (as bfloat isn't an IEEE type at all, and x86_fp80 is an IEEE extended precision format).
The documentation comment should clarify that it's referring to APFloat::isIEEE(). I think "does not have unnormal values" can be clarified as "does not have non-IEEE values, such as x86_fp80's unnormal values".