| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
right thing, instead of merely being unable to analyze and the transform
doesn't occur.
llvm-svn: 127149
|
|
|
|
|
|
|
| |
then the result could go either way. If it's provably positive then so is the
srem. Fixes PR9343 #7!
llvm-svn: 127146
|
|
|
|
|
|
|
|
| |
the value splatted into every element. Extend this to getTrue and getFalse which
by providing new overloads that take Types that are either i1 or <N x i1>. Use
it in InstCombine to add vector support to some code, fixing PR8469!
llvm-svn: 127116
|
|
|
|
|
|
|
|
|
| |
possible. This goes into instcombine and instsimplify because instsimplify
doesn't need to check hasOneUse since it returns (almost exclusively) constants.
This fixes PR9343 #4 #5 and #8!
llvm-svn: 127064
|
|
|
|
|
|
| |
true/false or "icmp slt/sge Y, 0".
llvm-svn: 127063
|
|
|
|
|
|
|
| |
in the urem case, though not the other way around. This is enough to get #3 from
PR9343!
llvm-svn: 126991
|
|
|
|
|
|
|
| |
also have a zero when numerator = denominator. Reverts parts of r126635 and
r126637.
llvm-svn: 126644
|
|
|
|
|
|
| |
PR9343.
llvm-svn: 126643
|
|
|
|
|
|
|
| |
argument), regardless of the divisor. Teach instcombine about this and fix
test7 in PR9343!
llvm-svn: 126635
|
|
|
|
|
|
| |
overflow. These subsume some existing equality transforms, so zap those.
llvm-svn: 125843
|
|
|
|
|
|
|
|
|
| |
for some
variations (some of these were already present so I unified the code). Spotted by my
auto-simplifier as occurring a lot.
llvm-svn: 125734
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gep to explicit addressing, we know that none of the intermediate
computation overflows.
This could use review: it seems that the shifts certainly wouldn't
overflow, but could the intermediate adds overflow if there is a
negative index?
Previously the testcase would instcombine to:
define i1 @test(i64 %i) {
%p1.idx.mask = and i64 %i, 4611686018427387903
%cmp = icmp eq i64 %p1.idx.mask, 1000
ret i1 %cmp
}
now we get:
define i1 @test(i64 %i) {
%cmp = icmp eq i64 %i, 1000
ret i1 %cmp
}
llvm-svn: 125271
|
|
|
|
| |
llvm-svn: 125195
|
|
|
|
|
|
|
|
| |
determining which bits are demanded by
a comparison against a constant.
llvm-svn: 123203
|
|
|
|
|
|
| |
on this instcombine xform. This fixes a miscompilation of 403.gcc.
llvm-svn: 119988
|
|
|
|
|
|
|
|
|
| |
void a(int x) { if (((1<<x)&8)==0) b(); }
into "x != 3", which occurs over 100 times in 403.gcc but in no
other program in llvm-test.
llvm-svn: 119922
|
|
|
|
| |
llvm-svn: 107074
|
|
|
|
| |
llvm-svn: 97659
|
|
|
|
| |
llvm-svn: 94997
|
|
|
|
|
|
|
|
|
|
|
| |
Use the presence of NSW/NUW to fold "icmp (x+cst), x" to a constant in
cases where it would otherwise be undefined behavior.
Surprisingly (to me at least), this triggers hundreds of the times in
a few benchmarks: lencode, ldecode, and 466.h264ref seem to *really*
like this.
llvm-svn: 91812
|
|
|
|
|
|
|
| |
a bunch in lencode, ldecod, spass, 176.gcc, 252.eon, among others. It is
also the first part of PR5822
llvm-svn: 91811
|
|
|
|
| |
llvm-svn: 91810
|
|
|
|
| |
llvm-svn: 83792
|
|
|
|
| |
llvm-svn: 81257
|
|
|
|
|
|
| |
of using llvm-as, now that opt supports this.
llvm-svn: 81226
|
|
|
|
|
|
| |
return a vector of i1, not i1 itself.
llvm-svn: 80761
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I noticed this in the code compiled for a routine using std::map, which produced
this code:
%25 = tail call i32 @memcmp(i8* %24, i8* %23, i32 6) nounwind readonly
%.lobit.i = lshr i32 %25, 31 ; <i32> [#uses=1]
%tmp.i = trunc i32 %.lobit.i to i8 ; <i8> [#uses=1]
%toBool = icmp eq i8 %tmp.i, 0 ; <i1> [#uses=1]
br i1 %toBool, label %bb3, label %bb4
which compiled to:
call L_memcmp$stub
shrl $31, %eax
testb %al, %al
jne LBB1_11 ##
with this change, we compile it to:
call L_memcmp$stub
testl %eax, %eax
js LBB1_11
This triggers all the time in common code, with patters like this:
%169 = and i32 %ply, 1 ; <i32> [#uses=1]
%170 = trunc i32 %169 to i8 ; <i8> [#uses=1]
%toBool = icmp ne i8 %170, 0 ; <i1> [#uses=1]
%7 = lshr i32 %6, 24 ; <i32> [#uses=1]
%9 = trunc i32 %7 to i8 ; <i8> [#uses=1]
%10 = icmp ne i8 %9, 0 ; <i1> [#uses=1]
etc
llvm-svn: 61985
|
|
|
|
|
|
| |
Upgrade tests to work with new llvm.exp version of llvm_runtest.
llvm-svn: 36013
|
|
|
|
| |
llvm-svn: 35892
|
|
llvm-svn: 35889
|