llvm/test/Transforms/JumpThreading
Hal Finkel 3ef1aae2b5 Make use of @llvm.assume from LazyValueInfo
This change teaches LazyValueInfo to use the @llvm.assume intrinsic. Like with
the known-bits change (r217342), this requires feeding a "context" instruction
pointer through many functions. Aside from a little refactoring to reuse the
logic that turns predicates into constant ranges in LVI, the only new code is
that which can 'merge' the range from an assumption into that otherwise
computed. There is also a small addition to JumpThreading so that it can have
LVI use assumptions in the same block as the comparison feeding a conditional
branch.

With this patch, we can now simplify this as expected:
int foo(int a) {
  __builtin_assume(a > 5);
  if (a > 3) {
    bar();
    return 1;
  }
  return 0;
}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217345 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-07 20:29:59 +00:00
..
2008-11-27-EntryMunge.ll Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
2010-08-26-and.ll
2011-04-02-SimplifyDeadBlock.ll PR9446: RecursivelyDeleteTriviallyDeadInstructions can delete the instruction 2011-04-02 22:45:17 +00:00
2011-04-14-InfLoop.ll TBAA: remove !tbaa from testing cases if not used. 2013-04-30 17:52:57 +00:00
2012-07-19-NoSuccessorIndirectBr.ll Fix assertion in jump threading (PR13405). 2012-07-20 10:36:17 +00:00
and-and-cond.ll Re-apply r124518 with fix. Watch out for invalidated iterator. 2011-01-29 04:46:23 +00:00
and-cond.ll Re-apply r124518 with fix. Watch out for invalidated iterator. 2011-01-29 04:46:23 +00:00
assume.ll Make use of @llvm.assume from LazyValueInfo 2014-09-07 20:29:59 +00:00
basic.ll Update Transforms tests to use CHECK-LABEL for easier debugging. No functionality change. 2013-07-14 01:42:54 +00:00
branch-no-const.ll
compare.ll Fix the remaining TCL-style quotes found in the testsuite. This is 2012-07-02 19:09:46 +00:00
crash.ll Add a test case for PR14233. 2012-11-01 10:26:36 +00:00
degenerate-phi.ll Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 02:33:22 +00:00
indirectbr.ll Update Transforms tests to use CHECK-LABEL for easier debugging. No functionality change. 2013-07-14 01:42:54 +00:00
jump_threading.ll In LVI(Lazy Value Info), originally value on a BB can only be caculated once, 2014-08-11 05:02:04 +00:00
landing-pad.ll Don't eliminate a partially redundant load if it's in a landing pad. 2013-10-21 04:09:17 +00:00
lvi-load.ll
no-irreducible-loops.ll Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
or-undef.ll Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID 2012-12-30 01:28:40 +00:00
phi-eq.ll No need for those tests to go thru llvm-as and/or llvm-dis. 2014-05-27 22:03:28 +00:00
pr9331.ll Fix PR9331. Simplified version of a patch by Jakub Staszak. 2011-03-08 12:39:03 +00:00
pr15851_hang.ll Fixed jump threading going to infinite loop. 2014-06-17 14:34:19 +00:00
select.ll Fixed jump threading going to infinite loop. 2014-06-17 14:34:19 +00:00
thread-loads.ll TBAA: handle scalar TBAA format and struct-path aware TBAA format. 2013-09-27 18:34:27 +00:00