summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-01-23 20:31:00 +0000
committerAnders Carlsson <andersca@mac.com>2011-01-23 20:31:00 +0000
commit773bc67efffd2238eea85ffe2d2b192aed78fb79 (patch)
treef3027db27efbd460cb7f828514634750a6570dba /llvm/lib
parentd4192f71b5eeb482b4e0a32cb2099f89a5165142 (diff)
downloadbcm5719-llvm-773bc67efffd2238eea85ffe2d2b192aed78fb79.tar.gz
bcm5719-llvm-773bc67efffd2238eea85ffe2d2b192aed78fb79.zip
Add a memset loop that LoopIdiomRecognize doesn't recognize.
llvm-svn: 124082
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/README.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/README.txt b/llvm/lib/Target/README.txt
index 67aec852fa0..ea9bc8d84c8 100644
--- a/llvm/lib/Target/README.txt
+++ b/llvm/lib/Target/README.txt
@@ -289,6 +289,14 @@ unsigned int popcount(unsigned int input) {
This sort of thing should be added to the loop idiom pass.
+This loop isn't converted to a memset:
+
+void f(char *dest, int n) {
+ for (int i = 0; i < n; ++i) {
+ dest[n] = 0;
+ }
+}
+
//===---------------------------------------------------------------------===//
These should turn into single 16-bit (unaligned?) loads on little/big endian
OpenPOWER on IntegriCloud