[PATCH] D28797: [LangRef] Make @llvm.sqrt(x) return undef, rather than have UB, for negative x.
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 17 08:14:02 PST 2017
mehdi_amini accepted this revision.
mehdi_amini added a comment.
This revision is now accepted and ready to land.
LGTM.
Maybe sanity check with Sanjoy?
================
Comment at: llvm/docs/LangRef.rst:10064
returning the same value as the libm '``sqrt``' functions would. Unlike
-``sqrt`` in libm, however, ``llvm.sqrt`` has undefined behavior for
+``sqrt`` in libm, however, ``llvm.sqrt`` returns undefined for
negative numbers other than -0.0 (which allows for better optimization,
----------------
I believe that usually it spells "returns `undef`" or "the result is undefined".
https://reviews.llvm.org/D28797
More information about the llvm-commits
mailing list