commit | 6f09ea3f571cd2f4c39fff52deecec7cfc62d0c4 | [log] [tgz] |
---|---|---|
author | Justin Lebar <jlebar@google.com> | Tue Jan 31 23:08:57 2017 +0000 |
committer | Justin Lebar <jlebar@google.com> | Tue Jan 31 23:08:57 2017 +0000 |
tree | 235c9d4ca67913b3a77c113a4bdfd30648a3e8bf | |
parent | d99a5ea737c696917819bd764e5ecb960e15d0eb [diff] |
[NVPTX] Compute approx sqrt as 1/rsqrt(x) rather than x*rsqrt(x). x*rsqrt(x) returns NaN for x == 0, whereas 1/rsqrt(x) returns 0, as desired. Verified that the particular nvptx approximate instructions here do in fact return 0 for x = 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293713 91177308-0d34-0410-b5e6-96231b3b80d8