summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/ScalarEvolution/fold.ll
Commit message (Collapse)AuthorAgeFilesLines
* Fix incorrect CHECK-LABELTim Shen2018-06-111-1/+1
| | | | llvm-svn: 334434
* [SCEV] Canonicalize "A /u C1 /u C2" to "A /u (C1*C2)".Tim Shen2018-06-111-0/+28
| | | | | | | | | | | | Summary: FWIW InstCombine already folds this. Also avoid the case where C1*C2 overflows. Reviewers: sunfish, sanjoy Subscribers: hiraditya, bixia, llvm-commits Differential Revision: https://reviews.llvm.org/D47965 llvm-svn: 334425
* When simplifying a SCEV truncate by distributing, consider it a ↵Nick Lewycky2015-03-201-0/+12
| | | | | | simplification to replace a cast, even if we end up with a trunc around the term. Fixes PR22960! llvm-svn: 232794
* [SCEV] Add a `scalar-evolution-print-constant-ranges' optionSanjoy Das2015-03-091-1/+1
| | | | | | | | | | | | | | Summary: Unused in this commit, but will be used in a subsequent change (D8142) by a FileCheck test. Reviewers: atrick Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8143 llvm-svn: 231708
* Fix crasher introduced in r200203 and caught by a libc++ buildbot. Don't ↵Nick Lewycky2014-01-271-0/+9
| | | | | | assume that getMulExpr returns a SCEVMulExpr, it may have simplified it to something else! llvm-svn: 200210
* Teach SCEV to handle more cases of 'and X, CST', specifically where CST is ↵Nick Lewycky2014-01-271-0/+17
| | | | | | | | | | any number of contiguous 1 bits in a row, with any number of leading and trailing 0 bits. Unfortunately, this in turn led to some lower quality SCEVs due to some different paths through expression simplification, so add getUDivExactExpr and use it. This fixes all instances of the problems that I found, but we can make that function smarter as necessary. Merge test "xor-and.ll" into "and-xor.ll" since I needed to update it anyways. Test 'nsw-offset.ll' analyzes a little deeper, %n now gets a scev in terms of %no instead of a SCEVUnknown. llvm-svn: 200203
* Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ↵Dmitri Gribenko2012-12-301-1/+1
| | | | | | | | ModuleID This is done to avoid odd test failures, like the one fixed in r171243. llvm-svn: 171246
* Simplify some code with no functionality change. Make the test a lot moreNick Lewycky2011-01-231-15/+19
| | | | | | robust against smarter optimizations, using the power of FileCheck. llvm-svn: 124081
* Use value ranges to fold ext(trunc) in SCEV when possible.Nick Lewycky2011-01-231-0/+34
| | | | llvm-svn: 124062
* Similarly, analyze truncate through multiply.Nick Lewycky2011-01-191-0/+8
| | | | llvm-svn: 123842
* Add a missed SCEV fold that is required to continue analyzing the IR producedNick Lewycky2011-01-191-1/+9
| | | | | | | | | | | by indvars through the scev expander. trunc(add x, y) --> add(trunc x, y). Currently SCEV largely folds the other way which is probably wrong, but preserved to minimize churn. Instcombine doesn't do this fold either, demonstrating a missed optz'n opportunity on code doing add+trunc+add. llvm-svn: 123838
* Add a missing SCEV simplification sext(zext x) --> zext x.Nick Lewycky2011-01-191-0/+8
llvm-svn: 123832
OpenPOWER on IntegriCloud