llvm-6502/lib/Target/X86
Chris Lattner 8571637ee9 Codegen long >> 2 to this:
foo:
        mov %EAX, DWORD PTR [%ESP + 4]
        mov %EDX, DWORD PTR [%ESP + 8]
        shrd %EAX, %EDX, 2
        sar %EDX, 2
        ret

instead of this:

test1:
        mov %ECX, DWORD PTR [%ESP + 4]
        shr %ECX, 2
        mov %EDX, DWORD PTR [%ESP + 8]
        mov %EAX, %EDX
        shl %EAX, 30
        or %EAX, %ECX
        sar %EDX, 2
        ret

and long << 2 to this:

foo:
        mov %EAX, DWORD PTR [%ESP + 4]
        mov %ECX, DWORD PTR [%ESP + 8]
***     mov %EDX, %EAX
        shrd %EDX, %ECX, 30
        shl %EAX, 2
        ret

instead of this:

foo:
        mov %EAX, DWORD PTR [%ESP + 4]
        mov %ECX, %EAX
        shr %ECX, 30
        mov %EDX, DWORD PTR [%ESP + 8]
        shl %EDX, 2
        or %EDX, %ECX
        shl %EAX, 2
        ret

The extra copy (marked ***) can be eliminated when I teach the code generator
that shrd32rri8 is really commutative.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19681 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 06:18:43 +00:00
..
.cvsignore ignore generated files 2004-11-21 00:01:54 +00:00
Makefile Adjust to changes in asmwriter filenames 2004-12-16 17:33:24 +00:00
X86.h Add a new prototype 2005-01-07 07:48:33 +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 Print a load of a null pointer (in intel mode) like this: 2005-01-12 04:07:11 +00:00
X86CodeEmitter.cpp There is no reason to emit function stubs for direct calls. 2004-11-21 03:46:06 +00:00
X86FloatingPoint.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
X86InstrBuilder.h Fix indentation. 2005-01-17 23:25:45 +00:00
X86InstrInfo.cpp Disable 2->3 address promotion of add and inc instructions to LEA's. In 2005-01-02 04:18:17 +00:00
X86InstrInfo.h Implement the convertToThreeAddress method, add support for inverting JP/JNP 2005-01-02 02:37:07 +00:00
X86InstrInfo.td Add conditional moves for the parity flag. 2005-01-10 22:09:33 +00:00
X86ISelPattern.cpp Codegen long >> 2 to this: 2005-01-19 06:18:43 +00:00
X86ISelSimple.cpp Fix a subtle bug involving constant expr casts from int to fp 2005-01-09 01:49:29 +00:00
X86JITInfo.cpp Do not push two return addresses on the stack when we call external functions who have their addresses taken. This fixes test-call.ll 2004-11-22 22:25:30 +00:00
X86JITInfo.h We implement these interfaces 2004-11-20 23:53:56 +00:00
X86PeepholeOpt.cpp Do not lose the offset from teh global when peephole optimizing instructions. 2005-01-12 05:17:28 +00:00
X86RegisterInfo.cpp Add conditional moves for the parity flag. 2005-01-10 22:09:33 +00:00
X86RegisterInfo.h Code insertion methods now return void instead of an int. 2004-08-15 22:15:11 +00:00
X86RegisterInfo.td Minor optimization to allocate R8 registers in a better order. 2005-01-05 16:09:16 +00:00
X86Relocations.h Describe the X86 target-specific relocations. 2004-11-20 23:54:19 +00:00
X86TargetMachine.cpp Allow the selection-dag based selector to be diabled with -disable-pattern-isel. 2005-01-07 07:50:50 +00:00
X86TargetMachine.h Remove a dead function, which died when we got GAS emission working (phwew, 2004-11-16 04:34:29 +00:00