llvm-6502/test
Chris Lattner 784f333aef Add an instcombine to clean up a common pattern produced
by the SRoA "promote to large integer" code, eliminating
some type conversions like this:

   %94 = zext i16 %93 to i32                       ; <i32> [#uses=2]
   %96 = lshr i32 %94, 8                           ; <i32> [#uses=1]
   %101 = trunc i32 %96 to i8                      ; <i8> [#uses=1]

This also unblocks other xforms from happening, now clang is able to compile:

struct S { float A, B, C, D; };
float foo(struct S A) { return A.A + A.B+A.C+A.D; }

into:

_foo:                                   ## @foo
## BB#0:                                ## %entry
	pshufd	$1, %xmm0, %xmm2
	addss	%xmm0, %xmm2
	movdqa	%xmm1, %xmm3
	addss	%xmm2, %xmm3
	pshufd	$1, %xmm1, %xmm0
	addss	%xmm3, %xmm0
	ret

on x86-64, instead of:

_foo:                                   ## @foo
## BB#0:                                ## %entry
	movd	%xmm0, %rax
	shrq	$32, %rax
	movd	%eax, %xmm2
	addss	%xmm0, %xmm2
	movapd	%xmm1, %xmm3
	addss	%xmm2, %xmm3
	movd	%xmm1, %rax
	shrq	$32, %rax
	movd	%eax, %xmm0
	addss	%xmm3, %xmm0
	ret

This seems pretty close to optimal to me, at least without
using horizontal adds.  This also triggers in lots of other
code, including SPEC.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112278 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-27 18:31:05 +00:00
..
Analysis refix PR1143 by making basicaa analyze zexts of indices aggresively, 2010-08-18 23:09:49 +00:00
Archive These tests are no longer stored in *CVS*. 2010-08-04 15:58:01 +00:00
Assembler Make GlobalValue alignment consistent with load, store, and alloca 2010-07-28 20:56:48 +00:00
Bindings/Ocaml Fix vmcore.ml test. 2010-08-20 18:24:35 +00:00
Bitcode Add alignment arguments to all the NEON load/store intrinsics. 2010-08-27 17:13:24 +00:00
BugPoint XFAIL this on mingw, following remove_arguments_test.ll. 2010-08-24 20:54:50 +00:00
CodeGen Add alignment arguments to all the NEON load/store intrinsics. 2010-08-27 17:13:24 +00:00
DebugInfo Convert DbgInfoPrinter to use errs() instead of outs(). 2010-08-20 18:03:05 +00:00
ExecutionEngine Revert r101455, which fails on the llvm-arm-linux buildbot. 2010-04-16 18:37:31 +00:00
Feature Extend function-local metadata to be usable as attachments. 2010-08-24 02:24:03 +00:00
FrontendAda
FrontendC Test should pass on non-Darwin x86. 2010-08-20 21:18:55 +00:00
FrontendC++ Update tests to not rely on input file's absolute path. 2010-07-27 18:13:53 +00:00
FrontendFortran
FrontendObjC Update tests to not rely on input file's absolute path. 2010-07-27 18:13:53 +00:00
FrontendObjC++ Test case for r110459. Radar 8264751. Test case by Fariborz Jahanian! 2010-08-06 19:02:24 +00:00
Integer
lib
Linker Reapply r112091 and r111922, support for metadata linking, with a 2010-08-26 15:41:53 +00:00
LLVMC llvmc: Make syntax more consistent. 2010-08-23 23:21:23 +00:00
MC X86: Fix misencode of RI64mi8. This fixes OpenSSL / x86_64-apple-darwin10 / clang -O3. 2010-08-25 21:11:02 +00:00
Other Try to escape the '$'s in these so they reach the underlying 'sh' invocation. 2010-08-23 08:54:19 +00:00
Scripts Add some win64 coff goodness. 2010-08-17 21:05:54 +00:00
TableGen Remove TargetInstrInfo::copyRegToReg entirely. 2010-07-11 17:01:17 +00:00
Transforms Add an instcombine to clean up a common pattern produced 2010-08-27 18:31:05 +00:00
Unit
Verifier Reject unrepresentable pointer types in intrinsics. Fixes PR7316. 2010-08-08 06:12:09 +00:00
CMakeLists.txt tests: Propogate LLVM_SRC_ROOT and PYTHON_EXECUTABLE environment variables to tests. 2010-06-12 16:21:19 +00:00
lit.cfg The %ocamlopt setting has embedded quotes. Copy the entire value instead 2010-08-20 14:19:38 +00:00
lit.site.cfg.in tests: Propogate LLVM_SRC_ROOT and PYTHON_EXECUTABLE environment variables to tests. 2010-06-12 16:21:19 +00:00
Makefile check-lit was failing again on F13 64 bits :-( 2010-08-05 03:35:01 +00:00
Makefile.tests
site.exp.in
TestRunner.sh tests: Deprecate TestRunner.sh, and have it just invoke 'llvm-lit' (which will 2010-08-02 00:52:41 +00:00