This would be a lot simpler if we could disregard errno when we have relaxed FP math, but I'm assuming it's possible to do something like '-ffast-math -fmath-errno' and still expect errno to be set for domain errors?
As the first test shows, we could transform an llvm intrinsic into a libcall which could then set errno, so that's just wrong...unless I'm not seeing some loophole. The second test diff is a phantom change (same output as before), but I've updated the CHECK lines to highlight that we get that case right on purpose now.