summaryrefslogtreecommitdiff
path: root/llvm/test/Transforms/Float2Int/basic.ll
AgeCommit message (Collapse)Author
2024-03-25Reapply: [Float2Int] Resolve FIXME: Pick the smallest legal type that fits ↵AtariDreams
(#86337) Originally reverted because of a bug in Range that is now fixed (#86041), we can reland this commit. Tests have been added to ensure the miscompile that caused the revert does not happen again.
2024-03-19Revert "[Float2Int] Resolve FIXME: Pick the smallest legal type that fits" ↵alexfh
(#85843) Reverts llvm/llvm-project#79158, which causes a miscompile. See https://github.com/llvm/llvm-project/pull/79158#issuecomment-2007842032
2024-03-13[Float2Int] Resolve FIXME: Pick the smallest legal type that fits (#79158)AtariDreams
Pick the type based on the smallest bit-width possible, using DataLayout.
2021-10-20[NewPM][test] Strickly use -passes in some more lit testsBjorn Pettersson
Removed/replaced RUN lines using legacy PM syntax in favor of using -passes in lit tests for Float2Int, MetaRenamer, StripDeadPrototypes and StripSymbols.
2019-09-19[Float2Int] avoid crashing on unreachable code (PR38502)Sanjay Patel
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
2019-09-19[Float2Int] auto-generate complete test checks; NFCSanjay Patel
llvm-svn: 372324
2019-07-08[Float2Int] Add support for unary FNeg to Float2IntCameron McInally
Differential Revision: https://reviews.llvm.org/D63941 llvm-svn: 365324
2019-06-28[NFC][Float2Int] Pre-commit unary FNeg test to basic.llCameron McInally
llvm-svn: 364649
2019-04-17Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher
The reversion apparently deleted the test/Transforms directory. Will be re-reverting again. llvm-svn: 358552
2019-04-17Temporarily Revert "Add basic loop fusion pass."Eric Christopher
As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
2016-06-24[PM] Port float2int to the new pass managerMichael Kuperstein
Differential Revision: http://reviews.llvm.org/D21704 llvm-svn: 273747
2015-12-09[Float2Int] Don't operate on vector instructionsReid Kleckner
This fixes a crash bug. It's also not clear if we'd want to do this transform for vectors. llvm-svn: 255155
2015-03-27Reapply r233175 and r233183: float2int.James Molloy
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
2015-03-27Revert r233175 and r233183 with it. This pulls float2int back out of the ↵Nick Lewycky
tree, due to PR23038. llvm-svn: 233350
2015-03-25Reapply r233062: "float2int": Add a new pass to demote from float to int ↵James Molloy
where possible. Now with a fix for PR23008 and extra regression test. llvm-svn: 233175
2015-03-24Revert r233062 ""float2int": Add a new pass to demote from float to int ↵Hans Wennborg
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
2015-03-24"float2int": Add a new pass to demote from float to int where possible.James Molloy
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