- 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
-
- Feb 26, 2007
-
-
Devang Patel authored
llvm-svn: 34640
-
Devang Patel authored
llvm-svn: 34638
-
- Feb 24, 2007
-
-
Chris Lattner authored
llvm-svn: 34546
-
- Feb 23, 2007
-
-
Chris Lattner authored
llvm-svn: 34531
-
- Feb 22, 2007
-
-
Jim Laskey authored
llvm-svn: 34495
-
- Feb 21, 2007
-
-
Jim Laskey authored
llvm-svn: 34480
-
- Feb 20, 2007
-
-
Dan Gohman authored
llvm-svn: 34456
-
Chris Lattner authored
llvm-svn: 34439
-
- Feb 19, 2007
-
-
Chris Lattner authored
llvm-svn: 34417
-
- Feb 18, 2007
-
-
Chris Lattner authored
llvm-svn: 34395
-
Chris Lattner authored
llvm-svn: 34394
-
- Feb 15, 2007
-
-
Chris Lattner authored
llvm-svn: 34333
-
Chris Lattner authored
by 5%. llvm-svn: 34332
-
Chris Lattner authored
on 447.dealII llvm-svn: 34323
-