similar to: RFC: What is the real behavior for the minnum/maxnum intrinsics?

Displaying 20 results from an estimated 1000 matches similar to: "RFC: What is the real behavior for the minnum/maxnum intrinsics?"

2018 Jul 26
3
RFC: What is the real behavior for the minnum/maxnum intrinsics?
> On Jul 23, 2018, at 3:40 PM, Alex Bradbury via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > On 23 July 2018 at 11:56, Arsenault, Matthew via llvm-dev > <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > >> Hi, >> >> >> The specification for the llvm.minnum/llvm.maxnum intrinsics is too unclear >> right
2014 Sep 17
4
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
On Sep 15, 2014, at 4:17 PM, Owen Anderson <resistor at mac.com> wrote: > I’d be fine with that proposal. I could even be convinced if we wanted to add a pair of NaN-propagating intrinsics as well, for targets and languages that want those semantics, even if I disagree with them. I do think that, if we are using the minnum/maxnum names, we should explicitly note that they are
2014 Sep 15
2
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
Given IEEE-754's sway, and its saying what it does on this point, but given also the popularity of NaN-propagating min and max, how about a compromise? We add intrinsics following the IEEE-754 semantics, but we also follow IEEE-754 (and ARMv8) in renaming them to minnum and maxnum, to clarify which interpretation these intrinsics are using. -------------- next part -------------- An HTML
2014 Aug 14
2
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
… actually, now that I’m able double-check this, I’m quite surprised to find that we didn’t define fmax(+0,–0) in IEEE–754, which says [paraphrased]: minNum(x,y) is x if x < y, y if y < x, and the number if one is a number and the other is NaN. Otherwise, it is either x or y (this means results might differ among implementations). So I think your proposed semantics are perfectly
2014 Aug 18
2
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
This is a problem with all floating point folding, not just with these operations. What Matt is proposing is consistent with how we fold other libm intrinsics. —Owen > On Aug 18, 2014, at 1:22 AM, Mueller-Roemer, Johannes Sebastian <Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de> wrote: > > Wouldn’t it be better to use the target’s implementation (if there is one)
2014 Aug 18
3
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
Hi Carter, I would strongly advise you against this direction. I’m aware of two directions that existing languages go in defining min/max operations: - IEEE 754, C, Fortran, Matlab, OpenCL, and HLSL all define it not to propagate NaNs - C++ (std::min/std::max) and OpenGL define it in the trinary operator manner: (a < b) ? a : b What you’re proposing does not match any existing languages
2012 Dec 05
0
[LLVMdev] max/min intrinsics
On Dec 5, 2012, at 8:26 AM, "Redmond, Paul" <paul.redmond at intel.com> wrote: > I have been working on a patch to add support for max/min reductions in LoopVectorize. One of the comments that came up in review is that the implementation could be simplified (and less fragile) if max and min intrinsics were recognized rather than looking for compare-select sequences. > >
2012 Dec 05
6
[LLVMdev] max/min intrinsics
I have been working on a patch to add support for max/min reductions in LoopVectorize. One of the comments that came up in review is that the implementation could be simplified (and less fragile) if max and min intrinsics were recognized rather than looking for compare-select sequences. The suggestion was to change compare-selects into max and min intrinsic calls during instcombine. The
2020 Apr 08
7
RFC: Promoting experimental reduction intrinsics to first class intrinsics
Hi, It’s been a few years now since I added some intrinsics for doing vector reductions. We’ve been using them exclusively on AArch64, and I’ve seen some traffic a while ago on list for other targets too. Sander did some work last year to refine the semantics after some discussion. Are we at the point where we can drop the “experimental” from the name? IMO all target should begin to transition
2012 Dec 17
2
[LLVMdev] max/min intrinsics
On Wednesday, December 05, 2012 at 2:48 PM, Chris Lattner wrote: > > What does the community think? > > It seems inevitable. For the floating point version, please make it very clear > what the behavior of max(-0,+0) and related cases are. The following is our current proposal for llvm.fmax/fmin.*: [1] If exactly one argument is a NaN, the intrinsic returns the other argument.
2014 Aug 13
5
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
Hi, I’d like to re-propose adding intrinsics for fmin / fmax. These can be used to implement the equivalent libm functions as defined in C99 and OpenCL, which R600 and AArch64 at least have instructions with the same semantics. This is not equivalent to a simple fcmp + select due to its handling of NaNs. This has been proposed before, but never delivered
2014 Sep 13
2
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
On Fri, Sep 12, 2014 at 3:04 PM, Owen Anderson <resistor at mac.com> wrote: > > On Sep 12, 2014, at 2:24 PM, Owen Anderson <resistor at mac.com> wrote: > > > On Sep 12, 2014, at 10:27 AM, Dan Gohman <dan433584 at gmail.com> wrote: > > >> More generally, I don’t see a compelling reason for LLVM to add intrinsic >> support for the version you’re
2015 Nov 15
3
Why is llvm.maxnum.f32 coming through unreduced?
I have a smallish compilation that contains calls on intrinsics @llvm.maxnum.f32 and @llvm.fabs.f32: %fminmax = call float @llvm.maxnum.f32(float %fabs5, float %fabs) %fabs = call float @llvm.fabs.f32(float %v.6) The latter is reduced to machine code by llc, the former is not, instead coming through as an external function call, which then fails to link. I can't see any differences
2015 Nov 16
2
Why is llvm.maxnum.f32 coming through unreduced?
On 11/15/2015 01:29 PM, Tim Northover wrote: > On 15 November 2015 at 09:01, Rodney M. Bates via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> The latter is reduced to machine code by llc, the former is not, instead >> coming through as an external function call, which then fails to link. > > Is this for x86? I don't think that has a single instruction to >
2019 Mar 29
8
EuroLLVM Numerics issues
All: There will be a BoF talk at the EuroLLVM conference regarding Numerics (FMF and module flags which control fp behavior and optimization). Even if you are not going to be in attendance, please reply to this thread as we are collecting open issues and ideas for future direction in all layers of LLVM for which optimizations are controlled by numerics flags. Please read over the numerics blog
2018 Nov 09
3
Proposed new min and max intrinsics
On Thu, Nov 8, 2018 at 11:35 PM Fabian Giesen via llvm-dev < llvm-dev at lists.llvm.org> wrote: > What is so complicated about these? Shouldn't they just correspond to > two compares + selects? > > To give a concrete example, x86 MIN[SP][SD] and MAX[SP][SD], > respectively, correspond exactly to > > MIN*: select(a < b, a, b) (i.e. "a < b ? a : b")
2018 Nov 08
2
Proposed new min and max intrinsics
Alex, After looking into this a bit, it looks to me like the best thing to do for targets that do not natively support ISD::MINIMUM and ISD::MAXIMUM would be to fall back to a libcall, since implementing these operations in terms of existing operations is actually rather complicated. Do you think it would make sense to add builtin functions to compiler-rt to implement these operations, or is
2017 Jan 31
0
RFC: Generic IR reductions
Hi Amara, We also had some discussions on the SVE side of reductions on the main SVE thread, but this description is much more detailed than we had before. I don't want to discuss specifically about SVE, as the spec is not out yet, but I think we can cover a lot of ground until very close to SVE and do the final step when we get there. On 31 January 2017 at 17:27, Amara Emerson via
2020 Jun 17
2
RFC: Promoting experimental reduction intrinsics to first class intrinsics
A minor point, but I think we need to more explicitly describe the order of floating point operations in the LangRef as well: "If the intrinsic call has the ‘reassoc’ or ‘fast’ flags set, then the reduction will not preserve the associativity of an equivalent scalarized counterpart. Otherwise the reduction will be ordered, thus implying that the operation respects the associativity of a
2017 Feb 01
2
RFC: Generic IR reductions
On 1 February 2017 at 08:27, Renato Golin <renato.golin at linaro.org> wrote: > Sorry, I meant min/max + reduce, just like above. > > %sum = add <N x float>, <N x float> %a, <N x float> %b > %min = @llvm.minnum(<N x float> %sum) > %red = @llvm.reduce(%min, float %acc) No, this is wrong. I actually meant overriding the max/min intrinsics to take