| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
this out.
llvm-svn: 34920
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 34917
|
|
|
|
| |
llvm-svn: 34914
|
|
|
|
| |
llvm-svn: 34904
|
|
|
|
| |
llvm-svn: 34902
|
|
|
|
|
|
| |
up simplifycfg by 20%
llvm-svn: 34901
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
test/Transforms/IndVarsSimplify/loop_evaluate_[234].ll
This makes -indvars require and use LCSSA, updating it as appropriate.
llvm-svn: 34896
|
|
|
|
| |
llvm-svn: 34891
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 34868
|
|
|
|
|
|
| |
finish without combining something it is capable of.
llvm-svn: 34865
|
|
|
|
| |
llvm-svn: 34863
|
|
|
|
|
|
| |
Replace expensive getZExtValue() == 0 calls with isZero() calls.
llvm-svn: 34861
|
|
|
|
| |
llvm-svn: 34860
|
|
|
|
| |
llvm-svn: 34859
|
|
|
|
| |
llvm-svn: 34858
|
|
|
|
| |
llvm-svn: 34856
|
|
|
|
|
|
| |
2. Make sure debug output of APInt values is safe for all bit widths.
llvm-svn: 34855
|
|
|
|
| |
llvm-svn: 34854
|
|
|
|
| |
llvm-svn: 34853
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 34846
|
|
|
|
| |
llvm-svn: 34832
|
|
|
|
| |
llvm-svn: 34822
|
|
|
|
|
|
| |
Constant::isNullValue() in situations where it is possible.
llvm-svn: 34821
|
|
|
|
|
|
| |
using isNullValue() instead of getZExtValue() == 0.
llvm-svn: 34815
|
|
|
|
|
|
| |
assert if the ConstantInt's value is large.
llvm-svn: 34814
|
|
|
|
|
|
| |
bit width of the ConstantInt being converted.
llvm-svn: 34810
|
|
|
|
|
|
|
| |
This caused a warning for construction with -1. Avoid the warning by using
-1ULL instead.
llvm-svn: 34796
|
|
|
|
|
|
|
|
| |
are not needed as the results are the same with or without it.
Patch by Nicholas Lewycky.
llvm-svn: 34782
|
|
|
|
|
|
| |
Adjust to changes in ConstantRange interface.
llvm-svn: 34762
|
|
|
|
|
|
|
| |
Remove ConstantInt from ConstantRange interface and adjust its users to
compensate.
llvm-svn: 34758
|
|
|
|
|
|
|
| |
First round of ConstantRange changes. This makes all CR constructors use
only APInt and not use ConstantInt. Clients are adjusted accordingly.
llvm-svn: 34756
|
|
|
|
| |
llvm-svn: 34640
|
|
|
|
| |
llvm-svn: 34638
|
|
|
|
| |
llvm-svn: 34546
|
|
|
|
| |
llvm-svn: 34531
|
|
|
|
| |
llvm-svn: 34495
|
|
|
|
| |
llvm-svn: 34480
|
|
|
|
| |
llvm-svn: 34456
|
|
|
|
| |
llvm-svn: 34439
|
|
|
|
| |
llvm-svn: 34417
|
|
|
|
| |
llvm-svn: 34395
|
|
|
|
| |
llvm-svn: 34394
|
|
|
|
| |
llvm-svn: 34333
|
|
|
|
|
|
| |
by 5%.
llvm-svn: 34332
|
|
|
|
|
|
| |
on 447.dealII
llvm-svn: 34323
|
|
|
|
|
|
|
| |
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.
llvm-svn: 34300
|