llvm-6502/test
Chris Lattner eed919b1ba Improve GVN to be able to forward substitute a small load
from a piece of a large store when both are in the same block.

This allows clang to compile the testcase in PR4216 to this code:

_test_bitfield:
	movl	4(%esp), %eax
	movl	%eax, %ecx
	andl	$-65536, %ecx
	orl	$32962, %eax
	andl	$40186, %eax
	orl	%ecx, %eax
	ret

This is not ideal, but is a whole lot better than the code produced
by llvm-gcc:

_test_bitfield:
	movw	$-32574, %ax
	orw	4(%esp), %ax
	andw	$-25350, %ax
	movw	%ax, 4(%esp)
	movw	7(%esp), %cx
	shlw	$8, %cx
	movzbl	6(%esp), %edx
	orw	%cx, %dx
	movzwl	%dx, %ecx
	shll	$16, %ecx
	movzwl	%ax, %eax
	orl	%ecx, %eax
	ret

and dramatically better than that produced by gcc 4.2:

_test_bitfield:
	pushl	%ebx
	call	L3
"L00000000001$pb":
L3:
	popl	%ebx
	movl	8(%esp), %eax
	leal	0(,%eax,4), %edx
	sarb	$7, %dl
	movl	%eax, %ecx
	andl	$7168, %ecx
	andl	$-7201, %ebx
	movzbl	%dl, %edx
	andl	$1, %edx
	sall	$5, %edx
	orl	%ecx, %ebx
	orl	%edx, %ebx
	andl	$24, %eax
	andl	$-58336, %ebx
	orl	%eax, %ebx
	orl	$32962, %ebx
	movl	%ebx, %eax
	popl	%ebx
	ret



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82439 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-21 05:57:11 +00:00
..
Analysis Teach ScalarEvolution how to reason about no-wrap flags on loops 2009-09-17 18:05:20 +00:00
Archive Merge Archive/extract* tests into one; this avoids a race when tests are run in 2009-09-08 23:44:24 +00:00
Assembler Clean up the usage of evaluateICmpRelation's return value. 2009-09-20 04:27:06 +00:00
Bindings/Ocaml Switch Ocaml to use llvm_supports_binding. 2009-09-13 01:41:47 +00:00
Bitcode Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
BugPoint Use -output-prefix in bugpoint tests so that outputs go in temp directory (and 2009-09-07 19:26:18 +00:00
CodeGen Fix PR4986. "r1024 = insert_subreg r1024, undef, 2" cannot be turned in an implicit_def. Instead, it's an identity copy so it should be eliminated. Also make sure to update livevariable kill information. 2009-09-21 04:32:32 +00:00
DebugInfo Eliminate more redundant llvm-as calls. 2009-09-11 18:17:12 +00:00
ExecutionEngine Remove failing test... 2009-09-09 00:30:25 +00:00
Feature Write and read metadata attachments. 2009-09-18 19:26:43 +00:00
FrontendAda Adjust this test for recent sroa improvements. 2009-03-12 11:56:12 +00:00
FrontendC Add a test case for r81431. 2009-09-10 05:08:51 +00:00
FrontendC++ Testcase for (llvm-gcc) 81399. Adjust an older 2009-09-09 23:37:46 +00:00
FrontendFortran These tests are x86 specific. 2009-04-22 10:39:51 +00:00
FrontendObjC Fix some misspellings of XTARGET. 2009-08-31 18:05:23 +00:00
FrontendObjC++ This is an objective-c test, not an objective-c++ one. 2008-10-06 18:42:48 +00:00
Integer Eliminate some Tclisms. 2009-09-05 11:34:46 +00:00
lib tests: Add llvm_supports_binding predicate. 2009-09-13 01:41:18 +00:00
Linker When a constant's type is refined, update the constant in place 2009-09-15 15:58:07 +00:00
LLVMC Fix a small issue with recent changes to this code. 2009-09-13 20:14:57 +00:00
MC Move ARM and X86 specific AsmParser tests into separate subdirectories, and only 2009-09-21 00:05:30 +00:00
Other Forbid arrays of function-type and structures with function-typed fields. 2009-09-15 06:28:26 +00:00
Scripts Remove prcontext. 2009-09-10 04:56:59 +00:00
TableGen Add some tests of advanced TableGen list functionality. 2009-06-29 20:07:17 +00:00
Transforms Improve GVN to be able to forward substitute a small load 2009-09-21 05:57:11 +00:00
Unit Teach 'make check-lit' to run unittests. 2009-09-14 02:39:01 +00:00
Verifier Remove obsolete -f flags. 2009-08-25 15:38:29 +00:00
lit.cfg tests: Add llvm_supports_binding predicate. 2009-09-13 01:41:18 +00:00
Makefile Teach 'make check-all' to build the site configuration for clang, if it is in tree. 2009-09-20 19:04:28 +00:00
Makefile.tests Remove obsolete -f flags. 2009-08-25 15:38:29 +00:00
TestRunner.sh Fix a bashism in TestRunner.sh. 2008-07-28 18:41:03 +00:00