- Mar 03, 2007
-
-
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
-
- 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
-
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
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 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
-
Reid Spencer authored
Change use of "packed" term to "vector" in comments, strings, variable names, etc. llvm-svn: 34300
-
Reid Spencer authored
llvm-svn: 34298
-
Reid Spencer authored
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. llvm-svn: 34293
-
- Feb 14, 2007
-
-
Chris Lattner authored
Patch by Scott Michel. llvm-svn: 34266
-
- Feb 13, 2007
-
-
Chris Lattner authored
llvm-svn: 34219
-
- Feb 12, 2007
-
-
Chris Lattner authored
llvm-svn: 34205
-
- Feb 11, 2007
-
-
Chris Lattner authored
llvm-svn: 34176
-
- Feb 10, 2007
-
-
Chris Lattner authored
llvm-svn: 34156
-
- Feb 06, 2007
-
-
Reid Spencer authored
the Transforms library. This reduces debug library size by 132 KB, debug binary size by 376 KB, and reduces link time for llvm tools slightly. llvm-svn: 33939
-
- Feb 05, 2007
-
-
Reid Spencer authored
Adjust to changes in Module interface: getMainFunction() -> getFunction("main") getNamedFunction(X) -> getFunction(X) llvm-svn: 33922
-
Chris Lattner authored
llvm-svn: 33902
-
Chris Lattner authored
llvm-svn: 33900
-
Chris Lattner authored
llvm-svn: 33892
-
Nick Lewycky authored
Learn from sext and zext. The destination value falls within the range of the source type. Generalize properties regarding constant ints. Get smarter about marking blocks as unreachable. If 1 >= 2 in order for this block to execute, then it isn't reachable. llvm-svn: 33889
-
- Feb 04, 2007
-
-
Reid Spencer authored
Make the Module's dependent library use a std::vector instead of SetVector adjust #includes in .cpp files because SetVector.h is no longer included. llvm-svn: 33855
-