- Jan 19, 2005
-
-
Chris Lattner authored
llvm-svn: 19690
-
Chris Lattner authored
llvm-svn: 19689
-
Chris Lattner authored
llvm-svn: 19687
-
Chris Lattner authored
This allows us to generate this: foo: mov %EAX, DWORD PTR [%ESP + 4] mov %EDX, DWORD PTR [%ESP + 8] shld %EDX, %EDX, 2 shl %EAX, 2 ret instead of 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 Note the magically transmogrifying immediate. llvm-svn: 19686
-
Chris Lattner authored
Add default impl of commuteInstruction Add notes about ugly V9 code. llvm-svn: 19684
-
Chris Lattner authored
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. llvm-svn: 19681
-
Chris Lattner authored
llvm-svn: 19678
-
Chris Lattner authored
range. Either they are undefined (the default), they mask the shift amount to the size of the register (X86, Alpha, etc), or they extend the shift (PPC). This defaults to undefined, which is conservatively correct. llvm-svn: 19677
-
- Jan 18, 2005
-
-
Chris Lattner authored
FP_EXTEND from! llvm-svn: 19674
-
Chris Lattner authored
llvm-svn: 19673
-
Chris Lattner authored
don't need to even think about F32 in the X86 code anymore. llvm-svn: 19672
-
Chris Lattner authored
llvm-svn: 19667
-
Chris Lattner authored
llvm-svn: 19661
-
Tanya Lattner authored
llvm-svn: 19660
-
Chris Lattner authored
llvm-svn: 19659
-
Chris Lattner authored
* Insert some really pedantic assertions that will notice when we emit the same loads more than one time, exposing bugs. This turns a miscompilation in bzip2 into a compile-fail. yaay. llvm-svn: 19658
-
Chris Lattner authored
match (X+Y)+(Z << 1), because we match the X+Y first, consuming the index register, then there is no place to put the Z. llvm-svn: 19652
-
Chris Lattner authored
emitted too early. In particular, this fixes Regression/CodeGen/X86/regpressure.ll:regpressure3. This also improves the 2nd basic block in 164.gzip:flush_block, which went from .LBBflush_block_1: # loopentry.1.i movzx %EAX, WORD PTR [dyn_ltree + 20] movzx %ECX, WORD PTR [dyn_ltree + 16] mov DWORD PTR [%ESP + 32], %ECX movzx %ECX, WORD PTR [dyn_ltree + 12] movzx %EDX, WORD PTR [dyn_ltree + 8] movzx %EBX, WORD PTR [dyn_ltree + 4] mov DWORD PTR [%ESP + 36], %EBX movzx %EBX, WORD PTR [dyn_ltree] add DWORD PTR [%ESP + 36], %EBX add %EDX, DWORD PTR [%ESP + 36] add %ECX, %EDX add DWORD PTR [%ESP + 32], %ECX add %EAX, DWORD PTR [%ESP + 32] movzx %ECX, WORD PTR [dyn_ltree + 24] add %EAX, %ECX mov %ECX, 0 mov %EDX, %ECX to .LBBflush_block_1: # loopentry.1.i movzx %EAX, WORD PTR [dyn_ltree] movzx %ECX, WORD PTR [dyn_ltree + 4] add %ECX, %EAX movzx %EAX, WORD PTR [dyn_ltree + 8] add %EAX, %ECX movzx %ECX, WORD PTR [dyn_ltree + 12] add %ECX, %EAX movzx %EAX, WORD PTR [dyn_ltree + 16] add %EAX, %ECX movzx %ECX, WORD PTR [dyn_ltree + 20] add %ECX, %EAX movzx %EAX, WORD PTR [dyn_ltree + 24] add %ECX, %EAX mov %EAX, 0 mov %EDX, %EAX ... which results in less spilling in the function. This change alone speeds up 164.gzip from 37.23s to 36.24s on apoc. The default isel takes 37.31s. llvm-svn: 19650
-
Chris Lattner authored
llvm-svn: 19649
-
Chris Lattner authored
llvm-svn: 19647
-
- Jan 17, 2005
-
-
Chris Lattner authored
llvm-svn: 19645
-
Chris Lattner authored
1. Fold [mem] += (1|-1) into inc [mem]/dec [mem] to save some icache space. 2. Do not let token factor nodes prevent forming '[mem] op= val' folds. llvm-svn: 19643
-
Chris Lattner authored
llvm-svn: 19641
-
Chris Lattner authored
operations. The body of the if is less indented but unmodified in this patch. llvm-svn: 19638
-
Chris Lattner authored
int %foo(int %X) { %T = add int %X, 13 %S = mul int %T, 3 ret int %S } as this: mov %ECX, DWORD PTR [%ESP + 4] lea %EAX, DWORD PTR [%ECX + 2*%ECX + 39] ret instead of this: mov %ECX, DWORD PTR [%ESP + 4] mov %EAX, %ECX add %EAX, 13 imul %EAX, %EAX, 3 ret llvm-svn: 19633
-
Tanya Lattner authored
llvm-svn: 19632
-
Chris Lattner authored
Do not fold a load into an operation if it will induce a cycle in the DAG. Repeat after me: dAg. llvm-svn: 19631
-
Chris Lattner authored
The comparison will probably be folded, so this is not ok to do. This fixed 197.parser. llvm-svn: 19624
-
Chris Lattner authored
of the bytereg. This fixes yacr2, 300.twolf and probably others. llvm-svn: 19622
-
Chris Lattner authored
If we emit a load because we followed a token chain to get to it, try to fold it into its single user if possible. llvm-svn: 19620
-
Chris Lattner authored
llvm-svn: 19619
-
- Jan 16, 2005
-
-
Tanya Lattner authored
llvm-svn: 19615
-
Chris Lattner authored
* Remove custom promotion for bool and byte select ops. Legalize now promotes them for us. * Allow folding ConstantPoolIndexes into EXTLOAD's, useful for float immediates. * Declare which operations are not supported better. * Add some hacky code for TRUNCSTORE to pretend that we have truncstore for i16 types. This is useful for testing promotion code because I can just remove 16-bit registers all together and verify that programs work. llvm-svn: 19614
-
Chris Lattner authored
llvm-svn: 19610
-
Chris Lattner authored
llvm-svn: 19604
-
Reid Spencer authored
llvm-svn: 19592
-
Tanya Lattner authored
llvm-svn: 19587
-
Chris Lattner authored
llvm-svn: 19586
-
Chris Lattner authored
llvm-svn: 19584
-
Chris Lattner authored
llvm-svn: 19581
-