[PATCH] D18513: Simplify isfinite/isnan/isinf in finite-math-only mode
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 9 12:07:36 PDT 2016
hfinkel abandoned this revision.
hfinkel added a comment.
In http://reviews.llvm.org/D18513#394642, @scanon wrote:
> Breaking isnan, isinf, etc is a non-starter. I know it's appealing from a consistent formal model viewpoint, but in practice it breaks a lot of code (this is why we have the call fallbacks for iOS/OSX).
>
> I would be delighted to have a finite-math-safe builtin to avoid the calls, but #2 and #4 both seems reasonable to me. #4 should probably be done regardless of the resolution of this conversation.
In http://reviews.llvm.org/D18513#394647, @resistor wrote:
> I agree with Steve here. Even code that is built with -ffast-math has to live in a reality where NaNs, Infs, etc. are sometimes generated by external function calls, provided as user input, etc. It's critical that this code be able to filter out these invalid values, precisely **because** the body of the code will be optimized on the assumption that those values did not need to be considered.
I don't really disagree with any of this. For now, I'll abandon this patch (although I might revive the TLI infrastructure bits, as they're generally useful). I submitted http://reviews.llvm.org/D18639 to fixup libc++ `<complex>` in this regard.
http://reviews.llvm.org/D18513
More information about the llvm-commits
mailing list