diff options
author | Andrew Ng <anng.sw@gmail.com> | 2017-04-25 12:36:14 +0000 |
---|---|---|
committer | Andrew Ng <anng.sw@gmail.com> | 2017-04-25 12:36:14 +0000 |
commit | 1606fc0bf90fa984f335c7d9d7b56761afa0e67a (patch) | |
tree | 8afed9a011b2868979f7a280f8dd96087b00c178 /llvm/lib/CodeGen | |
parent | ab0446332e7b50328499e138b9856625a6577109 (diff) | |
download | bcm5719-llvm-1606fc0bf90fa984f335c7d9d7b56761afa0e67a.tar.gz bcm5719-llvm-1606fc0bf90fa984f335c7d9d7b56761afa0e67a.zip |
[SimplifyLibCalls] Fix infinite loop with fast-math optimization.
One of the fast-math optimizations is to replace calls to standard double
functions with their float equivalents, e.g. exp -> expf. However, this can
cause infinite loops for the following:
float expf(float val) { return (float) exp((double) val); }
A similar inline declaration exists in the MinGW-w64 math.h header file which
when compiled with -O2/3 and fast-math generates infinite loops.
So this fix checks that the calling function to the standard double function
that is being replaced does not match the float equivalent.
Differential Revision: https://reviews.llvm.org/D31806
llvm-svn: 301304
Diffstat (limited to 'llvm/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions