aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/CorrelatedValuePropagation
Commit message (Collapse)AuthorAgeFilesLines
* CorrelatedPropagation: BasicBlock::removePredecessor can simplify PHI nodes. ↵Benjamin Kramer2012-09-281-0/+25
| | | | | | | | If the it's the condition of a SwitchInst, reload it. Fixes PR13972. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164818 91177308-0d34-0410-b5e6-96231b3b80d8
* make LazyValueInfo analyze the default case of switch statements (we know ↵Nuno Lopes2012-06-281-0/+23
| | | | | | that in the default branch the value cannot be any of the switch cases) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159353 91177308-0d34-0410-b5e6-96231b3b80d8
* make LVI::getEdgeValue() always intersect the constraints of the edge with ↵Nuno Lopes2012-06-281-0/+44
| | | | | | the range of the block. Previously it was only performing the intersection for a few cases, thus losing precision git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159320 91177308-0d34-0410-b5e6-96231b3b80d8
* allow LazyValueInfo::getEdgeValue() to reason about multiple edges from the ↵Nuno Lopes2012-05-181-0/+28
| | | | | | same switch instruction by doing union of ranges (which may still be conservative, but it's more aggressive than before) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157071 91177308-0d34-0410-b5e6-96231b3b80d8
* add test case for bugfix in r157032Nuno Lopes2012-05-181-0/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157058 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate switch cases that can never match, for example removes allDuncan Sands2012-03-091-1/+100
| | | | | | | | negative switch cases if the branch condition is known to be positive. Inspired by a recent improvement to GCC's VRP. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152405 91177308-0d34-0410-b5e6-96231b3b80d8
* LVI: Recognize the form instcombine canonicalizes range checks into when ↵Benjamin Kramer2012-03-021-0/+43
| | | | | | | | | | forming constant ranges. This could probably be made a lot smarter, but this is a common case and doesn't require LVI to scan a lot of code. With this change CVP can optimize away the "shift == 0" case in Hashing.h that only gets hit when "shift" is in a range not containing 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151919 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-162-3/+1
| | | | | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150664 91177308-0d34-0410-b5e6-96231b3b80d8
* Test for lazy value info's ability to prove the absense of NULLs in pointers.Nick Lewycky2011-01-161-0/+103
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123601 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR8790, another instance where unreachable code can cause instruction ↵Owen Anderson2010-12-151-0/+17
| | | | | | | | | simplification to fail, this case involve a select that simplifies to itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121817 91177308-0d34-0410-b5e6-96231b3b80d8
* Update testcase since we're no longer doing the constant forwarding inline ↵Owen Anderson2010-10-291-2/+1
| | | | | | with correlated value propagation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117712 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing RUN line to this test.Owen Anderson2010-09-161-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114106 91177308-0d34-0410-b5e6-96231b3b80d8
* It is possible, under specific circumstances involving ptrtoint ↵Owen Anderson2010-09-161-0/+84
| | | | | | | | | | | | | ConstantExpr's, for LVI to end up trying to merge a Constant into a ConstantRange. Handle this conservatively for now, rather than asserting. The testcase is more complex that I would like, but the manifestation of the problem is sensitive to iteration orders and the state of the LVI cache, and I have not been able to reproduce it with manually constructed or simplified cases. Fixes PR8162. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114103 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR8161, in which an unreachable loop causes recursive instruction ↵Owen Anderson2010-09-161-0/+20
| | | | | | | | | simplification to try to replace an instruction with itself. Add a predicate to the simplifier to prevent this case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114097 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate non-local comparisons. Fixes PR1757.Owen Anderson2010-09-031-0/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113025 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for simplifying a load from a computed value to a load from a ↵Owen Anderson2010-09-031-0/+18
| | | | | | | | | global when it is provable that they're equivalent. This fixes PR4855. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112994 91177308-0d34-0410-b5e6-96231b3b80d8
* Add PR number to test.Owen Anderson2010-09-031-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112971 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo. I accidentally edited the wrong file before my last commit.Owen Anderson2010-09-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112851 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in LazyValueInfo that CorrelatedValuePropagation exposed: In the ↵Owen Anderson2010-09-021-0/+25
| | | | | | | | | LVI lattice, undef and the full set ConstantRange should not be treated as equivalent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112843 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename test directory to reflect new pass name.Owen Anderson2010-08-312-0/+43
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112592 91177308-0d34-0410-b5e6-96231b3b80d8