summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/fma.ll
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] Precommit tests for D68265Florian Hahn2019-10-021-2/+204
| | | | llvm-svn: 373458
* [InstSimplify] Match 1.0 and 0.0 for both operands in SimplifyFMAMulFlorian Hahn2019-09-251-3/+2
| | | | | | | | | | | | | | | | | | Because we do not constant fold multiplications in SimplifyFMAMul, we match 1.0 and 0.0 for both operands, as multiplying by them is guaranteed to produce an exact result (if it is allowed to do so). Note that it is not enough to just swap the operands to ensure a constant is on the RHS, as we want to also cover the case with 2 constants. Reviewers: lebedev.ri, spatel, reames, scanon Reviewed By: lebedev.ri, reames Differential Revision: https://reviews.llvm.org/D67553 llvm-svn: 372915
* [InstCombine] Limit FMul constant folding for fma simplifications.Florian Hahn2019-09-251-10/+70
| | | | | | | | | | | | | | | | | As @reames pointed out post-commit, rL371518 adds additional rounding in some cases, when doing constant folding of the multiplication. This breaks a guarantee llvm.fma makes and must be avoided. This patch reapplies rL371518, but splits off the simplifications not requiring rounding from SimplifFMulInst as SimplifyFMAFMul. Reviewers: spatel, lebedev.ri, reames, scanon Reviewed By: reames Differential Revision: https://reviews.llvm.org/D67434 llvm-svn: 372899
* Revert [InstCombine] Use SimplifyFMulInst to simplify multiply in fma.Florian Hahn2019-09-111-5/+10
| | | | | | | | This introduces additional rounding error in some cases. See D67434. This reverts r371518 (git commit 18a1f0818b659cee13865b4fad2648d85984a4ed) llvm-svn: 371634
* [InstCombine] Use SimplifyFMulInst to simplify multiply in fma.Florian Hahn2019-09-101-10/+5
| | | | | | | | | | | | | | This allows us to fold fma's that multiply with 0.0. Also, the multiply by 1.0 case is handled there as well. The fneg/fabs cases are not handled by SimplifyFMulInst, so we need to keep them. Reviewers: spatel, anemet, lebedev.ri Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D67351 llvm-svn: 371518
* [InstCombine] Precommit tests for D67351.Florian Hahn2019-09-101-0/+86
| | | | llvm-svn: 371517
* [NFC][InstCombine] Add unary FNeg tests to fma.llCameron McInally2019-05-311-0/+96
| | | | llvm-svn: 362227
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-171-0/+277
| | | | | | | | 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-277/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [PatternMatch] define m_FNeg using m_FSubSanjay Patel2018-04-051-3/+1
| | | | | | | | | Using cstfp_pred_ty in the definition allows us to match vectors with undef elements. This replicates the change for m_Not from D44076 / rL326823 and continues towards making all pattern matchers allow undef elements in vectors. llvm-svn: 329303
* [InstCombine] add vector and vector undef tests for FP folds; NFCSanjay Patel2018-04-051-0/+24
| | | | llvm-svn: 329294
* [InstCombine] Regenerate FMUL/FMA combine tests with update_test_checks.pySimon Pilgrim2017-12-161-55/+104
| | | | llvm-svn: 320922
* InstCombine: Canonicalize fast fmuladd to fmul + faddMatt Arsenault2017-02-161-3/+6
| | | | llvm-svn: 295353
* InstCombine: Add fma with constant transformsMatt Arsenault2017-01-031-2/+73
| | | | | | DAGCombine already does these. llvm-svn: 290860
* InstCombine: Add fma + fabs/fneg transformsMatt Arsenault2017-01-031-0/+132
fma (fneg x), (fneg y), z -> fma x, y, z fma (fabs x), (fabs x), z -> fma x, x, z llvm-svn: 290859
OpenPOWER on IntegriCloud