llvm-6502/test
Chris Lattner a92ff91a96 implement enough of the memset inference algorithm to recognize and insert
memsets.  This is still missing one important validity check, but this is enough
to compile stuff like this:

void test0(std::vector<char> &X) {
  for (std::vector<char>::iterator I = X.begin(), E = X.end(); I != E; ++I)
    *I = 0;
}

void test1(std::vector<int> &X) {
  for (long i = 0, e = X.size(); i != e; ++i)
    X[i] = 0x01010101;
}

With:
 $ clang t.cpp -S -o - -O2 -emit-llvm | opt -loop-idiom | opt -O3 | llc 

to:

__Z5test0RSt6vectorIcSaIcEE:            ## @_Z5test0RSt6vectorIcSaIcEE
## BB#0:                                ## %entry
	subq	$8, %rsp
	movq	(%rdi), %rax
	movq	8(%rdi), %rsi
	cmpq	%rsi, %rax
	je	LBB0_2
## BB#1:                                ## %bb.nph
	subq	%rax, %rsi
	movq	%rax, %rdi
	callq	___bzero
LBB0_2:                                 ## %for.end
	addq	$8, %rsp
	ret
...
__Z5test1RSt6vectorIiSaIiEE:            ## @_Z5test1RSt6vectorIiSaIiEE
## BB#0:                                ## %entry
	subq	$8, %rsp
	movq	(%rdi), %rax
	movq	8(%rdi), %rdx
	subq	%rax, %rdx
	cmpq	$4, %rdx
	jb	LBB1_2
## BB#1:                                ## %for.body.preheader
	andq	$-4, %rdx
	movl	$1, %esi
	movq	%rax, %rdi
	callq	_memset
LBB1_2:                                 ## %for.end
	addq	$8, %rsp
	ret



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122573 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-26 23:42:51 +00:00
..
Analysis -enable-tbaa is on by default now. 2010-12-16 02:53:48 +00:00
Archive Revert test/Archive/check_binary_output.ll". It fails on a buildbot. 2010-12-07 05:57:02 +00:00
Assembler Fix PR 4170 by having ExtractValueInst::getIndexedType() reject out-of-bounds indexing. 2010-12-05 20:50:26 +00:00
Bindings/Ocaml XFAIL vg_leak the new test as the rest. 2010-12-23 21:22:09 +00:00
Bitcode Testcase for PR8494 (invalid bitcode crashing the bitcode reader). 2010-10-28 15:57:30 +00:00
BugPoint test: Check the feature 'loadable_module' with load modules in %llvmshlibdir. 2010-11-29 07:58:32 +00:00
CodeGen Radar 8803471: Fix expansion of ARM BCCi64 pseudo instructions. 2010-12-23 22:45:49 +00:00
DebugInfo Hide tests, that check .loc, .file in output assembly, from darwin9 buildbot. 2010-12-02 23:29:58 +00:00
ExecutionEngine XFAIL for now. If someone with access to an ARM/Linux host wants to have a look 2010-12-02 20:20:32 +00:00
Feature test: Check the feature 'loadable_module' with load modules in %llvmshlibdir. 2010-11-29 07:58:32 +00:00
FrontendAda Adjust this test for the fact that the stores are no longer 2010-12-02 20:56:51 +00:00
FrontendC Test case for r120740. Radar 8712503. 2010-12-02 21:25:55 +00:00
FrontendC++ This test dates from the time when llvm-gcc had problems if two types were 2010-12-02 18:19:23 +00:00
FrontendFortran Use -S rather than -c for the benefit of dragonegg. 2010-11-25 21:41:35 +00:00
FrontendObjC Remove explicit uses of -emit-llvm, the test infrastructure adds it 2010-11-25 21:46:07 +00:00
FrontendObjC++ Remove explicit uses of -emit-llvm, the test infrastructure adds it 2010-11-25 21:48:20 +00:00
Integer we are past the point where these tests are useful. 2010-09-02 22:32:02 +00:00
lib Use LLVMCC_EMITIR_FLAG rather than hard-coding "-emit-llvm". 2010-11-25 21:19:52 +00:00
Linker Fix PR8300 by remembering to keep the bitcast in all cases. 2010-10-19 02:02:57 +00:00
LLVMC Remove -llvmc-temp-hack from tblgen. 2010-10-23 07:32:53 +00:00
MC Add support for @note. Patch by Jörg Sonnenberger. 2010-12-26 21:30:59 +00:00
Other test/Other/close-stderr.ll: Require the feature 'shell'. It is not executable on Win32 but it is executable on MSYS-bash. 2010-12-07 02:43:58 +00:00
Scripts Print all 64bits for st_value and st_size. Adjust tests accordingly. 2010-12-20 20:49:43 +00:00
TableGen Add support for using the `!if' operator when initializing variables: 2010-12-13 01:46:19 +00:00
Transforms implement enough of the memset inference algorithm to recognize and insert 2010-12-26 23:42:51 +00:00
Unit Test: Fix Support.Path and _all_ of the unittest death tests. GetTempPath defaults to \Windows\. 2010-12-07 01:23:49 +00:00
Verifier Reject unrepresentable pointer types in intrinsics. Fixes PR7316. 2010-08-08 06:12:09 +00:00
CMakeLists.txt macho-dump: Fix CMake build, following up to r121466. 2010-12-10 09:18:26 +00:00
lit.cfg Revert 122341. It breaks some darwin tests. 2010-12-21 17:25:43 +00:00
lit.site.cfg.in test: Add the new feature 'loadable_module'. 2010-11-29 00:20:09 +00:00
Makefile test: Use $SharedLibDir for loadable modules. On Cygming, loadable modules are not in lib/ but bin. 2010-11-29 00:20:21 +00:00
Makefile.tests
site.exp.in test: Use $SharedLibDir for loadable modules. On Cygming, loadable modules are not in lib/ but bin. 2010-11-29 00:20:21 +00:00
TestRunner.sh Use exec. 2010-08-29 14:49:00 +00:00