llvm-6502/test/Transforms/InstSimplify
Chris Lattner b053fc1c92 fold comparisons of gep'd alloca points with null to false,
implementing PR12013.  We now compile the testcase to:

__Z4testv:                              ## @_Z4testv
## BB#0:                                ## %_ZN4llvm15SmallVectorImplIiE9push_backERKi.exit
	pushq	%rbx
	subq	$64, %rsp
	leaq	32(%rsp), %rbx
	movq	%rbx, (%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 16(%rsp)
	movl	$1, 32(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	(%rsp), %rdi
	callq	__Z1gRN4llvm11SmallVectorIiLj8EEE
	movq	(%rsp), %rdi
	cmpq	%rbx, %rdi
	je	LBB0_2
## BB#1:
	callq	_free
LBB0_2:                                 ## %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit
	addq	$64, %rsp
	popq	%rbx
	ret

instead of:

__Z4testv:                              ## @_Z4testv
## BB#0:
	pushq	%rbx
	subq	$64, %rsp
	xorl	%eax, %eax
	leaq	(%rsp), %rbx
	addq	$32, %rbx
	movq	%rbx, (%rsp)
	movq	%rbx, 8(%rsp)
	leaq	64(%rsp), %rcx
	movq	%rcx, 16(%rsp)
	je	LBB0_2
## BB#1:
	movl	$1, 32(%rsp)
	movq	%rbx, %rax
LBB0_2:                                 ## %_ZN4llvm15SmallVectorImplIiE9push_backERKi.exit
	addq	$4, %rax
	movq	%rax, 8(%rsp)
	leaq	(%rsp), %rdi
	callq	__Z1gRN4llvm11SmallVectorIiLj8EEE
	movq	(%rsp), %rdi
	cmpq	%rbx, %rdi
	je	LBB0_4
## BB#3:
	callq	_free
LBB0_4:                                 ## %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit
	addq	$64, %rsp
	popq	%rbx
	ret

This doesn't shrink clang noticably though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150944 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 00:42:49 +00:00
..
2010-12-20-Boolean.ll
2010-12-20-Distribute.ll
2011-01-14-Thread.ll
2011-02-01-Vector.ll
2011-09-05-InsertExtractValue.ll InstSimplify: Don't try to replace an extractvalue/insertvalue pair with the original value if types don't match. 2011-09-05 18:16:19 +00:00
2011-10-27-BinOpCrash.ll Reapply commit 143028 with a fix: the problem was casting a ConstantExpr Mul 2011-10-27 19:16:21 +00:00
2011-11-23-MaskedBitsCrash.ll Fix a crash in which a multiplication was being reported as being both negative 2011-11-23 16:26:47 +00:00
AndOrXor.ll A shift of a power of two is a power of two or zero. 2011-10-28 18:30:05 +00:00
compare.ll fold comparisons of gep'd alloca points with null to false, 2012-02-20 00:42:49 +00:00
exact-nsw-nuw.ll
fdiv.ll
lit.local.cfg Replace all instances of dg.exp file with lit.local.cfg, since all tests are run with LIT now and now Dejagnu. dg.exp is no longer needed. 2012-02-16 06:28:33 +00:00
maxmin.ll
reassociate.ll
rem.ll
undef.ll Add tests for existing InstSimplify features. 2011-11-04 18:39:16 +00:00
vector_gep.ll Add support for vectors of pointers. 2011-12-05 06:29:09 +00:00