summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/add4.ll
Commit message (Collapse)AuthorAgeFilesLines
* [NFC][InstCombine] Autogenerate a few testsRoman Lebedev2019-07-201-9/+24
| | | | llvm-svn: 366643
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-171-0/+94
| | | | | | | | The reversion apparently deleted the test/Transforms directory. Will be re-reverting again. llvm-svn: 358552
* Temporarily Revert "Add basic loop fusion pass."Eric Christopher2019-04-171-94/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [InstCombine] Simplify Add with remainder expressions as operands.Sanjoy Das2018-04-261-18/+34
| | | | | | | | | | | | | | | | | | | | | Summary: Simplify integer add expression X % C0 + (( X / C0 ) % C1) * C0 to X % (C0 * C1). This is a common pattern seen in code generated by the XLA GPU backend. Add test cases for this new optimization. Patch by Bixia Zheng! Reviewers: sanjoy Reviewed By: sanjoy Subscribers: efriedma, craig.topper, lebedev.ri, llvm-commits, jlebar Differential Revision: https://reviews.llvm.org/D45976 llvm-svn: 330992
* Add test cases to prepare for the optimization that simplifies Add withSanjoy Das2018-04-261-0/+78
| | | | | | | | | | | | | | | | | | | | remainder expressions as operands. Summary: Add test cases to prepare for the new optimization that Simplifies integer add expression X % C0 + (( X / C0 ) % C1) * C0 to X % (C0 * C1). Patch by Bixia Zheng! Reviewers: sanjoy Reviewed By: sanjoy Subscribers: jlebar, llvm-commits Differential Revision: https://reviews.llvm.org/D46017 llvm-svn: 330991
* Remove an InstCombine that transformed patterns like (x * uitofp i1 y) to ↵Owen Anderson2014-08-171-102/+0
| | | | | | | | | | | | | (select y, x, 0.0) when the multiply has fast math flags set. While this might seem like an obvious canonicalization, there is one subtle problem with it. The result of the original expression is undef when x is NaN (remember, fast math flags), but the result of the select is always defined when x is NaN. This means that the new expression is strictly more defined than the original one. One unfortunate consequence of this is that the transform is not reversible! It's always legal to make increase the defined-ness of an expression, but it's not legal to reduce it. Thus, targets that prefer the original form of the expression cannot reverse the transform to recover it. Another way to think of it is that the transform has lost source-level information (the fast math flags), which is undesirable. llvm-svn: 215825
* InstCombine: Refactor fmul/fdiv combines to handle vectors.Benjamin Kramer2014-01-191-0/+23
| | | | llvm-svn: 199598
* Restore r181216, which was partially reverted in r182499.Stephen Lin2013-07-171-9/+44
| | | | llvm-svn: 186533
* Update Transforms tests to use CHECK-LABEL for easier debugging. No ↵Stephen Lin2013-07-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | functionality change. This update was done with the following bash script: find test/Transforms -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3@$FUNC(/g" $TEMP done mv $TEMP $NAME fi done llvm-svn: 186268
* This is an update to a previous commit (r181216).Jean-Luc Duprat2013-05-221-27/+13
| | | | | | | | | | | | | | | | | | | | | | | The earlier change list introduced the following inst combines: B * (uitofp i1 C) —> select C, B, 0 A * (1 - uitofp i1 C) —> select C, 0, A select C, 0, B + select C, A, 0 —> select C, A, B Together these 3 changes would simplify : A * (1 - uitofp i1 C) + B * uitofp i1 C down to : select C, B, A In practice we found that the first two substitutions can have a negative effect on performance, because they reduce opportunities to use FMA contractions; between the two options FMAs are often the better choice. This change list amends the previous one to enable just these inst combines: select C, B, 0 + select C, 0, A —> select C, B, A A * (1 - uitofp i1 C) + B * uitofp i1 C —> select C, B, A llvm-svn: 182499
* InstCombine: Verify the type before transforming uitofp into select.Benjamin Kramer2013-05-101-0/+18
| | | | | | PR15952. llvm-svn: 181586
* Test results verified using FileCheck rather than grep | countJean-Luc Duprat2013-05-061-1/+7
| | | | llvm-svn: 181234
* Fix add4.ll test cmdline so that it passesJean-Luc Duprat2013-05-061-1/+1
| | | | llvm-svn: 181219
* Provide InstCombines for the following 3 cases:Jean-Luc Duprat2013-05-061-0/+34
A * (1 - (uitofp i1 C)) -> select C, 0, A B * (uitofp i1 C) -> select C, B, 0 select C, 0, A + select C, B, 0 -> select C, B, A These come up in code that has been hand-optimized from a select to a linear blend, on platforms where that may have mattered. We want to undo such changes with the following transform: A*(1 - uitofp i1 C) + B*(uitofp i1 C) -> select C, A, B llvm-svn: 181216
OpenPOWER on IntegriCloud