similar to: [compiler-rt] Undefined negation in float emulation functions

Displaying 20 results from an estimated 1000 matches similar to: "[compiler-rt] Undefined negation in float emulation functions"

2015 Oct 24
2
[compiler-rt] Undefined negation in float emulation functions
Thanks for the confirmation, Steve. Your suggestion looks good to me, but I don't have an environment set up to build the test suite so it may take me a little while to get back to you with a validated patch. A bit of creative grepping yields the following that also look problematic to me: compiler-rt/test/builtins/Unit/absvsi2_test.c: expected = -expected;
2015 Oct 25
2
[compiler-rt] Undefined negation in float emulation functions
On 26/10/15 02:54, Joerg Sonnenberger wrote: > On Sun, Oct 25, 2015 at 06:46:48AM -0400, Steve Canon via llvm-dev wrote: >> On Oct 24, 2015, at 6:02 PM, Chris Lattner <clattner at apple.com> wrote: >>> >>> >>>> On Oct 23, 2015, at 7:43 PM, Matthew Fernandez via llvm-dev <llvm-dev at lists.llvm.org> wrote: >>>>> On 21/10/15 00:15,
2015 Oct 25
2
[compiler-rt] Undefined negation in float emulation functions
On Oct 24, 2015, at 6:02 PM, Chris Lattner <clattner at apple.com> wrote: > > >> On Oct 23, 2015, at 7:43 PM, Matthew Fernandez via llvm-dev <llvm-dev at lists.llvm.org> wrote: >>> On 21/10/15 00:15, Stephen Canon wrote: >>> Yup, this is UB. If you want to propose a patch, I would do something like the following: >>> >>> rep_t sign
2011 Mar 10
1
[LLVMdev] compiler-rt: Infinite loop/stack overflow in __modsi3()
Hi All, The default implementation of __modsi3() (signed integer modulus) in compiler-rt/lib/modsi3.c is defined recursively. Thankfully, LLVM is smart enough to do tail call elimination on the recursion, so I got an infinite loop rather than a stack overflow :) Here's the patch, patterned after the correct implementation in umodsi3.c: diff --git a/lib/compiler-rt/lib/modsi3.c
2015 Sep 10
3
[OpenCL] Implicit arithmetic conversion of INT_MIN to int vector type
Hello, I recently came across an OpenCL kernel in which an int vector type was subtracted from the INT_MIN constant, e.g. int2 v2 = INT_MIN - (int2)(0); INT_MIN was defined as #define INT_MIN (-2147483648) Clang in OpenCL modes (-x cl) produces the following error: vector_conversion.c:12:42: error: can't convert between vector values of different size ('long' and 'int2'
2013 Oct 03
4
[LLVMdev] ScalarEvolution::createNodeForPHI
On 10/03/2013 01:22 AM, Andrew Trick wrote: > > I’m not sure how to make sense of an NUW flag coming from a sub. > > NSW is just a misnomer for signed overflow. SCEV canonicalizes sub a,b to add a, (-b). Unfortunately, signed overflow is not the same thing for sub and add... > > sub nsw %a, %b != add nsw %a, (-1 * %b) > > sub nsw i32, -1, INT_MIN is true. > > add
2013 Oct 03
0
[LLVMdev] ScalarEvolution::createNodeForPHI
On 10/03/2013 04:15 PM, Michele Scandale wrote: > On 10/03/2013 01:22 AM, Andrew Trick wrote: >> >> I’m not sure how to make sense of an NUW flag coming from a sub. >> >> NSW is just a misnomer for signed overflow. SCEV canonicalizes sub a,b to add a, (-b). Unfortunately, signed overflow is not the same thing for sub and add... >> >> sub nsw %a, %b != add nsw
2014 Apr 25
4
[LLVMdev] Proposal: add intrinsics for safe division
On April 25, 2014 at 9:52:35 AM, Eric Christopher (echristo at gmail.com) wrote: Hi Michael, > I’d like to propose to extend LLVM IR intrinsics set, adding new ones for > safe-division. There are intrinsics for detecting overflow errors, like > sadd.with.overflow, and the intrinsics I’m proposing will augment this set. > > The new intrinsics will return a structure with two
2015 Jan 15
2
[LLVMdev] confusion w.r.t. scalar evolution and nuw
> We are permitted to turn 'sub nsw i32 %x, 1' into 'add nsw i32 %x, -1' nsw also has the same problem: sub nsw int_min, int_min is 0 but add nsw int_min, (-int_min) is poison -- Sanjoy
2014 Apr 25
2
[LLVMdev] Proposal: add intrinsics for safe division
On April 25, 2014 at 10:48:18 AM, Reid Kleckner (rnk at google.com) wrote: On Fri, Apr 25, 2014 at 10:19 AM, Filip Pizlo <fpizlo at apple.com> wrote: The sdiv operation in LLVM IR only makes sense for C and its very direct relatives.  The amount of control flow necessary to represent a safe division for any other language is ghastly.  (a/b) becomes something like (b != 0 ? ((a != INT_MIN ||
2014 Jul 01
2
[LLVMdev] Probable error in InstCombine
I've found what appears to be a bug in instcombine. Specifically, the transformation of -(X/C) to X/(-C) is invalid if C == INT_MIN. Specifically, if I have > define i32 @foo(i32 %x) #0 { > entry: > %div = sdiv i32 %x, -2147483648 > %sub = sub nsw i32 0, %div > ret i32 %sub > } then opt -instcombine will produce > define i32 @foo(i32 %x) #0 { > entry: > %sub
2019 Sep 03
2
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
Hi, I would like to figure out the meaning of the return value of these two functions. Here are the default definitions I find from R source code: static int altreal_Is_sorted_default(SEXP x) { return UNKNOWN_SORTEDNESS; } static int altreal_No_NA_default(SEXP x) { return 0; } I guess the macro *UNKNOWN_SORTEDNESS *in *Is_sorted* and 0 in *No_NA *simply means unknown sorted/NA status of
1998 Mar 03
1
":" (seq) bug -- should not always coerce to integer!
The problem seems that ":" always coerces to integer, but should not.. 9.9:12 ## R: [1] 9 10 11 ## S-plus 3.4: [1] 9.9 10.9 11.9 ## and many more examples.... -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
2014 May 02
3
[LLVMdev] Proposal: add intrinsics for safe division
On May 2, 2014, at 4:25 PM, Philip Reames <listmail at philipreames.com> wrote: > > I'm still not happy with hiding the explicit control flow, but I can achieve the same effect as: > if( div by zero ) throw > (r, o, d) = safe.div(a,b); > if( o ) { > r = a; > } > > i.e. emit a separate guard branch for the interesting condition and not utilize the value
2017 Oct 20
1
Illegal Logical Values
I'm wondering if WRE Section 5.2 should be a little more explicit about misuse of integer values other than NA, 0, and 1 in LGLSXPs.? I'm thinking of this passage: > Logical values are sent as 0 (FALSE), 1 (TRUE) or INT_MIN = -2147483648 (NA, but only if NAOK is true), and the compiled code should return one of these three values. (Non-zero values other than INT_MIN are mapped to
2013 Oct 03
0
[LLVMdev] ScalarEvolution::createNodeForPHI
On Oct 3, 2013, at 7:15 AM, Michele Scandale <michele.scandale at gmail.com> wrote: > On 10/03/2013 01:22 AM, Andrew Trick wrote: >> >> I’m not sure how to make sense of an NUW flag coming from a sub. >> >> NSW is just a misnomer for signed overflow. SCEV canonicalizes sub a,b to add a, (-b). Unfortunately, signed overflow is not the same thing for sub and
2013 Oct 01
3
[LLVMdev] ScalarEvolution::createNodeForPHI
Hello to everybody, I'm working on some improvements on trip count computation with ScalarEvolution analysis. Considering the following test ;----------------------------------------------------------------------------; define void @foo(i32 %a, i32 %b, i32 %s) #0 { entry: %cmp = icmp sgt i32 %s, 0 %cmp15 = icmp sgt i32 %a, %b %or.cond = and i1 %cmp, %cmp15 br i1 %or.cond, label
2015 Apr 14
3
behavior of as.integer("5000000000")
On 04/13/2015 11:32 PM, Martin Maechler wrote: > >> Hi, >> > as.integer("5000000000") >> [1] 2147483647 >> Warning message: >> inaccurate integer conversion in coercion > >> > as.integer("-5000000000") >> [1] NA >> Warning message: >> inaccurate integer conversion in coercion >
2013 Oct 02
0
[LLVMdev] ScalarEvolution::createNodeForPHI
On Oct 1, 2013, at 6:45 AM, Michele Scandale <michele.scandale at gmail.com> wrote: > Hello to everybody, > > I'm working on some improvements on trip count computation with ScalarEvolution > analysis. > Considering the following test > > ;----------------------------------------------------------------------------; > define void @foo(i32 %a, i32 %b, i32 %s) #0
2007 Apr 18
3
[Bridge] Re: do_IRQ: stack overflow: 872..
On Fri, 07 Jan 2005 17:05:59 +0000 David Woodhouse <dwmw2@infradead.org> wrote: > On Sat, 2004-12-18 at 08:50 +0100, Andi Kleen wrote: > > It's not really an oops, just a warning that stack space got quiet > > tight. > > > > The problem seems to be that the br netfilter code is nesting far too > > deeply and recursing several times. Looks like a design