llvm-6502/lib/Target/X86
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
..
.cvsignore Tell CVS to ignore all .inc files 2003-08-03 15:50:17 +00:00
Makefile Change Library Names Not To Conflict With Others When Installed 2004-10-27 23:18:45 +00:00
X86.h Add -sse[,2,3] arguments to LLC 2004-08-24 08:18:44 +00:00
X86.td Add support for the -x86-asm-syntax flag, which can be used to choose between 2004-10-03 20:36:57 +00:00
X86AsmPrinter.cpp Give the asmprinter the ability to print memrefs with a constant pool index, 2004-10-17 07:16:32 +00:00
X86CodeEmitter.cpp Fix compilation problem; make the cast and the LHS be the same type. 2004-11-05 16:17:06 +00:00
X86FloatingPoint.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
X86InstrBuilder.h Allow X86 addressing modes to represent globals with offsets. Patch contributed 2004-10-15 04:43:20 +00:00
X86InstrInfo.cpp Fix a warning 2004-08-01 19:31:30 +00:00
X86InstrInfo.h Remove a bunch of ad-hoc target-specific flags that were only used by the 2004-08-11 07:12:04 +00:00
X86InstrInfo.td Correct the name of stosd for the AT&T syntax: 2004-11-10 04:48:15 +00:00
X86ISelPattern.cpp Disable the pattern isel 2004-08-15 23:02:17 +00:00
X86ISelSimple.cpp shld is a very high latency operation. Instead of emitting it for shifts of 2004-11-13 20:48:57 +00:00
X86JITInfo.h Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering 2003-12-28 21:23:38 +00:00
X86PeepholeOpt.cpp Add some new instructions. Fix the asm string for sbb32rr 2004-10-06 04:01:02 +00:00
X86RegisterInfo.cpp Add some new instructions. Fix the asm string for sbb32rr 2004-10-06 04:01:02 +00:00
X86RegisterInfo.h Code insertion methods now return void instead of an int. 2004-08-15 22:15:11 +00:00
X86RegisterInfo.td The real x87 floating point registers should not be allocatable. They 2004-09-21 21:22:11 +00:00
X86TargetMachine.cpp Fix a warning 2004-11-02 15:27:57 +00:00
X86TargetMachine.h Auto-registrate target 2004-07-11 02:48:49 +00:00