- May 07, 2005
-
-
Chris Lattner authored
Reassociate/shifttest.ll llvm-svn: 21761
-
Chris Lattner authored
llvm-svn: 21759
-
- May 06, 2005
-
-
Chris Lattner authored
llvm-svn: 21737
-
Chris Lattner authored
and.ll:test31 llvm-svn: 21717
-
Chris Lattner authored
the result, turn signed shift rights into unsigned shift rights if possible. This leads to later simplification and happens *often* in 176.gcc. For example, this testcase: struct xxx { unsigned int code : 8; }; enum codes { A, B, C, D, E, F }; int foo(struct xxx *P) { if ((enum codes)P->code == A) bar(); } used to be compiled to: int %foo(%struct.xxx* %P) { %tmp.1 = getelementptr %struct.xxx* %P, int 0, uint 0 ; <uint*> [#uses=1] %tmp.2 = load uint* %tmp.1 ; <uint> [#uses=1] %tmp.3 = cast uint %tmp.2 to int ; <int> [#uses=1] %tmp.4 = shl int %tmp.3, ubyte 24 ; <int> [#uses=1] %tmp.5 = shr int %tmp.4, ubyte 24 ; <int> [#uses=1] %tmp.6 = cast int %tmp.5 to sbyte ; <sbyte> [#uses=1] %tmp.8 = seteq sbyte %tmp.6, 0 ; <bool> [#uses=1] br bool %tmp.8, label %then, label %UnifiedReturnBlock Now it is compiled to: %tmp.1 = getelementptr %struct.xxx* %P, int 0, uint 0 ; <uint*> [#uses=1] %tmp.2 = load uint* %tmp.1 ; <uint> [#uses=1] %tmp.2 = cast uint %tmp.2 to sbyte ; <sbyte> [#uses=1] %tmp.8 = seteq sbyte %tmp.2, 0 ; <bool> [#uses=1] br bool %tmp.8, label %then, label %UnifiedReturnBlock which is the difference between this: foo: subl $4, %esp movl 8(%esp), %eax movl (%eax), %eax shll $24, %eax sarl $24, %eax testb %al, %al jne .LBBfoo_2 and this: foo: subl $4, %esp movl 8(%esp), %eax movl (%eax), %eax testb %al, %al jne .LBBfoo_2 This occurs 3243 times total in the External tests, 215x in povray, 6x in each f2c'd program, 1451x in 176.gcc, 7x in crafty, 20x in perl, 25x in gap, 3x in m88ksim, 25x in ijpeg. Maybe this will cause a little jump on gcc tommorow :) llvm-svn: 21715
-
Chris Lattner authored
llvm-svn: 21713
-
Chris Lattner authored
llvm-svn: 21712
-
Chris Lattner authored
llvm-svn: 21709
-
- May 04, 2005
-
-
Chris Lattner authored
This implements set.ll:test20. This triggers 2x on povray, 9x on mesa, 11x on gcc, 2x on crafty, 1x on eon, 6x on perlbmk and 11x on m88ksim. It allows us to compile these two functions into the same code: struct s { unsigned int bit : 1; }; unsigned foo(struct s *p) { if (p->bit) return 1; else return 0; } unsigned bar(struct s *p) { return p->bit; } llvm-svn: 21690
-
- May 02, 2005
-
-
John Criswell authored
llvm-svn: 21653
-
- May 01, 2005
-
-
Chris Lattner authored
llvm-svn: 21647
-
Chris Lattner authored
Implement load.ll:test7 llvm-svn: 21645
-
- Apr 26, 2005
-
-
Chris Lattner authored
llvm-svn: 21565
-
- Apr 25, 2005
-
-
Chris Lattner authored
llvm-svn: 21541
-
- Apr 24, 2005
-
-
Chris Lattner authored
llvm-svn: 21500
-
Chris Lattner authored
llvm-svn: 21495
-
Chris Lattner authored
Completely rework the 'setcc (cast x to larger), y' code. This code has the advantage of implementing setcc.ll:test19 (being more general than the previous code) and being correct in all cases. This allows us to unxfail 2004-11-27-SetCCForCastLargerAndConstant.ll, and close PR454. llvm-svn: 21491
-
- Apr 23, 2005
-
-
Jeff Cohen authored
llvm-svn: 21480
-
Chris Lattner authored
any constant RHS, not just a constant integer RHS. This implements select.ll:test17 llvm-svn: 21470
-
- Apr 22, 2005
-
-
Misha Brukman authored
llvm-svn: 21427
-
- Apr 21, 2005
-
-
Chris Lattner authored
%shortcirc_val = select bool %tmp.1, bool true, bool %tmp.4 ; <bool> [#uses=1] %tmp.6 = cast bool %shortcirc_val to int ; <int> [#uses=1] into this: %shortcirc_val = or bool %tmp.1, %tmp.4 ; <bool> [#uses=1] %tmp.6 = cast bool %shortcirc_val to int ; <int> [#uses=1] not this: %tmp.4.cast = cast bool %tmp.4 to int ; <int> [#uses=1] %tmp.6 = select bool %tmp.1, int 1, int %tmp.4.cast ; <int> [#uses=1] llvm-svn: 21389
-
- Apr 19, 2005
-
-
Chris Lattner authored
Make IPSCCP strip off dead constant exprs that are using functions, making them appear as though their address is taken. This allows us to propagate some more pool descriptors, lowering the overhead of pool alloc. llvm-svn: 21363
-
Chris Lattner authored
llvm-svn: 21354
-
- Apr 18, 2005
-
-
Chris Lattner authored
llvm-svn: 21320
-
- Apr 15, 2005
-
-
Chris Lattner authored
This pass forward branches through conditions when it can show that the conditions is either always true or false for a predecessor. This currently only handles the most simple cases of this, but is successful at threading across 2489 branches and 65 switch instructions in 176.gcc, which isn't bad. llvm-svn: 21306
-
- Apr 08, 2005
-
-
Chris Lattner authored
llvm-svn: 21152
-
- Apr 07, 2005
-
-
Chris Lattner authored
(X-Y)-X --> -Y A + (B - A) --> B (B - A) + A --> B llvm-svn: 21138
-
Chris Lattner authored
This occurs several dozen times in specint2k, particularly in crafty and gcc apparently. llvm-svn: 21136
-
Chris Lattner authored
llvm-svn: 21134
-
- Mar 29, 2005
-
-
Chris Lattner authored
pointer analysis. llvm-svn: 20916
-
- Mar 28, 2005
-
-
Alkis Evlogimenos authored
createPromoteMemoryToRegisterPass() to be consistent with other pass creation functions. llvm-svn: 20885
-
- Mar 25, 2005
-
-
Chris Lattner authored
This prevents crashes on some programs when using -ds-aa -licm. llvm-svn: 20831
-
Chris Lattner authored
a pointer value out of a loop causing it to be duplicated. llvm-svn: 20828
-
- Mar 23, 2005
-
-
Chris Lattner authored
llvm-svn: 20788
-
- Mar 15, 2005
-
-
Chris Lattner authored
using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! llvm-svn: 20597
-
- Mar 06, 2005
-
-
Chris Lattner authored
llvm-svn: 20506
-
Chris Lattner authored
hopefully not breaking too many other things. llvm-svn: 20505
-
Chris Lattner authored
llvm-svn: 20501
-
Chris Lattner authored
llvm-svn: 20497
-
Chris Lattner authored
llvm-svn: 20494
-