summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll
Commit message (Collapse)AuthorAgeFilesLines
* [InstSimplify] Teach fsub -0.0, (fneg X) ==> X about unary fnegCameron McInally2019-05-201-9/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D62077 llvm-svn: 361151
* [NFC][InstSimplify] Add more unary fneg tests to floating-point-arithmetic.llCameron McInally2019-05-171-0/+29
| | | | llvm-svn: 361076
* [NFC][InstSimplify] Precommit new unary fneg testCameron McInally2019-05-171-0/+34
| | | | llvm-svn: 361060
* [NFC][InstSImplify] Fix flip-flopped comments and test namesCameron McInally2019-05-171-6/+6
| | | | | | | | In test/Transforms/InstSimplify/floating-point-arithmetic.ll Differential Revision: https://reviews.llvm.org/D62069 llvm-svn: 361057
* Add FNeg support to InstructionSimplifyCameron McInally2019-05-061-0/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D61573 llvm-svn: 360053
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-171-0/+1269
| | | | | | | | 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-1269/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [InstCombine] InstCombine and InstSimplify for minimum and maximumThomas Lively2018-10-191-1/+316
| | | | | | | | | | | | Summary: Depends on D52765 Reviewers: aheejin, dschuff Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52766 llvm-svn: 344799
* [InstSimplify] move minnum/maxnum with Inf folds from instcombineSanjay Patel2018-08-091-0/+57
| | | | llvm-svn: 339396
* [InstSimplify] fold fsub+fadd with common operandSanjay Patel2018-08-071-6/+2
| | | | llvm-svn: 339176
* [InstSimplify] fold fadd+fsub with common operandSanjay Patel2018-08-071-6/+2
| | | | llvm-svn: 339174
* [InstSimplify] fold fsub+fsub with common operandSanjay Patel2018-08-071-6/+2
| | | | llvm-svn: 339171
* [InstSimplify] add tests for fadd/fsub; NFCSanjay Patel2018-08-071-0/+174
| | | | | | | | Instcombine gets some, but not all, of these cases via it's internal reassociation transforms. It fails in all cases with vector types. llvm-svn: 339168
* [InstSimplify] move minnum/maxnum with common op fold from instcombineSanjay Patel2018-08-071-16/+60
| | | | llvm-svn: 339144
* [InstSimplify] add tests for minnum/maxnum with shared op; NFCSanjay Patel2018-08-071-0/+88
| | | | llvm-svn: 339142
* [InstSimplify] move misplaced minnum/maxnum tests; NFCSanjay Patel2018-08-071-0/+16
| | | | llvm-svn: 339141
* [InstSimplify] move minnum/maxnum with undef fold from instcombineSanjay Patel2018-08-021-0/+32
| | | | llvm-svn: 338719
* [InstSimplify] move minnum/maxnum with same arg fold from instcombineSanjay Patel2018-08-011-2/+19
| | | | llvm-svn: 338652
* [InstSimplify] fold minnum/maxnum with NaN argSanjay Patel2018-07-151-16/+8
| | | | | | | | | | | | | | | This fold is repeated/misplaced in instcombine, but I'm not sure if it's safe to remove that yet because some other folds appear to be asserting that the transform has occurred within instcombine itself. This isn't the best fix for PR37776, but it probably hides the bug with the given code example: https://bugs.llvm.org/show_bug.cgi?id=37776 We have another test to demonstrate the more general bug. llvm-svn: 337127
* [InstSimplify] add tests for minnum/maxnum; NFCSanjay Patel2018-07-151-0/+82
| | | | | | | | | | | This isn't the best fix for PR37776, but it probably hides the bug with the given code example: https://bugs.llvm.org/show_bug.cgi?id=37776 We have another test to demonstrate the more general bug. llvm-svn: 337126
* [PatternMatch] allow undef elements when matching vector FP +0.0Sanjay Patel2018-03-251-2/+1
| | | | | | | | | | | | | This continues the FP constant pattern matching improvements from: https://reviews.llvm.org/rL327627 https://reviews.llvm.org/rL327339 https://reviews.llvm.org/rL327307 Several integer constant matchers also have this ability. I'm separating matching of integer/pointer null from FP positive zero and renaming/commenting to make the functionality clearer. llvm-svn: 328461
* [InstSimplify, InstCombine] add/update tests with FP +0.0 vector with undef; NFCSanjay Patel2018-03-251-4/+13
| | | | llvm-svn: 328455
* [PatternMatch, InstSimplify] allow undef elements when matching vector -0.0Sanjay Patel2018-03-121-7/+3
| | | | | | | | | This is the FP equivalent of D42818. Use it for the few cases in InstSimplify with -0.0 folds (that's the only current use of m_NegZero()). Differential Revision: https://reviews.llvm.org/D43792 llvm-svn: 327307
* [InstSimplify] add test for m_NegZero with undef elt; NFCSanjay Patel2018-03-121-0/+9
| | | | llvm-svn: 327287
* [ValueTracking] Teach cannotBeOrderedLessThanZeroImpl to look through ↵Craig Topper2018-02-271-0/+14
| | | | | | | | | | ExtractElement. This is similar to what's done in computeKnownBits and computeSignBits. Don't do anything fancy just collect information valid for any element. Differential Revision: https://reviews.llvm.org/D43789 llvm-svn: 326237
* [InstCombine, InstSimplify] add tests with undef elements in constant FP ↵Sanjay Patel2018-02-261-0/+29
| | | | | | vectors; NFC llvm-svn: 326148
* [ValueTracking] Teach cannotBeOrderedLessThanZeroImpl to handle vector ↵Craig Topper2018-02-261-4/+2
| | | | | | | | | | | | | | | | constants. Summary: This allows vector fabs to be removed in more cases. Reviewers: spatel, arsenm, RKSimon Reviewed By: spatel Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43739 llvm-svn: 326138
* [InstSimplify] Add test cases for removal of vector fabs on known positive.Craig Topper2018-02-251-0/+118
| | | | llvm-svn: 326050
* [InstSimplify] Remove unused parameter from test cases.Craig Topper2018-02-251-7/+7
| | | | llvm-svn: 326049
* [InstCombine, InstSimplify] (re)move tests, regenerate checks; NFCSanjay Patel2018-02-131-58/+99
| | | | | | | | The InstCombine integer mul test file had tests that belong in InstSimplify (including fmul tests). Move things to where they belong and auto-generate complete checks for everything. llvm-svn: 325037
* [ValueTracking] Implement SignBitMustBeZero correctly for sqrt.Justin Lebar2017-01-261-0/+54
| | | | | | | | | | | | | | Summary: Previously we assumed that the result of sqrt(x) always had 0 as its sign bit. But sqrt(-0) == -0. Reviewers: hfinkel, efriedma, sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28928 llvm-svn: 293115
* InstSimplify: Eliminate fabs on known positiveMatt Arsenault2017-01-111-0/+92
| | | | llvm-svn: 291624
* [InstSimplify] Add "X / 1.0" to SimplifyFDivInst.Zia Ansari2016-12-081-3/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D27587 llvm-svn: 289153
* [InstSimplify] add fdiv x/1.0 test and update checks; NFCSanjay Patel2016-12-081-8/+25
| | | | llvm-svn: 289098
* [InstSimplify] regenerate checks using a scriptSanjay Patel2016-03-251-22/+31
| | | | | | | | | | | | | | I didn't notice any significant changes in the actual checks here; all of these tests already used FileCheck, so a script can batch update them in one shot. This commit is just to show the value of automating this process: We have uniform formatting as opposed to a mish-mash of check structure that changes based on individual prefs and the current fashion. This makes it simpler to update when we find a bug or make an enhancement. llvm-svn: 264457
* [InstSimplify] fsub 0.0, (fsub -0.0, X) ==> X is only safe if signed zeros ↵Benjamin Kramer2016-02-291-3/+23
| | | | | | | | are ignored. Only allow fsub -0.0, (fsub -0.0, X) ==> X without nsz. PR26746. llvm-svn: 262212
* Fix really obscure bug in CannotBeNegativeZero() (PR22688)Sanjay Patel2015-02-251-0/+26
| | | | | | | | | | With a diabolically crafted test case, we could recurse through this code and return true instead of false. The larger engineering crime is the use of magic numbers. Added FIXME comments for those. llvm-svn: 230515
* Update Transforms tests to use CHECK-LABEL for easier debugging. No ↵Stephen Lin2013-07-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | 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
* Add missing colons to check lines.Benjamin Kramer2013-04-111-2/+2
| | | | llvm-svn: 179277
* Added a slew of SimplifyInstruction floating-point optimizations, many of ↵Michael Ilseman2012-12-121-0/+35
which take advantage of fast-math flags. Test cases included. fsub X, +0 ==> X fsub X, -0 ==> X, when we know X is not -0 fsub +/-0.0, (fsub -0.0, X) ==> X fsub nsz +/-0.0, (fsub +/-0.0, X) ==> X fsub nnan ninf X, X ==> 0.0 fadd nsz X, 0 ==> X fadd [nnan ninf] X, (fsub [nnan ninf] 0, X) ==> 0 where nnan and ninf have to occur at least once somewhere in this expression fmul X, 1.0 ==> X llvm-svn: 169940
OpenPOWER on IntegriCloud