[Clang] Mutate bulitin names under IEEE128 on PPC64
authorQiu Chaofan <qiucofan@cn.ibm.com>
Fri, 3 Dec 2021 09:40:52 +0000 (17:40 +0800)
committerQiu Chaofan <qiucofan@cn.ibm.com>
Fri, 3 Dec 2021 09:50:18 +0000 (17:50 +0800)
commit4f94c02616025ace168899b6fbdc8c3ba240062b
tree61438d78b86a6a608a92c15658ff1dc7547c5985
parent1479a211d2c72c949620889f0398ecd63aa4facb
[Clang] Mutate bulitin names under IEEE128 on PPC64

Glibc 2.32 and newer uses these symbol names to support IEEE-754 128-bit
float. GCC transforms name of these builtins to align with Glibc header
behavior.

Since Clang doesn't have all GCC-compatible builtins implemented, this
patch only mutates the implemented part.

Note nexttoward is a special case (no nexttowardf128) so it's also
handled here.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D112401
clang/lib/CodeGen/CGBuiltin.cpp
clang/test/CodeGen/math-builtins-long.c
clang/test/CodeGen/ppc64-f128-builtins.c [new file with mode: 0644]