similar to: [LLVMdev] Possible error in docs.

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Possible error in docs."

2013 Apr 05
4
[LLVMdev] Integer divide by zero
On Fri, Apr 5, 2013 at 2:40 PM, Joshua Cranmer šŸ§ <Pidgeot18 at gmail.com>wrote: ... > Per C and C++, integer division by 0 is undefined. That means, if it > happens, the compiler is free to do whatever it wants. It is perfectly > legal for LLVM to define r to be, say, 42 in this code; it is not required > to preserve the fact that the idiv instruction on x86 and x86-64 will
2019 Mar 04
2
Where's the optimiser gone (part 11): use the proper instruction for sign extension
Compile with -O3 -m32 (see <https://godbolt.org/z/yCpBpM>): long lsign(long x) { return (x > 0) - (x < 0); } long long llsign(long long x) { return (x > 0) - (x < 0); } While the code generated for the "long" version of this function is quite OK, the code for the "long long" version misses an obvious optimisation: lsign: # @lsign mov
2013 Apr 05
0
[LLVMdev] Integer divide by zero
On 4/5/2013 1:23 PM, Cameron McInally wrote: > Hey guys, > > I'm learning that LLVM does not preserve faults during constant > folding. I realize that this is an architecture dependent problem, but > I'm not sure if it's safe to constant fold away a fault on x86-64. > > A little testcase: > > #include <stdio.h> > > int foo(int j, int d) { >
2013 Apr 05
3
[LLVMdev] Integer divide by zero
Hey guys, I'm learning that LLVM does not preserve faults during constant folding. I realize that this is an architecture dependent problem, but I'm not sure if it's safe to constant fold away a fault on x86-64. A little testcase: #include <stdio.h> int foo(int j, int d) { return j / d ; } int bar (int k, int d) { return foo(k + 1, d); } int main( void ) { int r =
2009 Mar 30
1
List assignment in a while loop and timing
Hello R users I have question about the time involved in list assignment. Consider the following code snippet(see below). The first line creates a reader object, which is the interface to 1MM key-value pairs (serialized R objects) spanning 50 files (a total of 50MB). rhsqstart initiates the reading and I loop, reading each key-value pair using rhsqnextKVR. If this returns NULL, we switch to the
2015 Jan 29
4
[LLVMdev] CPUStringIsValid() into MCSubtargetInfo and use it for ARM .cpu parsing
Tim, How about the below option ? 1. Specify an existing generic armv7 CPU or the CPU which is close my custom variant. My custom variant can be treated as "cortex-a9" + hwdiv. So my CPU here is "cortex-a9" 2. Specify the ".arch_extension idiv" which is available as an extension for my custom variant. 3. Teach LLVM & Clang about your CPU's
2008 Jun 25
1
LDA on pre-assigned training and testing data sets
Dear r-help I am trying to run LDA on a training data set, and test it on another data set with the same variables. I found examples using crossvalidation, and using training and testing data sets set up with sample, but not when they are preassigned. Here is what I tried # FIRST SET UP A DATAFRAME WITH ALL THE DATA AND CREATE NEW VARIABLES traintest1 <-
2017 Nov 29
3
RFC: Adding 'no-overflow' keyword to 'sdiv'\'udiv' instructions
Introduction: We would like to add new keyword to 'sdiv'\'udiv' instructions i.e. 'no-overflow'. This is the updated solution devised in the discussion: http://lists.llvm.org/pipermail/llvm-dev/2017-October/118257.html The proposed keywords: "nof" stands for 'no-overflow' Syntax: <result> = sdiv nof <ty> <op1>,
2016 Nov 11
2
RFC: Killing undef and spreading poison
Hi John, John McCall wrote: >> On Nov 10, 2016, at 10:37 PM, Sanjoy Das<sanjoy at playingwithpointers.com> wrote: >> As a concrete example, say we have: >> >> i32 sum = x *nsw y >> i64 sum.sext = sext sum to i64 >> ... >> some use of sum.sext >> >> >> Pretending "x +nsw 1" does not sign-overflow, we can commute the sext
2017 Jun 02
5
RFC: Killing undef and spreading poison
Sanjoy, My answer is that step 3, commuting the multiply with the sign-extends, is invalid, As this is what causes the `udiv` to fault. I think it is invalid with or without the ā€œfreezeā€, why do you think step 3, the commute, without the ā€œfreeze" is valid ? Also, do you think you can come up with an example that does not depend on signed overflow being ā€œundefinedā€ ? Peter
2012 May 09
2
[LLVMdev] instructions requiring specific physical registers for operands
On May 9, 2012, at 4:27 AM, Anton Korobeynikov wrote: > Hello Jonas, > >> I wonder, what would be the best solution for instructions that require >> operands in a particular register, and even gives the result in a particular >> register? > You need to custom select such instruction. See e.g. div / idiv on x86 > as an example. That's often easiest, yes;
2018 Feb 12
2
[parallel] fixes load balancing of parLapplyLB
Dear R-Devel List, **TL;DR:** The function **parLapplyLB** of the parallel package has [reportedly][1] (see also attached RRD output) not been doing its job, i.e. not actually balancing the load. My colleague Dirk Sarpe and I found the cause of the problem and we also have a patch to fix it (attached). A similar fix has also been provided [here][2]. [1]:
2018 Feb 26
2
[parallel] fixes load balancing of parLapplyLB
Dear Christian and Henrik, thank you for spotting the problem and suggestions for a fix. We'll probably add a chunk.size argument to parLapplyLB and parLapply to follow OpenMP terminology, which has already been an inspiration for the present code (parLapply already implements static scheduling via internal function staticClusterApply, yet with a fixed chunk size; parLapplyLB already
2017 Jul 31
4
unsigned operations with negative numbers
Hello, I want to know, if I can always assume that when I do unsigned operations like udiv, urem I will get the both operands converted to unsigned values? with under optimized version of code I sometimes receive these lines: unsigned a = 123; int b = -2; int c = a / b; -> %1 = udiv i32 123, -2 and get the result 0. Will it always be zero? or is it undefined?
2015 Aug 19
3
[RFC] Improving integer divide optimization (related to D12082)
Hello LLVM, A recent commit creates the isIntDivCheap() target query. http://reviews.llvm.org/D12082 The current approach has a couple shortcomings. First, when targets decide divide is cheap, the DAGCombiner ignores obvious power-of-2 optimizations. In the targets I know, shifts are cheaper than divides in both speed and size. The target cannot see the value in the isIntDivCheap() call, so
2012 Jun 18
2
[LLVMdev] Best way to replace LLVM IR operation with code containing control flow?
Hi, -Does anyone know where a backend-specific optimization can be added to replace an instruction with code containing control flow? I'm interested in adding an optimization for the DIV instruction (x86-atom) which replace the IDIV/DIV with code containing control flow to select between the intended IDIV/DIV and an 8-bit DIV with movzx, as described in the Intel Atom Optimization Guide. My
2019 Jun 15
3
Constrained integer DIV (WAS: Re: Planned change to IR semantics: constant expressions never have undefined behavior)
> -----Original Message----- > From: Cameron McInally <cameron.mcinally at nyu.edu> > Sent: Friday, June 14, 2019 4:02 PM > To: Eli Friedman <efriedma at quicinc.com>; LLVM Developers Mailing List <llvm- > dev at lists.llvm.org> > Cc: Craig Topper <craig.topper at gmail.com>; Kaylor, Andrew > <andrew.kaylor at intel.com> > Subject: [EXT]
2011 Dec 17
1
[LLVMdev] nsw is still logically inconsistent
> LICM on ToT hoists the div. Even speculatively. > > The other thing is that div is just one example. The problem could > also come up with an array load with an index could be safe to > speculate if the index is known to be bounded. isDereferenceablePointer > currently doesn't know how to do this, but it'll probably get > smarter some day. So, looking at just this
2018 Feb 19
2
[parallel] fixes load balancing of parLapplyLB
Hi, I'm trying to understand the rationale for your proposed amount of splitting and more precisely why that one is THE one. If I put labels on your example numbers in one of your previous post: nbrOfElements <- 97 nbrOfWorkers <- 5 With these, there are two extremes in how you can split up the processing in chunks such that all workers are utilized: (A) Each worker, called
2013 Apr 05
0
[LLVMdev] Integer divide by zero
On Apr 5, 2013, at 1:42 PM, Cameron McInally <cameron.mcinally at nyu.edu> wrote: > On Fri, Apr 5, 2013 at 2:40 PM, Joshua Cranmer šŸ§ <Pidgeot18 at gmail.com> wrote: > ... > Per C and C++, integer division by 0 is undefined. That means, if it happens, the compiler is free to do whatever it wants. It is perfectly legal for LLVM to define r to be, say, 42 in this code; it is