clang/HIP: Fix broken implementations of __make_mantissa* functions
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 21 Nov 2022 03:30:09 +0000 (19:30 -0800)
committerMatt Arsenault <arsenm2@gmail.com>
Thu, 22 Dec 2022 12:09:06 +0000 (07:09 -0500)
commit4086ea331cad827d74542e52a86b7d7933376e7b
tree21165ae94a56635efc5eb3dcd4e90e1090c2f759
parenta9fe30a1f1808f8f68ffbaecf9c11c8419491851
clang/HIP: Fix broken implementations of __make_mantissa* functions

The optimizer was folding the entire function to return 0. This
meant to be checking the character content of the pointer is the
string terminator, not null.

Also just make null inputs undefined. My docs for nanf say the
behavior of the argument is unspecified and segfaults on my system.
clang/lib/Headers/__clang_hip_math.h
clang/test/Headers/__clang_hip_math.hip