summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/Float2Int
Commit message (Collapse)AuthorAgeFilesLines
* [Float2Int] avoid crashing on unreachable code (PR38502)Sanjay Patel2019-09-191-0/+22
| | | | | | | | | | | | | In the example from: https://bugs.llvm.org/show_bug.cgi?id=38502 ...we hit infinite looping/crashing because we have non-standard IR - an instruction operand is used before defined. This and other unusual constructs are allowed in unreachable blocks, so avoid the problem by using DominatorTree to step around landmines. Differential Revision: https://reviews.llvm.org/D67766 llvm-svn: 372339
* [Float2Int] auto-generate complete test checks; NFCSanjay Patel2019-09-191-177/+213
| | | | llvm-svn: 372324
* [Float2Int] Add support for unary FNeg to Float2IntCameron McInally2019-07-081-6/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D63941 llvm-svn: 365324
* [NFC][Float2Int] Pre-commit unary FNeg test to basic.llCameron McInally2019-06-281-0/+16
| | | | llvm-svn: 364649
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-173-0/+300
| | | | | | | | 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-173-300/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [PM] Port float2int to the new pass managerMichael Kuperstein2016-06-241-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D21704 llvm-svn: 273747
* [Float2Int] Don't operate on vector instructionsReid Kleckner2015-12-091-0/+10
| | | | | | | This fixes a crash bug. It's also not clear if we'd want to do this transform for vectors. llvm-svn: 255155
* Reapply r233175 and r233183: float2int.James Molloy2015-03-273-0/+289
| | | | | | | | This re-adds float2int to the tree, after fixing PR23038. It turns out the argument to APSInt() is true-if-unsigned, rather than true-if-signed :(. Added testcase and explanatory comment. llvm-svn: 233370
* Revert r233175 and r233183 with it. This pulls float2int back out of the ↵Nick Lewycky2015-03-273-275/+0
| | | | | | tree, due to PR23038. llvm-svn: 233350
* [optnone] Skip pass Float2Int on optnone functions.Andrea Di Biagio2015-03-251-0/+17
| | | | | | | Added test Float2Int/float2int-optnone.ll to verify that pass Float2Int is not run on optnone functions. llvm-svn: 233183
* Reapply r233062: "float2int": Add a new pass to demote from float to int ↵James Molloy2015-03-252-0/+258
| | | | | | | | where possible. Now with a fix for PR23008 and extra regression test. llvm-svn: 233175
* Revert r233062 ""float2int": Add a new pass to demote from float to int ↵Hans Wennborg2015-03-242-243/+0
| | | | | | | | | | | where possible." This caused PR23008, compiles failing with: "Use still stuck around after Def is destroyed: %.sroa.speculated" Also reverting follow-up r233064. llvm-svn: 233105
* "float2int": Add a new pass to demote from float to int where possible.James Molloy2015-03-242-0/+243
It is possible to have code that converts from integer to float, performs operations then converts back, and the result is provably the same as if integers were used. This can come from different sources, but the most obvious is a helper function that uses floats but the arguments given at an inlined callsites are integers. This pass considers all integers requiring a bitwidth less than or equal to the bitwidth of the mantissa of a floating point type (23 for floats, 52 for doubles) as exactly representable in floating point. To reduce the risk of harming efficient code, the pass only attempts to perform complete removal of inttofp/fptoint operations, not just move them around. llvm-svn: 233062
OpenPOWER on IntegriCloud