summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
diff options
context:
space:
mode:
authorDavid Bolvansky <david.bolvansky@gmail.com>2018-10-16 21:18:31 +0000
committerDavid Bolvansky <david.bolvansky@gmail.com>2018-10-16 21:18:31 +0000
commit7c7760da7ea03c154bb4f7fb4c50b1d947e4efdb (patch)
tree4573e25d0e39070dff142eb0c76925747759c540 /llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
parentea58c633e63e8acad3f5577ca1634c1ff96a2fb4 (diff)
downloadbcm5719-llvm-7c7760da7ea03c154bb4f7fb4c50b1d947e4efdb.tar.gz
bcm5719-llvm-7c7760da7ea03c154bb4f7fb4c50b1d947e4efdb.zip
[InstCombine] Cleanup libfunc attribute inferring
Reviewers: efriedma Reviewed By: efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53338 llvm-svn: 344645
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
index 4b375956a12..241dbed30e1 100644
--- a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
@@ -928,10 +928,11 @@ bool LoopIdiomRecognize::processLoopStridedStore(
Type *Int8PtrTy = DestInt8PtrTy;
Module *M = TheStore->getModule();
+ StringRef FuncName = "memset_pattern16";
Value *MSP =
- M->getOrInsertFunction("memset_pattern16", Builder.getVoidTy(),
+ M->getOrInsertFunction(FuncName, Builder.getVoidTy(),
Int8PtrTy, Int8PtrTy, IntPtr);
- inferLibFuncAttributes(M->getFunction("memset_pattern16"), *TLI);
+ inferLibFuncAttributes(M, FuncName, *TLI);
// Otherwise we should form a memset_pattern16. PatternValue is known to be
// an constant array of 16-bytes. Plop the value into a mergable global.
OpenPOWER on IntegriCloud