diff options
author | Sanjay Patel <spatel@rotateright.com> | 2014-10-23 21:52:45 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2014-10-23 21:52:45 +0000 |
commit | 848309da7c1861b328d775b28b03d8f687ebeb5c (patch) | |
tree | 8706329fab0f2e6c19524bb82d49a520ac635af6 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | ecbe7c03a03bcb04b0a2fb185d331b6b6f404322 (diff) | |
download | llvm-848309da7c1861b328d775b28b03d8f687ebeb5c.zip llvm-848309da7c1861b328d775b28b03d8f687ebeb5c.tar.gz llvm-848309da7c1861b328d775b28b03d8f687ebeb5c.tar.bz2 |
Handle sqrt() shrinking in SimplifyLibCalls like any other call
This patch removes a chunk of special case logic for folding
(float)sqrt((double)x) -> sqrtf(x)
in InstCombineCasts and handles it in the mainstream path of SimplifyLibCalls.
No functional change intended, but I loosened the restriction on the existing
sqrt testcases to allow for this optimization even without unsafe-fp-math because
that's the existing behavior.
I also added a missing test case for not shrinking the llvm.sqrt.f64 intrinsic
in case the result is used as a double.
Differential Revision: http://reviews.llvm.org/D5919
llvm-svn: 220514
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions