summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2016-04-27 19:04:50 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2016-04-27 19:04:50 +0000
commitace97c1f7d46140b19854b63c5e0a537f5c512cd (patch)
tree1cb0ae185378ccab0f04a011a7e7cfbc2f3b73f4 /llvm/lib/Transforms
parent7f97193dd7001f880d7ae7209ca28fd9a46d32df (diff)
downloadbcm5719-llvm-ace97c1f7d46140b19854b63c5e0a537f5c512cd.tar.gz
bcm5719-llvm-ace97c1f7d46140b19854b63c5e0a537f5c512cd.zip
[LIR] Set attributes on memset_pattern16.
"inferattrs" will deduce the attribute, but it will be too late for many optimizations. Set it ourselves when creating the call. Differential Revision: http://reviews.llvm.org/D17598 llvm-svn: 267762
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
index c93f9438eea..67778398332 100644
--- a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
@@ -53,6 +53,7 @@
#include "llvm/IR/Module.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/Transforms/Utils/BuildLibCalls.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/LoopUtils.h"
using namespace llvm;
@@ -769,6 +770,7 @@ bool LoopIdiomRecognize::processLoopStridedStore(
Value *MSP =
M->getOrInsertFunction("memset_pattern16", Builder.getVoidTy(),
Int8PtrTy, Int8PtrTy, IntPtr, (void *)nullptr);
+ inferLibFuncAttributes(*M->getFunction("memset_pattern16"), *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