| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
repeatedly undo each other. The solution is to perform more aggressive constant folding to make one of the edges just folded away rather than trying to thread it.
Fixes <rdar://problem/9284786>.
Discovered with CSmith.
llvm-svn: 129538
|
|
|
|
|
|
|
|
|
|
|
| |
after the given instruction; make sure to handle that case correctly.
(It's difficult to trigger; the included testcase involves a dead
block, but I don't think that's a requirement.)
While I'm here, get rid of the unnecessary warning about
SimplifyInstructionsInBlock, since it should work correctly as far as I know.
llvm-svn: 128782
|
|
|
|
| |
llvm-svn: 127243
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
taken (and used!). This prevents merging the blocks (invalidating
the block addresses) in a case like this:
#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
void foo() {
printf("%p\n", _THIS_IP_);
printf("%p\n", _THIS_IP_);
printf("%p\n", _THIS_IP_);
}
which fixes PR4151.
llvm-svn: 125829
|
|
|
|
|
|
| |
passes. Fixes PR9112. Patch by Jakub Staszak!
llvm-svn: 125319
|
|
|
|
| |
llvm-svn: 124526
|
|
|
|
| |
llvm-svn: 124522
|
|
|
|
|
|
| |
unconditional predecessor to enable TCE on demand.
llvm-svn: 124518
|
|
|
|
| |
llvm-svn: 124478
|
|
|
|
|
|
|
|
| |
branches. PR8575, rdar://5134905, rdar://8911460.
- Allow codegen tail duplication to dup small return blocks after register
allocation is done.
llvm-svn: 124462
|
|
|
|
|
|
|
|
| |
a terminator depends on it.
When it sees a promising select it now tries to figure out whether the condition of the select is known in any of the predecessors and if so it maps the operands appropriately.
llvm-svn: 121859
|
|
|
|
|
|
| |
looking for ConstantInt*s or BlockAddress*s.
llvm-svn: 121066
|
|
|
|
|
|
|
|
|
|
| |
still having predecessor, if it is part of a self-loop.
Because of this, we cannot use the Simplify* APIs, as they can assert-fail on unreachable code. Since it's not easy to determine
if a given threading will cause a block to become unreachable, simply defer simplifying simplification to later InstCombine and/or
DCE passes.
llvm-svn: 115082
|
|
|
|
| |
llvm-svn: 113855
|
|
|
|
| |
llvm-svn: 112635
|
|
|
|
| |
llvm-svn: 112621
|
|
|
|
| |
llvm-svn: 112615
|
|
|
|
|
|
|
|
|
|
|
|
| |
I have not been able to find a way to test each in isolation, for a few reasons:
1) The ability to look-through non-i1 BinaryOperator's requires the ability to look through non-constant
ICmps in order for it to ever trigger.
2) The ability to do LVI-powered PHI value determination only matters in cases that ProcessBranchOnPHI
can't handle. Since it already handles all the cases without other instructions in the def-use chain
between the PHI and the branch, it requires the ability to look through ICmps and/or BinaryOperators
as well.
llvm-svn: 112611
|
|
|
|
|
|
|
|
|
| |
constant-fold undef, and be more careful with its return value.
This actually exposed an infinite recursion bug in ComputeValueKnownInPredecessors which theoretically already existed (in JumpThreading's
handling of and/or of i1's), but never manifested before. This patch adds a tracking set to prevent this case.
llvm-svn: 112589
|
|
|
|
|
|
|
|
| |
condition previously. Update tests for this change.
This fixes PR5652.
llvm-svn: 112270
|
|
|
|
|
|
| |
compiled with clang++.
llvm-svn: 112198
|
|
|
|
|
|
|
|
|
| |
you try to load it. Thus,
any load in the default address space that completes implies that the base value that it GEP'd from
was not null.
llvm-svn: 112015
|
|
|
|
|
|
|
|
|
| |
from the LHS should disable reconsidering that pred on the
RHS. However, knowing something about the pred on the RHS
shouldn't disable subsequent additions on the RHS from
happening.
llvm-svn: 111349
|
|
|
|
| |
llvm-svn: 109422
|
|
|
|
|
|
|
|
|
|
| |
mutated by recursive simplification. This also enhances
ReplaceAndSimplifyAllUses to actually do a real RAUW
at the end of it, which updates any value handles
pointing to "From" to start pointing to "To". This
seems useful for debug info and random other VH users.
llvm-svn: 108415
|
|
|
|
|
|
|
|
| |
the LHS and RHS of an and/or instruction, don't multiply add
known predecessor values. This fixes the crash on testcase
from PR7498
llvm-svn: 108114
|
|
|
|
|
|
| |
fixes PR7356.
llvm-svn: 105950
|
|
|
|
|
|
| |
in some cases.
llvm-svn: 100937
|
|
|
|
|
|
| |
called by jump threading.
llvm-svn: 96263
|
|
|
|
|
|
| |
instead of considering x|undef -> x, which may not be true.
llvm-svn: 95850
|
|
|
|
|
|
|
|
| |
for arbitrary terminators in predecessors, don't assume
it is a conditional or uncond branch. The testcase shows
an example where they can happen with switches.
llvm-svn: 94323
|
|
|
|
|
|
|
|
| |
handle the case when we can infer an input to the xor
from all inputs that agree, instead of going into an
infinite loop. Another part of PR6199
llvm-svn: 94321
|
|
|
|
| |
llvm-svn: 94319
|
|
|
|
|
|
|
|
|
|
|
|
| |
in JT.
2) When cloning blocks for PHI or xor conditions, use
instsimplify to simplify the code as we go. This allows us to
squish common cases early in JT which opens up opportunities for
subsequent iterations, and allows it to completely simplify the
testcase.
llvm-svn: 93253
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
condition is a xor with a phi node. This eliminates nonsense
like this from 176.gcc in several places:
LBB166_84:
testl %eax, %eax
- setne %al
- xorb %cl, %al
- notb %al
- testb $1, %al
- je LBB166_85
+ je LBB166_69
+ jmp LBB166_85
This is rdar://7391699
llvm-svn: 93221
|
|
|
|
| |
llvm-svn: 90708
|
|
|
|
|
|
| |
precisely, which prevents us from infinitely peeling the loop.
llvm-svn: 90211
|
|
|
|
| |
llvm-svn: 86980
|
|
|
|
|
|
|
| |
which implements GCC PR18046. This also gets us 360 more
jump threads on 176.gcc.
llvm-svn: 86953
|
|
|
|
| |
llvm-svn: 86929
|
|
|
|
| |
llvm-svn: 86927
|
|
|
|
|
|
| |
allows us to handle the test10 testcase.
llvm-svn: 86924
|
|
|
|
|
|
| |
the basic.ll testcase.
llvm-svn: 86918
|
|
|
|
|
|
| |
commit this, no harm, but add a todoo
llvm-svn: 86768
|
|
|
|
|
|
| |
vend value constraint information to the optimizer.
llvm-svn: 86767
|
|
|
|
| |
llvm-svn: 86739
|
|
|
|
|
|
|
|
| |
debug intrinsics, and an unconditional branch when possible. This
reuses the TryToSimplifyUncondBranchFromEmptyBlock function split
out of simplifycfg.
llvm-svn: 86722
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
just one level deep. On the testcase we go from getting this:
F1: ; preds = %T2
%F = and i1 true, %cond ; <i1> [#uses=1]
br i1 %F, label %X, label %Y
to a fully threaded:
F1: ; preds = %T2
br label %Y
This changes gets us to the point where we're forming (too many) switch
instructions on doug's strswitch testcase.
llvm-svn: 86646
|
|
|
|
|
|
|
|
|
| |
(making pred factoring only happen if threading is guaranteed
to be successful).
This now survives an X86-64 bootstrap of llvm-gcc.
llvm-svn: 86355
|
|
|
|
|
|
|
| |
86289, 86278, 86270, 86267, 86266 & 86264
Chris, please take a look.
llvm-svn: 86321
|