search for: rounding_mode

Displaying 14 results from an estimated 14 matches for "rounding_mode".

2020 Jan 27
11
Floating point semantic modes
...art by getting input on whether everyone agrees with my judgment on how these things should work and whether I've missed anything. Here's what I've got. ====================== FP semantic modes ====================== except_behavior { ignore, strict, may_trap } fenv_access { on, off } rounding_mode { dynamic, tonearest, downward, upward, towardzero } contract { on, off, fast } denormal_fp_math { IEEE, PreserveSign, PositiveZero } denormal_fp32_math { IEEE, PreserveSign, PositiveZero } support_math_errno { on, off } no_honor_nans { on, off } no_honor_infinities { on, off } no_signed_zeros { on...
2020 Jan 29
2
Floating point semantic modes
...what you’re suggesting aligns with what Cameron suggested and even some of my own reasoning on other points. So, let me amend my previous proposal to say: STDC FENV_ACCESS {ON|OFF} Patch in progress. I think ON should force the following: except_behavior { strict } fenv_access { on } rounding_mode { dynamic } Other modes should be unchanged. Thanks, Andy From: Serge Pavlov <sepavloff at gmail.com> Sent: Wednesday, January 29, 2020 9:34 AM To: Kaylor, Andrew <andrew.kaylor at intel.com> Cc: cfe-dev at lists.llvm.org; LLVM Developers Mailing List <llvm-dev at lists.llvm.org&...
2007 Aug 18
1
[LLVMdev] Soft floating point support
This patch supplies software IEEE floating point support. The comment from the patch reproduced below says all there is to say. This patch contains the prior "cleanup" patch; please don't apply that one. Please let me know of any bugs. It is tested reasonably well, but until I put together random tests it's hard to have 100% confidence. Neil. /* A self-contained host- and
2018 Jan 12
0
[cfe-dev] Why is #pragma STDC FENV_ACCESS not supported?
...ERFLOW_TO_ZERO, except that denorms                         are generated.  This is the default for I64                         systems.       INEXACT           Same as DENORM_RESULTS, except that inexact                         values are trapped.  This is the slowest mode. and rounding modes   /ROUNDING_MODE         /ROUNDING_MODE=option         /ROUNDING_MODE=NEAREST (D)      For /FLOAT=IEEE_MODE, the /ROUNDING_MODE qualifier lets you select      one of the following IEEE rounding modes:       o  NEAREST (default)       o  DYNAMIC       o  MINUS_INFINITY       o  CHOPPED And "strict" mod...
2020 Jan 28
3
Floating point semantic modes
...ere's what I've got. > > > > i'm not an llvm/clang dev, i hope this mail wont bounce. > > > ====================== > > FP semantic modes > > ====================== > > except_behavior { ignore, strict, may_trap } fenv_access { on, off } > > rounding_mode { dynamic, tonearest, downward, upward, towardzero } > > contract { on, off, fast } denormal_fp_math { IEEE, PreserveSign, > > PositiveZero } denormal_fp32_math { IEEE, PreserveSign, PositiveZero } > > support_math_errno { on, off } > > note that math errno handling can be...
2020 Jan 29
3
Floating point semantic modes
...ther I've missed anything. > > Here's what I've got. > i'm not an llvm/clang dev, i hope this mail wont bounce. > ====================== > FP semantic modes > ====================== > except_behavior { ignore, strict, may_trap } fenv_access { on, off } > rounding_mode { dynamic, tonearest, downward, upward, towardzero } > contract { on, off, fast } denormal_fp_math { IEEE, PreserveSign, > PositiveZero } denormal_fp32_math { IEEE, PreserveSign, PositiveZero } > support_math_errno { on, off } note that math errno handling can be 1) errno is set, 2) e...
2015 Jan 03
2
[LLVMdev] [PATCH] [ADT] APFloat - Fix sign handling for FMA results that truncate to zero.
...sedMultiplyAdd: > > /* If two numbers add (exactly) to zero, IEEE 754 decrees it is a > positive zero unless rounding to minus infinity, except that > > adding two like-signed zeroes gives that zero. */ > if (category == fcZero && sign != addend.sign) > sign = (rounding_mode == rmTowardNegative); > > The test "category == fcZero" tells us that the result was zero after > rounding back down to standard precision, but since the addition is carried > out in extended precision this doesn't guarantee that the result of the > addition was exactly...
2007 Sep 22
0
[LLVMdev] APFloat storage complications
...t -------------- Index: lib/Support/APFloat.cpp =================================================================== --- lib/Support/APFloat.cpp (revision 42219) +++ lib/Support/APFloat.cpp (working copy) @@ -1318,39 +1318,44 @@ APFloat::convert(const fltSemantics &toSemantics, roundingMode rounding_mode) { - unsigned int newPartCount; + lostFraction lostFraction; + unsigned int newPartCount, oldPartCount; opStatus fs; - + + lostFraction = lfExactlyZero; newPartCount = partCountForBits(toSemantics.precision + 1); + oldPartCount = partCount(); - /* If our new form is wider, re-alloc...
2015 Jan 02
2
[LLVMdev] [PATCH] [ADT] APFloat - Fix sign handling for FMA results that truncate to zero.
...ppet handles the signedness in fusedMultiplyAdd: /* If two numbers add (exactly) to zero, IEEE 754 decrees it is a positive zero unless rounding to minus infinity, except that adding two like-signed zeroes gives that zero. */ if (category == fcZero && sign != addend.sign) sign = (rounding_mode == rmTowardNegative); The test "category == fcZero" tells us that the result was zero after rounding back down to standard precision, but since the addition is carried out in extended precision this doesn't guarantee that the result of the addition was exactly zero (so the comment te...
2018 Dec 07
3
Implement VLIW Backend on LLVM (Assembler Related Questions)
...mitted, e.g. add , Rj, Rk So can I use this form to express omitting destination, or I should define new instruction for it? e.g. add_no_dest Rj, Rk Q4. Can I define the instruction which has the same name but with different count of operands, e.g. fadd Fi, Fj, Fk fadd Fl, Fm, Fn, rounding_mode So fadd has two versions (a) normal rounding (b) special rounding mode Or I should define it in this way: fadd fadd_round_mode1 fadd_round_mode2 .. fadd_round_mode15 (16 rounding mode) Thank You, CY -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists....
2016 Feb 05
3
[RFC] FP Environment and Rounding mode handling in LLVM
...d', 'fsub', > 'fmul', 'fdiv', and 'frem' (so 5 total). From here on out, I'll > exclusively use 'fadd' as my examples. The intrinsics would look > like: > > declare {f32, i1} @llvm.fadd.with.environment.f32(f32 %lhs, f32 %rhs, > i8 %rounding_mode, i8 %exception_behavior) > > > Then we define specific values to be used for the IEEE rounding > modes. And we define values to control exception behavior. I'm not > an expert on floating point exceptions in particular (my platforms > don't use them) but I'm imaginin...
2016 Feb 03
7
[RFC] FP Environment and Rounding mode handling in LLVM
Hi everyone, Sergey (CC’ed) worked on a series of patches to add support for floating-point environment and floating-point rounding modes in LLVM. This started *in 2014* and the patches after multiple rounds of review in the last months (involving amongst other Steve Canon, Hal Finkel, David Majnemer, and myself) are getting very close (IMO) to be in a state where we can land them. This is the
2016 Feb 06
2
[RFC] FP Environment and Rounding mode handling in LLVM
...mul', 'fdiv', and 'frem' (so 5 total). From here on out, I'll > > exclusively use 'fadd' as my examples. The intrinsics would look > > like: > > > > declare {f32, i1} @llvm.fadd.with.environment.f32(f32 %lhs, f32 > > %rhs, > > i8 %rounding_mode, i8 %exception_behavior) > > > > > > Then we define specific values to be used for the IEEE rounding > > modes. And we define values to control exception behavior. I'm not > > an expert on floating point exceptions in particular (my platforms > > don't...
2016 Feb 06
2
[RFC] FP Environment and Rounding mode handling in LLVM
...9; (so 5 total). From here on out, I'll >>>> exclusively use 'fadd' as my examples. The intrinsics would look >>>> like: >>>> >>>> declare {f32, i1} @llvm.fadd.with.environment.f32(f32 %lhs, f32 >>>> %rhs, >>>> i8 %rounding_mode, i8 %exception_behavior) >>>> >>>> >>>> Then we define specific values to be used for the IEEE rounding >>>> modes. And we define values to control exception behavior. I'm not >>>> an expert on floating point exceptions in particular...