1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
llvm-mirror/test/Transforms/JumpThreading
Philip Reames 8c47d7364a [LazyValueInfo] Look through Phi nodes when trying to prove a predicate
If asked to prove a predicate about a value produced by a PHI node, LazyValueInfo was unable to do so even if the predicate was known to be true for each input to the PHI. This prevented JumpThreading from eliminating a provably redundant branch.

The problematic test case looks something like this:
ListNode *p = ...;
while (p != null) {
  if (!p) return;
  x = g->x; // unrelated
  p = p->next
}

The null check at the top of the loop is redundant since the value of 'p' is null checked on entry to the loop and before executing the backedge. This resulted in us a) executing an extra null check per iteration and b) not being able to LICM unrelated loads after the check since we couldn't prove they would execute or that their dereferenceability wasn't effected by the null check on the first iteration.

Differential Revision: http://reviews.llvm.org/D12383

llvm-svn: 246465
2015-08-31 18:31:48 +00:00
..
2008-11-27-EntryMunge.ll
2010-08-26-and.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2011-04-02-SimplifyDeadBlock.ll
2011-04-14-InfLoop.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2012-07-19-NoSuccessorIndirectBr.ll
and-and-cond.ll
and-cond.ll
assume-edge-dom.ll [LVI] Check for @llvm.assume dominating the edge branch 2014-10-14 16:04:49 +00:00
assume.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
basic.ll [JumpThreading] make jump threading respect convergent annotation. 2015-08-31 06:10:27 +00:00
branch-no-const.ll
compare.ll
conservative-lvi.ll LazyValueInfo: Actually re-visit partially solved block-values in solveBlockValue() 2014-11-25 17:23:05 +00:00
crash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
degenerate-phi.ll
indirectbr.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
landing-pad.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
lvi-load.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
no-irreducible-loops.ll
or-undef.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
phi-eq.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
phi-known.ll [LazyValueInfo] Look through Phi nodes when trying to prove a predicate 2015-08-31 18:31:48 +00:00
pr9331.ll
pr15851_hang.ll
pr22086.ll ValueTracking: ComputeNumSignBits should tolerate misshapen phi nodes 2015-01-04 07:06:53 +00:00
select.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thread-cmp.ll [JumpThreading] Simplify comparisons when simplifying branches 2015-05-07 00:19:14 +00:00
thread-loads.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00