summaryrefslogtreecommitdiffstats
path: root/lib/Transforms/InstCombine/InstructionCombining.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-11-29 23:57:10 +0000
committerChad Rosier <mcrosier@apple.com>2011-11-29 23:57:10 +0000
commit3d925d24e8c54cde05228258c25cc21687cad922 (patch)
treea6e70c41ffa5b720f5933c591f9a9ff6d9d47a43 /lib/Transforms/InstCombine/InstructionCombining.cpp
parent6029b6ddafad45791c9e9d8e8ddd96978294beef (diff)
downloadexternal_llvm-3d925d24e8c54cde05228258c25cc21687cad922.zip
external_llvm-3d925d24e8c54cde05228258c25cc21687cad922.tar.gz
external_llvm-3d925d24e8c54cde05228258c25cc21687cad922.tar.bz2
Add support for sqrt, sqrtl, and sqrtf in TargetLibraryInfo. Disable
(fptrunc (sqrt (fpext x))) -> (sqrtf x) transformation if -fno-builtin is specified. rdar://10466410 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145460 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstructionCombining.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstructionCombining.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp
index a7a6311..60c7fef 100644
--- a/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -41,6 +41,7 @@
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/Target/TargetData.h"
+#include "llvm/Target/TargetLibraryInfo.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/Debug.h"
@@ -79,6 +80,7 @@ INITIALIZE_PASS(InstCombiner, "instcombine",
void InstCombiner::getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
+ AU.addRequired<TargetLibraryInfo>();
}