llvm-6502/lib
Chris Lattner ce7cafa960 shld is a very high latency operation. Instead of emitting it for shifts of
two or three, open code the equivalent operation which is faster on athlon
and P4 (by a substantial margin).

For example, instead of compiling this:

long long X2(long long Y) { return Y << 2; }

to:

X3_2:
        movl 4(%esp), %eax
        movl 8(%esp), %edx
        shldl $2, %eax, %edx
        shll $2, %eax
        ret

Compile it to:

X2:
        movl 4(%esp), %eax
        movl 8(%esp), %ecx
        movl %eax, %edx
        shrl $30, %edx
        leal (%edx,%ecx,4), %edx
        shll $2, %eax
        ret

Likewise, for << 3, compile to:

X3:
        movl 4(%esp), %eax
        movl 8(%esp), %ecx
        movl %eax, %edx
        shrl $29, %edx
        leal (%edx,%ecx,8), %edx
        shll $3, %eax
        ret

This matches icc, except that icc open codes the shifts as adds on the P4.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17707 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 20:48:57 +00:00
..
Analysis Make this build in release mode 2004-11-11 22:11:17 +00:00
Archive Recognize compressed LLVM bytecode files. 2004-11-09 19:37:07 +00:00
AsmParser Make sure that the yacc and lex output are specified as BUILT_SOURCES. 2004-10-28 00:43:24 +00:00
Bytecode Recognize compressed LLVM bytecode files. 2004-11-09 19:37:07 +00:00
CodeGen Do not make i have bigger scope that we need 2004-11-05 04:47:37 +00:00
Debugger Change Library Names Not To Conflict With Others When Installed 2004-10-27 23:18:45 +00:00
ExecutionEngine Implement ExecutionEngine::freeMachineCodeForFunction() 2004-11-07 23:58:46 +00:00
Linker Makefile for lib/Linker 2004-11-12 20:38:45 +00:00
Support Tune compression: 2004-11-09 17:58:09 +00:00
System Fix isBytecodeFile to correctly recognized compressed bytecode too. 2004-11-09 20:27:23 +00:00
Target shld is a very high latency operation. Instead of emitting it for shifts of 2004-11-13 20:48:57 +00:00
Transforms Simplify handling of shifts to be the same as we do for adds. Add support 2004-11-13 19:50:12 +00:00
VMCore Stop propagating method names that violate the coding standard 2004-11-05 22:15:36 +00:00
Makefile Wrap long line 2004-09-15 01:34:42 +00:00