Fix floating point builtins to not promote float->double
authorErich Keane <erich.keane@intel.com>
Mon, 16 Dec 2019 15:18:18 +0000 (07:18 -0800)
committerErich Keane <erich.keane@intel.com>
Mon, 16 Dec 2019 15:20:29 +0000 (07:20 -0800)
commitf02d6dd6c7afc08f871a623c0411f2d77ed6acf8
treefc23ef1efd956f83119a79c289f842965703cfd5
parent9f99aba1cfeb603f368c45ef78ba9795bab16d47
Fix floating point builtins to not promote float->double

As brought up in D71467, a group of floating point builtins
automatically promoted floats to doubles because they used the variadic
builtin tag to support an overload set. The result is that the
parameters were treated as a variadic pack, which always promots
float->double.

This resulted in the wrong answer being given in cases with certain
values of NaN.
clang/include/clang/Basic/Builtins.def
clang/test/CodeGen/arm-float-helpers.c
clang/test/CodeGen/builtin_float.c [new file with mode: 0644]