similar to: [LLVMdev] floating point exceptions in compare instructions

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] floating point exceptions in compare instructions"

2006 Oct 13
1
[LLVMdev] floating point exceptions in compare instructions
> Nope, you want non-trapping instructions. If you use trapping > instructions, C99 functions like isgreater will not work correctly with > NAN's. How do I know when to use a trapping instruction? For example consider this C function: ------------------------ int f(float a, float b) { return a <= b; } ------------------------ gcc uses fcmpes instead of fcmps... >
2006 Oct 13
0
[LLVMdev] floating point exceptions in compare instructions
On Fri, 13 Oct 2006, [UTF-8] Rafael Esp?ndola wrote: > Looking at the llvm code I have the impression that ordered fp > comparisons should use exception throwing instructions. Is it true? Nope, you want non-trapping instructions. If you use trapping instructions, C99 functions like isgreater will not work correctly with NAN's. -Chris -- http://nondot.org/sabre/ http://llvm.org/
2014 Sep 19
2
[LLVMdev] More careful treatment of floating point exceptions
Hi, I'd like to make code emitted by LLVM that includes floating point operations which raise FP exceptions behave closer to what is defined by IEEE754 standard. I'm not going to "fix everything", just incorrect behaviour I faced so far. Most of troubles regarding FP exceptions are caused by optimizations, so there should be a flag to disable/block them if one wants to get
2019 Oct 08
2
PR43374 - when should comparing NaN values raise a floating point exception?
* Sanjay Patel via llvm-dev <llvm-dev at lists.llvm.org> [2019-10-01 09:44:54 -0400]: > Let's change the example to eliminate suspects: > #include <math.h> > int is_nan(float x) { > /* > The following subclauses provide macros that are quiet (non > floating-point exception raising) > versions of the relational operators, and other comparison
2012 Mar 05
1
[LLVMdev] printing hex format for floating point number
Hi, I am trying to print a hex value ( 4111999A for 9.1) for a corresponding floating point number. The routine convertToHexString in APFFloat class only prints in C99 Floating point hexagondecimal constant (eg 1.e00000p3). Without writing my own routine, how do I get to print the hexadecimal representation for a floating point value? Sirish -- Qualcomm Innovation Center, Inc is a member
2019 Oct 01
5
PR43374 - when should comparing NaN values raise a floating point exception?
Hi, I’ve been investigating https://bugs.llvm.org/show_bug.cgi?id=43374, which is about clang/llvm producing code that triggers a floating point exception when x is NaN, when targeting ARM, in the below code example. int bar(float x) { return x!=x ? 0 : 1; } The C99 standard states in section 7.12.14: """ The relational and equality operators support the usual mathematical
2007 May 22
2
R 2.5.0 refuses to print enough digits to recover exact floating point values
I have noticed that in R 2.5.0, no method of textual output will print a "double" mode quantity with more than 15 digits after the decimal point. From the help page (?print.default) it appears that this is intentional, since digits after the fifteenth may be uncertain. However, fifteen digits after the decimal point are not enough to represent all the values that an IEEE-double can
2013 Aug 29
2
[LLVMdev] Ordered / Unordered FP compare are not handled properly on X86
On 29 Aug 2013, at 08:19, Tim Northover <t.p.northover at gmail.com> wrote: > If so, a compare that used that instruction would have to become more > like an "invoke" with a landingpad for the exception and so on, > wouldn't it? The current fcmp can already distinguish between ordered > and unordered, because ucomiss provides that information. There are currently
2013 Aug 29
0
[LLVMdev] Ordered / Unordered FP compare are not handled properly on X86
On 29 August 2013 06:31, Demikhovsky, Elena <elena.demikhovsky at intel.com> wrote: > Should I open a ticket for this? I think he was saying this is intended behaviour. Isn't the difference between ucomiss and comiss just whether an exception is raised for NaN? If so, a compare that used that instruction would have to become more like an "invoke" with a landingpad for the
2013 Aug 29
2
[LLVMdev] Ordered / Unordered FP compare are not handled properly on X86
Should I open a ticket for this? - Elena From: Eli Friedman [mailto:eli.friedman at gmail.com] Sent: Wednesday, August 28, 2013 19:51 To: Demikhovsky, Elena Cc: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Ordered / Unordered FP compare are not handled properly on X86 On Wed, Aug 28, 2013 at 2:16 AM, Demikhovsky, Elena <elena.demikhovsky at intel.com<mailto:elena.demikhovsky at
2006 Oct 07
2
[LLVMdev] should PEI::calculateFrameObjectOffsets align the stack?
> This sounds like the ADJCALLSTACK DOWN/UP 'instructions' around the call > aren't set right, or you have declared a SP offset. It doesn't look like > the ARM backend does this, so this is probably the problem. The ARM backend currently doesn't use a frame pointer. It uses the same technique of the PPC backend to avoid add/subs around calls. In the PPC backend we
2019 Oct 01
2
PR43374 - when should comparing NaN values raise a floating point exception?
Ulrich offered to do it instead since I expect he can get it done much faster than me. Instead I'm doing SIToFP and UIToFP. Ulrich said he wasn't going to be able to get to it for a couple of weeks, but that was a week or two ago. Ulrich? -----Original Message----- From: Cameron McInally <cameron.mcinally at nyu.edu> Sent: Tuesday, October 01, 2019 10:21 AM To: Kristof Beyls
2005 Mar 17
1
[LLVMdev] Floating point compare instruction selection
Chris Lattner wrote: > On Wed, 16 Mar 2005, Morten Ofstad wrote: >> The case which emits code for the special case of comparing against >> constant 0.0 does not return after generating it's code, so the normal >> compare is also generated! As far as I can tell it should return right >> after this: >> >> BuildMI(BB, X86::SAHF, 1); >> >>
2006 Oct 08
1
[LLVMdev] should PEI::calculateFrameObjectOffsets align the stack?
> That is irrelevant. The PEI code needs to know how much stack space is > required for each call to allocate and align the stack frame properly. It > gets this info from the ADJCALLSTACK instructions. I see. Looking at PEI::calculateCalleeSavedRegisters shows that the ADJCALLSTACK instructions is used to set up MaxCallFrameSize. Adding debug prints also show that in the example code
2005 Mar 16
0
[LLVMdev] Floating point compare instruction selection
On Wed, 16 Mar 2005, Morten Ofstad wrote: > Hello, > > I didn't get any reply to my previous mail about adding floating point > intrinsics to the X86 pattern instruction selector... And I could really need > some help. Sorry about that, it slipped through the cracks. :( > Anyway, I think my confusion was caused partly by an already > existing bug in the instruction
2000 Sep 09
0
floating point exceptions, and questions.
I've been working on tracking down a variety of problems with the post beta2 branch, mostly related to floating point precision issues, which cause floating point exceptions. These tend to have nasty effects like making libvorbis not work on your typical alpha (which doesn't mask them like x86 does by default). These seem to be turning up in a number of places, mainly in psy.c - I'm
2000 Sep 09
1
floating point exceptions, and questions
#include <float.h> should define DBL_MIN and FLT_MIN, as well as DBL_MIN_EXP and FLT_MIN_EXP (such that 10eFLT_MIN_EXP is a valid float) This is a standard header file. But gcc now hides it away (mine was in /usr/lib/gcc-lib/i386-linux/<compiler-version>/include/ ) BTW - any corrections for my surf.chimie.uqam.ca/~kruus/vorbis/ stuff? Erik Kruus <kruus@on2.com> --- >8
2005 Mar 16
2
[LLVMdev] Floating point compare instruction selection
Hello, I didn't get any reply to my previous mail about adding floating point intrinsics to the X86 pattern instruction selector... And I could really need some help. Anyway, I think my confusion was caused partly by an already existing bug in the instruction selection for floating point compares. The case which emits code for the special case of comparing against constant 0.0 does not
2006 Apr 19
0
[LLVMdev] floating point exception and SSE2 instructions
On Wed, 19 Apr 2006 19:28:34 +0100 Simon Burton <simon at arrowtheory.com> wrote: > > >From what I remember, this is a bug in debian libc: > some floating point flags are set incorrectly causing SIGFPE. > Can't find the bug report ATM. Oh, it just showed up on numpy-discussion: http://sources.redhat.com/bugzilla/show_bug.cgi?id=10 """ #include
2006 Apr 19
2
[LLVMdev] floating point exception and SSE2 instructions
On Thu, 20 Apr 2006, Simon Burton wrote: >>> From what I remember, this is a bug in debian libc: >> some floating point flags are set incorrectly causing SIGFPE. >> Can't find the bug report ATM. > > Oh, it just showed up on numpy-discussion: > http://sources.redhat.com/bugzilla/show_bug.cgi?id=10 > > """ > #include <fenv.h> > void