llvm-project/llvm/test/Transforms/CorrelatedValuePropagation
Sanjay Patel 3b6d46761f [CVP] simplify phi with constant incoming values that match common variable edge values
This is based on an example that was recently posted on llvm-dev:

void *propagate_null(void* b, int* g) {
  if (!b) {
    return 0;
  }
  (*g)++;
  return b;
}

https://godbolt.org/g/xYk3qG

The original code or constant propagation in other passes has obscured the fact 
that the phi can be removed completely.

Differential Revision: https://reviews.llvm.org/D45448

llvm-svn: 329755
2018-04-10 20:42:39 +00:00
..
2010-09-02-Trunc.ll
2010-09-26-MergeConstantRange.ll
add.ll [CVP] Process binary operations even when def is local 2017-10-12 22:39:52 +00:00
alloca.ll Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
ashr.ll [CVP] Process binary operations even when def is local 2017-10-12 22:39:52 +00:00
basic.ll
conflict.ll
crash.ll
guards.ll
icmp.ll
non-null.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
overflows.ll [CVP] Remove some {s|u}sub.with.overflow checks. 2017-12-05 18:14:24 +00:00
phi-common-val.ll [CVP] simplify phi with constant incoming values that match common variable edge values 2018-04-10 20:42:39 +00:00
pr35807.ll [CVP] Don't Replace incoming values from unreachable blocks with undef. 2018-01-29 05:59:55 +00:00
range.ll [LVI] Constant-propagate a zero extension of the switch condition value through case edges 2017-08-03 21:11:30 +00:00
sdiv.ll [CVP] Process binary operations even when def is local 2017-10-12 22:39:52 +00:00
select.ll
srem.ll [CVP] Process binary operations even when def is local 2017-10-12 22:39:52 +00:00
udiv.ll Re-re-land: Teach CorrelatedValuePropagation to reduce the width of udiv/urem instructions. 2018-03-21 14:08:21 +00:00
urem.ll Re-re-land: Teach CorrelatedValuePropagation to reduce the width of udiv/urem instructions. 2018-03-21 14:08:21 +00:00