| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 145556
|
|
|
|
| |
llvm-svn: 144121
|
|
|
|
| |
llvm-svn: 143719
|
|
|
|
|
|
|
|
|
|
|
|
| |
with the given predicate, it matches any condition and returns the
predicate - d'oh! Original commit message:
The expression icmp eq (select (icmp eq x, 0), 1, x), 0 folds to false.
Spotted by my super-optimizer in 186.crafty and 450.soplex. We really
need a proper infrastructure for handling generalizations of this kind
of thing (which occur a lot), however this case is so simple that I decided
to go ahead and implement it directly.
llvm-svn: 143318
|
|
|
|
| |
llvm-svn: 143265
|
|
|
|
|
|
|
|
|
| |
Spotted by my super-optimizer in 186.crafty and 450.soplex. We really
need a proper infrastructure for handling generalizations of this kind
of thing (which occur a lot), however this case is so simple that I decided
to go ahead and implement it directly.
llvm-svn: 143214
|
|
|
|
|
|
| |
in 186.crafty.
llvm-svn: 143209
|
|
|
|
|
|
|
|
|
|
|
| |
using BinaryOperator (which only works for instructions) when it should have
been a cast to OverflowingBinaryOperator (which also works for constants).
While there, correct a few other dubious looking uses of BinaryOperator.
Thanks to Chad Rosier for the testcase. Original commit message:
My super-optimizer noticed that we weren't folding this expression to
true: (x *nsw x) sgt 0, where x = (y | 1). This occurs in 464.h264ref.
llvm-svn: 143125
|
|
|
|
|
|
| |
in 403.gcc and was spotted by my super-optimizer.
llvm-svn: 143054
|
|
|
|
|
|
|
|
| |
original value if types don't match.
Fixes clang selfhost.
llvm-svn: 139120
|
|
|
|
|
|
| |
up do-nothing exception handling code produced by dragonegg.
llvm-svn: 139113
|
|
|
|
|
|
| |
is clearly impossible given the current structure of the code.
llvm-svn: 137853
|
|
|
|
|
|
| |
how to actually trigger the codepath in question at the moment, but it might get exposed in the future.
llvm-svn: 137781
|
|
|
|
|
|
| |
reported at http://habrahabr.ru/blogs/compilers/125626/.
llvm-svn: 136865
|
|
|
|
|
|
|
| |
way for i1 and vector of i1 types. Use these to make some code
more self-documenting.
llvm-svn: 136079
|
|
|
|
| |
llvm-svn: 135904
|
|
|
|
|
|
| |
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef.
llvm-svn: 135673
|
|
|
|
| |
llvm-svn: 135482
|
|
|
|
| |
llvm-svn: 135477
|
|
|
|
| |
llvm-svn: 135375
|
|
|
|
| |
llvm-svn: 134223
|
|
|
|
|
|
|
| |
often expressed as "x >= y ? x : y", there is a good chance we can extract
the existing "x >= y" from it and use that as a replacement for "max(x,y)==x".
llvm-svn: 131049
|
|
|
|
|
|
| |
side of the icmp is an exact shift.
llvm-svn: 130954
|
|
|
|
|
|
|
|
| |
but according to my super-optimizer there are only two missed simplifications
of -instsimplify kind when compiling bzip2, and this is one of them. It amuses
me to have bzip2 be perfectly optimized as far as instsimplify goes!
llvm-svn: 130840
|
|
|
|
|
|
|
|
| |
max(a,b) >= a -> true. According to my super-optimizer, these are
by far the most common simplifications (of the -instsimplify kind)
that occur in the testsuite and aren't caught by -std-compile-opts.
llvm-svn: 130780
|
|
|
|
|
|
| |
a vector compare, generate a vector result rather than i1 (and crashing).
llvm-svn: 130706
|
|
|
|
|
|
|
| |
This automagically provides a transform noticed by my super-optimizer
as occurring quite often: "rem x, (select cond, x, 1)" -> 0.
llvm-svn: 130694
|
|
|
|
| |
llvm-svn: 129271
|
|
|
|
|
|
| |
Thanks Duncan Sands!
llvm-svn: 127323
|
|
|
|
|
|
|
|
|
| |
gave up when I realized I couldn't come up with a good name for what the
refactored function would be, to describe what it does.
This is PR9343 test12, which is test3 with arguments reordered. Whoops!
llvm-svn: 127318
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 127021
|
|
|
|
|
|
|
| |
in the urem case, though not the other way around. This is enough to get #3 from
PR9343!
llvm-svn: 126991
|
|
|
|
|
|
|
|
|
| |
"icmp pred %X, CI" and a number of examples where "%X = binop %Y, CI2".
Some of these cases (div and rem) used to make it through opt -O2, but the
others are probably now making code elsewhere redundant (probably instcombine).
llvm-svn: 126988
|
|
|
|
|
|
|
| |
more work to do here, "icmp ult (urem X, 10), 11" doesn't optimize away yet.
Fixes example 3 from PR9343!
llvm-svn: 126741
|
|
|
|
| |
llvm-svn: 126082
|
|
|
|
| |
llvm-svn: 125463
|
|
|
|
|
|
|
|
| |
plus some variations of this. According to my auto-simplifier this occurs a lot
but usually in combination with max/min idioms. Because max/min aren't handled
yet this unfortunately doesn't have much effect in the testsuite.
llvm-svn: 125462
|
|
|
|
| |
llvm-svn: 125200
|
|
|
|
|
|
| |
improve interfaces to instsimplify to take this info.
llvm-svn: 125196
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
versions of creation functions. Eventually, the "insertion point" versions
of these should just be removed, we do have IRBuilder afterall.
Do a massive rewrite of much of pattern match. It is now shorter and less
redundant and has several other widgets I will be using in other patches.
Among other changes, m_Div is renamed to m_IDiv (since it only matches
integer divides) and m_Shift is gone (it used to match all binops!!) and
we now have m_LogicalShift for the one client to use.
Enhance IRBuilder to have "isExact" arguments to things like CreateUDiv
and reduce redundancy within IRbuilder by having these methods chain to
each other more instead of duplicating code.
llvm-svn: 125194
|
|
|
|
|
|
| |
to simplify the "(X/Y)*Y->X when the division is exact" transform.
llvm-svn: 125004
|
|
|
|
|
|
| |
when the div is an exact udiv.
llvm-svn: 124994
|
|
|
|
| |
llvm-svn: 124961
|
|
|
|
|
|
|
|
|
|
| |
auto-simplifier). This has a big impact on Ada code, but not much else.
Unfortunately the impact is mostly negative! This is due to PR9004 (aka
SCCP failing to resolve conditional branch conditions in the destination
blocks of the branch), in which simple correlated expressions are not
resolved but complicated ones are, so simplifying has a bad effect!
llvm-svn: 124788
|
|
|
|
|
|
|
|
| |
overflow (nsw flag), which was disabled because it breaks 254.gap. I have
informed the GAP authors of the mistake in their code, and arranged for the
testsuite to use -fwrapv when compiling this benchmark.
llvm-svn: 124746
|
|
|
|
|
|
|
| |
pattern matching can also pattern match undef, creating a more uniform
style.
llvm-svn: 124657
|
|
|
|
| |
llvm-svn: 124655
|
|
|
|
|
|
| |
by PR9088 fixes things.
llvm-svn: 124561
|
|
|
|
|
|
|
|
|
|
|
|
| |
knows how
to do this and more, but would only do it if X/Y had only one use. Spotted as the
most common missed simplification in SPEC by my auto-simplifier, now that it knows
about nuw/nsw/exact flags. This removes a bunch of multiplications from 447.dealII
and 483.xalancbmk. It also removes a lot from tramp3d-v4, which results in much
more inlining.
llvm-svn: 124560
|