- Mar 07, 2007
-
-
Devang Patel authored
llvm-svn: 34996
-
Devang Patel authored
llvm-svn: 34992
-
- Mar 06, 2007
-
-
Devang Patel authored
llvm-svn: 34984
-
Reid Spencer authored
llvm-svn: 34939
-
- Mar 05, 2007
-
-
Chris Lattner authored
scalarrepl things down to elements, but mem2reg can't promote elements that are memset/memcpy'd. Until then, the code is disabled "0 &&". llvm-svn: 34924
-
Chris Lattner authored
llvm-svn: 34920
-
Chris Lattner authored
define i64 @test(i64 %A, i32 %B) { %tmp12 = zext i32 %B to i64 ; <i64> [#uses=1] %tmp3 = shl i64 %tmp12, 32 ; <i64> [#uses=1] %tmp5 = add i64 %tmp3, %A ; <i64> [#uses=1] %tmp6 = and i64 %tmp5, 123 ; <i64> [#uses=1] ret i64 %tmp6 } into: define i64 @test(i64 %A, i32 %B) { %tmp6 = and i64 %A, 123 ; <i64> [#uses=1] ret i64 %tmp6 } This implements Transforms/InstCombine/add2.ll:test1 llvm-svn: 34919
-
Jeff Cohen authored
llvm-svn: 34917
-
Chris Lattner authored
llvm-svn: 34914
-
- Mar 04, 2007
-
-
Chris Lattner authored
llvm-svn: 34904
-
Chris Lattner authored
llvm-svn: 34902
-
Chris Lattner authored
up simplifycfg by 20% llvm-svn: 34901
-
Chris Lattner authored
would scan the entire loop body, then scan all users of instructions in the loop, looking for users outside the loop. Now, since we know that the loop is in LCSSA form, we know that any users outside the loop will be LCSSA phi nodes. Just scan them. This speeds up indvars significantly. llvm-svn: 34898
-
Chris Lattner authored
This makes -indvars require and use LCSSA, updating it as appropriate. llvm-svn: 34896
-
- Mar 03, 2007
-
-
Chris Lattner authored
llvm-svn: 34891
-
Chris Lattner authored
the order that instcombine processed instructions in the testcase. The end result is that instcombine finished with: define i16 @test1(i16 %a) { %tmp = zext i16 %a to i32 ; <i32> [#uses=2] %tmp21 = lshr i32 %tmp, 8 ; <i32> [#uses=1] %tmp5 = shl i32 %tmp, 8 ; <i32> [#uses=1] %tmp.upgrd.32 = or i32 %tmp21, %tmp5 ; <i32> [#uses=1] %tmp.upgrd.3 = trunc i32 %tmp.upgrd.32 to i16 ; <i16> [#uses=1] ret i16 %tmp.upgrd.3 } which can't get matched as a bswap. This patch makes instcombine more sophisticated about removing truncating casts, allowing it to turn this into: define i16 @test2(i16 %a) { %tmp211 = lshr i16 %a, 8 %tmp52 = shl i16 %a, 8 %tmp.upgrd.323 = or i16 %tmp211, %tmp52 ret i16 %tmp.upgrd.323 } which then matches as bswap. This fixes bswap.ll and implements InstCombine/cast2.ll:test[12]. This also implements cast elimination of add/sub. llvm-svn: 34870
-
Nick Lewycky authored
llvm-svn: 34868
-
Chris Lattner authored
finish without combining something it is capable of. llvm-svn: 34865
-
Reid Spencer authored
llvm-svn: 34863
-
Reid Spencer authored
Replace expensive getZExtValue() == 0 calls with isZero() calls. llvm-svn: 34861
-
Reid Spencer authored
llvm-svn: 34860
-
Reid Spencer authored
llvm-svn: 34859
-
Reid Spencer authored
llvm-svn: 34858
-
Reid Spencer authored
llvm-svn: 34856
-
Reid Spencer authored
2. Make sure debug output of APInt values is safe for all bit widths. llvm-svn: 34855
-
Reid Spencer authored
llvm-svn: 34854
-
Reid Spencer authored
llvm-svn: 34853
-
- Mar 02, 2007
-
-
Chris Lattner authored
a value from the worklist required scanning the entire worklist to remove all entries. We now use a combination map+vector to prevent duplicates from happening and prevent the scan. This speeds up instcombine on a large file from the llvm-gcc bootstrap from 189.7s to 4.84s in a debug build and from 5.04s to 1.37s in a release build. llvm-svn: 34848
-
Chris Lattner authored
llvm-svn: 34846
-
Chris Lattner authored
llvm-svn: 34832
-
Reid Spencer authored
llvm-svn: 34822
-
Reid Spencer authored
Constant::isNullValue() in situations where it is possible. llvm-svn: 34821
-
- Mar 01, 2007
-
-
Reid Spencer authored
using isNullValue() instead of getZExtValue() == 0. llvm-svn: 34815
-
Reid Spencer authored
assert if the ConstantInt's value is large. llvm-svn: 34814
-
Reid Spencer authored
bit width of the ConstantInt being converted. llvm-svn: 34810
-
Reid Spencer authored
This caused a warning for construction with -1. Avoid the warning by using -1ULL instead. llvm-svn: 34796
-
Reid Spencer authored
are not needed as the results are the same with or without it. Patch by Nicholas Lewycky. llvm-svn: 34782
-
- Feb 28, 2007
-
-
Reid Spencer authored
Adjust to changes in ConstantRange interface. llvm-svn: 34762
-
Reid Spencer authored
Remove ConstantInt from ConstantRange interface and adjust its users to compensate. llvm-svn: 34758
-
Reid Spencer authored
First round of ConstantRange changes. This makes all CR constructors use only APInt and not use ConstantInt. Clients are adjusted accordingly. llvm-svn: 34756
-