llvm-6502/lib/Transforms
Chris Lattner 7acc4b1281 Extend CanEvaluateZExtd to handle and/or/xor more aggressively in the
BitsToClear case.  This allows it to promote expressions which have an
and/or/xor after the lshr, promoting cases like test2 (from PR4216) 
and test3 (random extample extracted from a spec benchmark).

clang now compiles the code in PR4216 into:

_test_bitfield:                                             ## @test_bitfield
	movl	%edi, %eax
	orl	$194, %eax
	movl	$4294902010, %ecx
	andq	%rax, %rcx
	orl	$32768, %edi
	andq	$39936, %rdi
	movq	%rdi, %rax
	orq	%rcx, %rax
	ret

instead of:

_test_bitfield:                                             ## @test_bitfield
	movl	%edi, %eax
	orl	$194, %eax
	movl	$4294902010, %ecx
	andq	%rax, %rcx
	shrl	$8, %edi
	orl	$128, %edi
	shlq	$8, %rdi
	andq	$39936, %rdi
	movq	%rdi, %rax
	orq	%rcx, %rax
	ret

which is still not great, but is progress.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93145 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 04:05:13 +00:00
..
Hello Fix a bunch of little errors that Clang complains about when its being pedantic 2009-12-19 07:05:23 +00:00
InstCombine Extend CanEvaluateZExtd to handle and/or/xor more aggressively in the 2010-01-11 04:05:13 +00:00
Instrumentation Move remaining stuff to the isInteger predicate. 2010-01-05 21:05:54 +00:00
IPO Be less stingy as to how many selects and phi nodes we 2010-01-07 05:48:42 +00:00
Scalar only factor from expressions whose uses are empty and whose 2010-01-09 06:01:36 +00:00
Utils Fix nondeterministic behavior. 2010-01-10 01:07:22 +00:00
Makefile move instcombine to its own library, it's past time. 2010-01-04 06:23:24 +00:00