llvm-6502/test
Benjamin Kramer b20a8fc8a6 X86: Try to use a smaller encoding by transforming (X << C1) & C2 into (X & (C2 >> C1)) & C1. (Part of PR5039)
This tends to happen a lot with bitfield code generated by clang. A simple example for x86_64 is
uint64_t foo(uint64_t x) { return (x&1) << 42; }
which used to compile into bloated code:
	shlq	$42, %rdi               ## encoding: [0x48,0xc1,0xe7,0x2a]
	movabsq	$4398046511104, %rax    ## encoding: [0x48,0xb8,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00]
	andq	%rdi, %rax              ## encoding: [0x48,0x21,0xf8]
	ret                             ## encoding: [0xc3]

with this patch we can fold the immediate into the and:
	andq	$1, %rdi                ## encoding: [0x48,0x83,0xe7,0x01]
	movq	%rdi, %rax              ## encoding: [0x48,0x89,0xf8]
	shlq	$42, %rax               ## encoding: [0x48,0xc1,0xe0,0x2a]
	ret                             ## encoding: [0xc3]

It's possible to save another byte by using 'andl' instead of 'andq' but I currently see no way of doing
that without making this code even more complicated. See the TODOs in the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129990 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-22 15:30:40 +00:00
..
Analysis PR9634: Don't unconditionally tell the AliasSetTracker that the PreheaderLoad 2011-04-07 01:35:06 +00:00
Archive
Assembler Reapply r129401 with patch for clang. 2011-04-13 00:36:11 +00:00
Bindings/Ocaml
Bitcode Add intrinsics @llvm.arm.neon.vmulls and @llvm.arm.neon.vmullu.* back. Frontends 2011-03-29 23:06:19 +00:00
BugPoint
CodeGen X86: Try to use a smaller encoding by transforming (X << C1) & C2 into (X & (C2 >> C1)) & C1. (Part of PR5039) 2011-04-22 15:30:40 +00:00
DebugInfo Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
ExecutionEngine
Feature Revert r129235 pending a vetting of the EH rewrite. 2011-04-10 23:18:04 +00:00
FrontendAda Will not compile without the spec! 2011-03-31 10:03:32 +00:00
FrontendC Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
FrontendC++ Remove test to check line numbers. There are other numerous tests in our test harness to check line number information. 2011-04-18 22:27:20 +00:00
FrontendFortran
FrontendObjC Testcase for r127301. 2011-03-09 01:05:00 +00:00
FrontendObjC++
Integer
lib
Linker
LLVMC
MC Fix relative relocations. This is sufficient for running the rust testsuite with 2011-04-21 18:36:50 +00:00
Object
Other
Scripts
TableGen Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
Transforms Fix another case of <rdar://problem/9184212> that only occurs with code 2011-04-20 21:48:38 +00:00
Unit
Verifier
CMakeLists.txt Fix compiler command line used by lit.py when working with NMake 2011-04-12 22:10:38 +00:00
lit.cfg test/lit.cfg: Add PATHEXT to 'substitution', to recognize tools on Windows hosts. Thanks to Danil Malyshev! 2011-02-24 12:34:34 +00:00
lit.site.cfg.in
Makefile Reapply r127073(partially): Introduce $(ECHOPATH) to print DOSish path string on MSYS bash for alternative of $(ECHO). 2011-03-08 12:25:10 +00:00
Makefile.tests
site.exp.in
TestRunner.sh