Displaying 10 results from an estimated 10 matches for "tonearest".
2020 Jan 27
11
Floating point semantic modes
...hether 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, off }
allow_recipro...
2020 Feb 12
6
[RFC] Optional parameter tuples
...ers.
Optional parameter tuples would be very useful for constrained fp intrinsics and vector predication. Some examples:
; Default fpenv fadd (isomorphic to the fadd instruction)
%z = call double @llvm.fadd(%a, %b)
; Constrained fp add
%x = call double @llvm.fadd(%a, %b) fpenv(metadata !fpround.tonearest, metadata !fpexcept.strict)
; Constrained fp add with vector predication (https://reviews.llvm.org/D57504)
%x = call <256 x double> @llvm.fadd(%a, %b) mask(<256 x i1> %mask), evl(i32 %evl), fpenv(metadata !fpround.tozero, metadata !fpexcept.strict)
For constrained fp and VP, we only...
2020 Jan 29
2
Floating point semantic modes
...g 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, off }
allow_recipro...
2019 Feb 21
2
[RFC] Vector Predication
...}
}
We can't use select even with constrained intrinsics, because the
constrained intrinsics only tell the optimizer they can't be speculated.
This is not a legal translation:
%cond = fabs(c[i]) > epsilon
%temp = select %cond,
llvm.experimental.constrained.fdiv(b[i], c[i], tonearest, maytrap),
0
store a[i], %temp
According to the IR, we've already speculated
llvm.experimental.constrained.fdiv above the test.
I believe the only way to safely do this with the current IR is via
control flow and now we have to match complex control flow during isel.
Who knows what othe...
2020 Jan 28
3
Floating point semantic modes
...ot.
> >
>
> 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 i...
2020 Jan 29
3
Floating point semantic modes
...hing.
>
> 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) errno may be set and
3...
2019 Oct 03
2
[RFC] Using basic block attributes to implement non-default floating point environment
...o handle the intrinsics correctly then it isn’t limited by
> anything other than the semantics of the constraints. Once we’ve
> updated an optimization pass, it will be able to do everything with a
> constrained intrinsic that has the “relaxed” settings
> (“fpexcept.ignore” and “fpround.tonearest”) that it would be able to
> do with the regular operation.
The way I understood it, the constraint intrinsics are not the only
problem but the regular ones can be. That is, optimizations will move
around/combine/replace/... regular floating operations in the presence
of constraint intrinsics b...
2019 Feb 07
2
[RFC] Vector Predication
Philip Reames <listmail at philipreames.com> writes:
>> Masking has advantages even in the default non-trapping fp
>> environment: It is not uncommon for fp hardware to be slow on
>> denormal values. If you take the operation + select approach,
>> spurious computation on denomals could occur, slowing down the
>> program.
> Why? If you're backend has
2019 Oct 01
7
[RFC] Using basic block attributes to implement non-default floating point environment
Hi all,
This proposal is aimed at support of floating point environment, in which
some properties like rounding mode or exception behavior differ from those
used by default. This include in particular support of 'pragma STDC
FENV_ACCESS', 'pragma STDC FENV_ROUND' as well as some other related
facilities.
Problem
On many processors use of non-default floating mode requires
2019 Nov 15
3
RFC: token arguments and operand bundles
We really have been trying to keep in mind that LLVM needs to support multiple front ends, which may be implementing different language standards. As much as possible, I’ve been trying to let the IEEE 754 spec drive my thinking about this, though I’ll admit that on a few points I’ve use the C99 spec as a sort of reference interpretation of IEEE 754.
LLVM’s IRBuilder has been recently updated to