[all-commits] [llvm/llvm-project] fa7477: [Clang][CodeGen][AIX] Map __builtin_frexpl, __buil...
xingxue-ibm via All-commits
all-commits at lists.llvm.org
Fri Nov 18 08:37:44 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fa7477eb87fd262898e78db983c7b0951b87641c
https://github.com/llvm/llvm-project/commit/fa7477eb87fd262898e78db983c7b0951b87641c
Author: Xing Xue <xingxue at outlook.com>
Date: 2022-11-18 (Fri, 18 Nov 2022)
Changed paths:
M clang/lib/CodeGen/CGBuiltin.cpp
A clang/test/CodeGen/aix-builtin-mapping.c
Log Message:
-----------
[Clang][CodeGen][AIX] Map __builtin_frexpl, __builtin_ldexpl, and __builtin_modfl to 'double' version lib calls in 64-bit 'long double' mode
Summary:
AIX library functions frexpl(), ldexpl(), and modfl() are for 128-bit IBM long double, i.e. __ibm128. Other *l() functions, e.g., acosl(), are for 64-bit long double. The AIX Clang compiler currently maps builtin functions __builtin_frexpl(), __builtin_ldexpl(), and __builtin_modfl() to frexpl(), ldexpl(), and modfl() in 64-bit long double mode which results in seg-faults or incorrect return values. This patch changes to map __builtin_frexpl(), __builtin_ldexpl(), and __builtin_modfl() to double version lib functions frexp(), ldexp() and modf() in 64-bit long double mode.
Reviewed by: hubert.reinterpretcast, daltenty
Differential Revision: https://reviews.llvm.org/D137986
More information about the All-commits
mailing list