From f330b3227ad8b381aebf267acddf8f244f556f6b Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sun, 23 Jan 2011 20:31:00 +0000 Subject: Add a memset loop that LoopIdiomRecognize doesn't recognize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124082 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/README.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/Target/README.txt') diff --git a/lib/Target/README.txt b/lib/Target/README.txt index 67aec852fa..ea9bc8d84c 100644 --- a/lib/Target/README.txt +++ b/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 -- cgit v1.2.3