1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/lib
Chris Lattner 1cde11aa95 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.

llvm-svn: 17707
2004-11-13 20:48:57 +00:00
..
Analysis Fix a bug that was preventing povray and namd from pool allocating correctly. 2004-11-08 21:08:46 +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