similar to: [LLVMdev] Proposal for adding rounding variant of fpto?i instructions

Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] Proposal for adding rounding variant of fpto?i instructions"

2010 Jul 12
1
[LLVMdev] Proposal for adding rounding variant of fpto?i instructions
Hi Peter, > I would appreciate comments/feedback on this proposal to extend the > fpto?i instructions to support rounding. I think this might be useful. Actually, LLVM specifies that fpto?i convert their operand into the nearest (rounding towards zero) signed integer value. Do you have other rounding modes in mind? Currently I use custom metadata to represent conversions with other rounding
2010 Jun 28
0
[LLVMdev] Proposal for adding rounding variant of fpto?i instructions
Hi, I would appreciate comments/feedback on this proposal to extend the fpto?i instructions to support rounding. This is my first proposed significant extension to LLVM so I'd like to know if I'm completely off base here. First of all, I noticed the convert* intrinsics corresponding to the CONVERT_RNDSAT InstructionDAG. I propose not to build my work on top of these as they seem to be
2018 Jan 12
0
[cfe-dev] Why is #pragma STDC FENV_ACCESS not supported?
I'll give some data points from our OpenVMS Itanium (and Alpha) platforms where we support multiple IEEE modes and dynamic rounding in our C and Fortran compilers (we don't have actual FENV_ACCESS in our C product but you can come close). On the command line, you get to pick IEEE modes with:   /IEEE_MODE         /IEEE_MODE=option         /IEEE_MODE=DENORM_RESULTS (D)      Selects the
2011 Sep 08
0
[LLVMdev] [cfe-dev] Proposal: floating point accuracy metadata (OpenCL related)
Peter, Is there a way to make this flag globally available? Metadata can be fairly expensive to handle at each node when in many cases it is a global flag and not a per operation flag. > -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Robert Quill > Sent: Thursday, September 08, 2011 3:24 AM > To: Peter
2020 Mar 03
2
Should rint and nearbyint be always constrained?
> > The only issue I see is that since we also assume FP operations have no > side effects by default there is no difference between llvm.rint and > llvm.nearbyint. I wouldn’t have a problem with dropping llvm.rint > completely. The forthcoming C standard ( http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2454.pdf, 7.12.9.8) defines new function, `roundeven`, which implements
2020 Mar 02
2
Should rint and nearbyint be always constrained?
Some clarification after getting feedback from Craig Topper…. It’s probably best to say in the documentation that the llvm.nearbyint and llvm.rint functions “assume the default rounding mode, roundToNearest”. This will allow the optimizer to transform them as if they were rounding to nearest without requiring backends to use an encoding that enforces roundToNearest as the rounding mode for these
2020 Mar 03
5
Should rint and nearbyint be always constrained?
> > One concern with replacing llvm.rint and llvm.nearbyint with > llvm.roundeven makes it difficult to turn back into a libcall if the > backend doesn't have an instruction for it. You can't just call the > roundeven library function since that wouldn't exist in older libm > implementations. So ideally you would know which function was originally > used in the
2011 Sep 07
3
[LLVMdev] Proposal: floating point accuracy metadata (OpenCL related)
Hi, This is my proposal to add floating point accuracy support to LLVM. The intention is that the frontend may provide metadata to signal to the backend that it may select a less accurate (i.e. more efficient) instruction to perform a given operation. This is primarily a requirement of OpenCL, which specifies that certain floating point operations may be computed inaccurately. Comments
2008 Mar 11
1
[LLVMdev] Rounding Mode for fptrunc Instruction
Hi, What is the rounding mode for the fptrunc instruction? Round to zero? Round to nearest? Or undefined? Regards, Jon
2012 Jul 19
1
Truncating (rounding down) to nearest half hour.
I couldn't find anything in the chron or timeDate packages, and a good search yielded rounding to the nearest half hour, which I don't want. The data: structure(list(Date = structure(c(1209625080, 1209641460, 1209652500, 1209676800, 1209682860, 1209692100, 1209706980, 1209722580, 1209726300, 1209739620, 1209762780, 1209765720, 1209770520, 1209791040, 1209812580, 1209829920,
2009 Mar 15
1
Conversion and rounding of POSIXct
POSIXct/lt supports fractional seconds (see Sub-second Accuracy section of man page), but there seem to be some inconsistencies in their handling. Converting to POSIXlt and back does not give back the same time for times before the origin: > t0 <- as.POSIXct('1934-01-05 23:59:59.00001') > t0 [1] "1934-01-06 00:00:00 EST" # rounding issue, see below >
2011 Sep 08
1
[LLVMdev] [cfe-dev] Proposal: floating point accuracy metadata (OpenCL related)
Hi Peter, This sounds like I really good idea. One thing that did occur to me though from an OpenCL point of view is that ULP accuracy requirements can differ for embedded and full profile so that may need to be handled somehow. Thanks, Rob On Wed, 2011-09-07 at 21:55 +0100, Peter Collingbourne wrote: > Hi, > > This is my proposal to add floating point accuracy support to LLVM. >
2020 Sep 04
2
Misleading documentation on FP to integer conversion instructions?
The LLVM IR reference manual states, for fptosi: "The ‘fptosi’ instruction converts its floating-point <http://llvm.org/docs/LangRef.html#t-floating> operand into the nearest (rounding towards zero) signed integer value." I interpreted this to mean that it rounds: The nearest integer to 0.3 is 0. The nearest integer to 0.9 is 1. The nearest integer to 0.5 is either 0 or 1. And
2009 Aug 17
4
Rounding to the nearest 5
Dear all, A hopefully simple question: how do I round a series of values (held in an object) to the nearest 5? I've checked out trunc, round, floor and ceiling, but these appear to be more tailored towards rounding decimal places. Thanks, Steve _________________________________________________________________ icons.
2020 Sep 04
4
Misleading documentation on FP to integer conversion instructions?
If fptosi takes 0.9 -> 0, then that is not 'rounding' in any sense I'm aware of (IEEE754 or otherwise). Rounding (in the IEE754 sense) determines how a number is converted when it is halfway between two candidate results. (see round(), ceil(), floor()). fptosi seems to model the behavior of a C cast from float to int, which truncates the fractional bits (as in trunc()). Steve
2020 Sep 04
3
Misleading documentation on FP to integer conversion instructions?
> On Sep 4, 2020, at 2:40 PM, Neil Nelson via llvm-dev <llvm-dev at lists.llvm.org> wrote: > >> If fptosi takes 0.9 -> 0, then that is not 'rounding' in any sense I'm aware of (IEEE754 or otherwise). >> Rounding (in the IEE754 sense) determines how a number is converted when it is halfway between two >> candidate results. (see round(), ceil(),
2015 Aug 21
2
The semantics of the fptrunc instruction with an example of incorrect optimisation
I've recently been looking at how to implement in LLVM IR the rounding of floating point values when casting using different rounding modes and I've hit some problems. It seems that when casting down floats to less precise types the ``fptrunc`` LLVM IR instruction is used. The LLVM language reference suggests that it just truncates the value (which would be equivalent to rounding towards
2010 Sep 28
2
[LLVMdev] x86 rounding mode question
Hi, Is there a recommended way to round to the nearest whole (x86 RC field of FPU control = 00) ? It appears an intentional truncation instruction is generated (if ms disassembly is correct): IRBuilder<>::CreateFPToSI %1 = fptosi double %0 to i64 00370025 fisttp qword ptr [esp] Thanks, Bob -------------- next part -------------- An HTML attachment was
2005 May 25
3
Rounding fractional numbers to nearest fraction
Hi all, I've got a matrix of fractional data that is all positive and greater than zero that I would like to "loosely" classify, for lack of a better word. It looks something like this : 1.07 1.11 1.27 1.59 0.97 0.76 2.23 0.98 0.71 0.88 1.19 1.02 What I'm looking for is a way to round these numbers to the nearest 0.25, i.e. the above matrix would be
2015 Jan 28
2
[LLVMdev] RFC: Proposal for Poison Semantics
On Tue, Jan 27, 2015 at 7:59 PM, Sanjoy Das <sanjoy at playingwithpointers.com> wrote: > On Tue, Jan 27, 2015 at 7:44 PM, David Majnemer > <david.majnemer at gmail.com> wrote: > > On Tue, Jan 27, 2015 at 7:23 PM, Sanjoy Das < > sanjoy at playingwithpointers.com> > > wrote: > >> > >> Hi David, > >> > >> I spent some time