summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/builtin_float.c
Commit message (Collapse)AuthorAgeFilesLines
* Reland [NFC-I] Remove hack for fp-classification builtinsErich Keane2019-12-171-1/+11
| | | | | | | | | | | | | | | | | | The FP-classification builtins (__builtin_isfinite, etc) use variadic packs in the definition file to mean an overload set. Because of that, floats were converted to doubles, which is incorrect. There WAS a patch to remove the cast after the fact. THis patch switches these builtins to just be custom type checking, calls the implicit conversions for the integer members, and makes sure the correct L->R casts are put into place, then does type checking like normal. A future direction (that wouldn't be NFC) would consider making conversions for the floating point parameter legal. Note: The initial patch for this missed that certain systems need to still convert half to float, since they dont' support that type.
* Fix floating point builtins to not promote float->doubleErich Keane2019-12-161-0/+71
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.
OpenPOWER on IntegriCloud