- Jun 19, 2004
-
-
Chris Lattner authored
was processing blocks in whatever order they happened to end up in the dominator tree data structure. Force an ordering. llvm-svn: 14248
-
Chris Lattner authored
invalidated out from under us. This bug goes back to revision 1.1: scary. llvm-svn: 14242
-
- Jun 18, 2004
-
-
Chris Lattner authored
occurs due to unordered comparison macros in math.h llvm-svn: 14221
-
- Jun 17, 2004
-
-
Chris Lattner authored
Delete two functions that are now methods on the Type class llvm-svn: 14200
-
Brian Gaeke authored
llvm-svn: 14196
-
- Jun 10, 2004
-
-
Chris Lattner authored
186.crafty, fhourstones and 132.ijpeg. Bugpoint makes really nasty miscompilations embarassingly easy to find. It narrowed it down to the instcombiner and this testcase (from fhourstones): bool %l7153_l4706_htstat_loopentry_2E_4_no_exit_2E_4(int* %i, [32 x int]* %works, int* %tmp.98.out) { newFuncRoot: %tmp.96 = load int* %i ; <int> [#uses=1] %tmp.97 = getelementptr [32 x int]* %works, long 0, int %tmp.96 ; <int*> [#uses=1] %tmp.98 = load int* %tmp.97 ; <int> [#uses=2] %tmp.99 = load int* %i ; <int> [#uses=1] %tmp.100 = and int %tmp.99, 7 ; <int> [#uses=1] %tmp.101 = seteq int %tmp.100, 7 ; <bool> [#uses=2] %tmp.102 = cast bool %tmp.101 to int ; <int> [#uses=0] br bool %tmp.101, label %codeRepl4.exitStub, label %codeRepl3.exitStub codeRepl4.exitStub: ; preds = %newFuncRoot store int %tmp.98, int* %tmp.98.out ret bool true codeRepl3.exitStub: ; preds = %newFuncRoot store int %tmp.98, int* %tmp.98.out ret bool false } ... which only has one combination performed on it: $ llvm-as < t.ll | opt -instcombine -debug | llvm-dis IC: Old = %tmp.101 = seteq int %tmp.100, 7 ; <bool> [#uses=1] New = setne int %tmp.100, 0 ; <bool>:<badref> [#uses=0] IC: MOD = br bool %tmp.101, label %codeRepl3.exitStub, label %codeRepl4.exitStub IC: MOD = %tmp.97 = getelementptr [32 x int]* %works, uint 0, int %tmp.96 ; <int*> [#uses=1] It doesn't get much better than this. :) llvm-svn: 14109
-
Chris Lattner authored
llvm-svn: 14108
-
Chris Lattner authored
llvm-svn: 14107
-
- Jun 09, 2004
-
-
Chris Lattner authored
llvm-svn: 14095
-
Chris Lattner authored
collapse this: bool %le(int %A, int %B) { %c1 = setgt int %A, %B %tmp = select bool %c1, int 1, int 0 %c2 = setlt int %A, %B %result = select bool %c2, int -1, int %tmp %c3 = setle int %result, 0 ret bool %c3 } into: bool %le(int %A, int %B) { %c3 = setle int %A, %B ; <bool> [#uses=1] ret bool %c3 } which is handy, because the Java FE makes these sequences all over the place. This is tested as: test/Regression/Transforms/InstCombine/JavaCompare.ll llvm-svn: 14086
-
Chris Lattner authored
llvm-svn: 14083
-
- May 28, 2004
-
-
Chris Lattner authored
llvm-svn: 13872
-
- May 27, 2004
-
-
Chris Lattner authored
This code hadn't been updated after the "structs with more than 256 elements" related changes to the GEP instruction. Also it was not handling the ConstantAggregateZero class. Now it does! llvm-svn: 13834
-
- May 25, 2004
-
-
Reid Spencer authored
llvm-svn: 13750
-
Reid Spencer authored
llvm-svn: 13749
-
Chris Lattner authored
into (X & (C2 << C1)) != (C3 << C1), where the shift may be either left or right and the compare may be any one. This triggers 1546 times in 176.gcc alone, as it is a common pattern that occurs for bitfield accesses. llvm-svn: 13740
-
Chris Lattner authored
Canonicalize cast X to bool into a setne instruction llvm-svn: 13736
-
- May 23, 2004
-
-
Chris Lattner authored
llvm-svn: 13702
-
Chris Lattner authored
llvm-svn: 13690
-
Chris Lattner authored
llvm-svn: 13689
-
Chris Lattner authored
that do not have builtin support for garbage collection. llvm-svn: 13688
-
- May 13, 2004
-
-
Chris Lattner authored
llvm-svn: 13565
-
Chris Lattner authored
in the size calculation. This is not something you want to see: Loop Unroll: F[main] Loop %no_exit Loop Size = 2 Trip Count = 2147483648 - UNROLLING! The problem was that 2*2147483648 == 0. Now we get: Loop Unroll: F[main] Loop %no_exit Loop Size = 2 Trip Count = 2147483648 - TOO LARGE: 4294967296>100 Thanks to some anonymous person playing with the demo page that repeatedly caused zion to go into swapping land. That's one way to ensure you'll get a quick bugfix. :) Testcase here: Transforms/LoopUnroll/2004-05-13-DontUnrollTooMuch.ll llvm-svn: 13564
-
- May 09, 2004
-
-
Chris Lattner authored
llvm-svn: 13429
-
- May 08, 2004
-
-
Chris Lattner authored
%tmp.0 = getelementptr [50 x sbyte]* %ar, uint 0, int 5 ; <sbyte*> [#uses=2] %tmp.7 = getelementptr sbyte* %tmp.0, int 8 ; <sbyte*> [#uses=1] together. This patch actually allows us to simplify and generalize the code. llvm-svn: 13415
-
- May 07, 2004
-
-
Chris Lattner authored
llvm-svn: 13400
-
- May 04, 2004
-
-
Chris Lattner authored
This fixes PR332 and ADCE/2004-05-04-UnreachableBlock.llx llvm-svn: 13349
-
Chris Lattner authored
llvm-svn: 13341
-
- May 02, 2004
-
-
Chris Lattner authored
missing opportunities for combination. llvm-svn: 13309
-
Chris Lattner authored
when replacing them, missing the opportunity to do simplifications llvm-svn: 13308
-
- Apr 30, 2004
-
-
Chris Lattner authored
is only used by a cast, and the casted type is the same size as the original allocation, it would eliminate the cast by folding it into the allocation. Unfortunately, it was placing the new allocation instruction right before the cast, which could pull (for example) alloca instructions into the body of a function. This turns statically allocatable allocas into expensive dynamically allocated allocas, which is bad bad bad. This fixes the problem by placing the new allocation instruction at the same place the old one was, duh. :) llvm-svn: 13289
-
- Apr 27, 2004
-
-
Chris Lattner authored
patch was graciously contributed by Vladimir Prus. llvm-svn: 13185
-
- Apr 26, 2004
-
-
Chris Lattner authored
llvm-svn: 13172
-
- Apr 23, 2004
-
-
Chris Lattner authored
still room for cleanup, but at least the code modification is out of the analysis now. llvm-svn: 13135
-
- Apr 22, 2004
-
-
Chris Lattner authored
llvm-svn: 13108
-
Chris Lattner authored
llvm-svn: 13106
-
Chris Lattner authored
loop. This eliminates the extra add from the previous case, but it's not clear that this will be a performance win overall. Tommorows test results will tell. :) llvm-svn: 13103
-
Chris Lattner authored
over its USES. If it's dead it doesn't have any uses! :) Thanks to the fabulous and mysterious Bill Wendling for pointing this out. :) llvm-svn: 13102
-
Chris Lattner authored
types in them. Instead of creating an induction variable for all types, it creates a single induction variable and casts to the other sizes. This generates this code: no_exit: ; preds = %entry, %no_exit %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=4] *** %j.0.0 = cast uint %indvar to short ; <short> [#uses=1] %indvar = cast uint %indvar to int ; <int> [#uses=1] %tmp.7 = getelementptr short* %P, uint %indvar ; <short*> [#uses=1] store short %j.0.0, short* %tmp.7 %inc.0 = add int %indvar, 1 ; <int> [#uses=2] %tmp.2 = setlt int %inc.0, %N ; <bool> [#uses=1] %indvar.next = add uint %indvar, 1 ; <uint> [#uses=1] br bool %tmp.2, label %no_exit, label %loopexit instead of: no_exit: ; preds = %entry, %no_exit %indvar = phi ushort [ %indvar.next, %no_exit ], [ 0, %entry ] ; <ushort> [#uses=2] *** %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=3] %indvar = cast uint %indvar to int ; <int> [#uses=1] %indvar = cast ushort %indvar to short ; <short> [#uses=1] %tmp.7 = getelementptr short* %P, uint %indvar ; <short*> [#uses=1] store short %indvar, short* %tmp.7 %inc.0 = add int %indvar, 1 ; <int> [#uses=2] %tmp.2 = setlt int %inc.0, %N ; <bool> [#uses=1] %indvar.next = add uint %indvar, 1 *** %indvar.next = add ushort %indvar, 1 br bool %tmp.2, label %no_exit, label %loopexit This is an improvement in register pressure, but probably doesn't happen that often. The more important fix will be to get rid of the redundant add. llvm-svn: 13101
-
- Apr 20, 2004
-
-
Chris Lattner authored
llvm-svn: 13081
-