similar to: [LLVMdev] Missed optimization opportunity in 3-way integer comparison case

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Missed optimization opportunity in 3-way integer comparison case"

2010 Dec 02
2
Hmisc label function applied to data frame
Hello, I'm attempting to create a data frame with correlations between every pair of variables in a data frame, so that I can then sort by the value of the correlation coefficient and see which pairs of variables are most strongly correlated. The sm2vec function in the corpcor library works very nicely as shown here: library(Hmisc) library(corpcor) # Create example data x1 = runif(50) x2 =
2011 Jan 12
2
[LLVMdev] Wrong assembly is written for x86_64 target in JIT without optimization?
When I try running one llvm function in JIT without optimization I get SEGV. Looking at assembly (below) I see that the local value 0xffffffffffffffe0(%rbp) is used without being ever initialized (see my comment in asm). Same code on i386 works fine, with and w/out optimization. My guess is that this is a bug in LLVM. Yuri --- llvm --- %struct.mystruct = type { i32, i8, i8, i8, i8 } define
2007 Feb 01
0
extensions.conf gotoif and label
Hello, I got a little interogation about these 3 points. I want to write something like this sample in my extension.conf. I have tested and it works but I don't know if it is a good way to make a menu. I don't want to put number as it is boring to maintain. Does anyone know if there is some problem to write like this? exten => 7890,1,Wait(1) exten =>
2011 Jan 12
0
[LLVMdev] Wrong assembly is written for x86_64 target in JIT without optimization?
On Jan 11, 2011, at 4:50 PMPST, Yuri wrote: > When I try running one llvm function in JIT without optimization I get > SEGV. Looking at assembly (below) I see that the local value > 0xffffffffffffffe0(%rbp) is used without being ever initialized (see my > comment in asm). > Same code on i386 works fine, with and w/out optimization. > > My guess is that this is a bug in
2011 Aug 01
0
[LLVMdev] "icmp sgt" when it should be "ugt" ?
Icmp sgt is correct. Note that "ugt x, 0" is the same as "x != 0" which is not what you want. -Chris On Aug 1, 2011, at 9:11 AM, Jonas Gefele <llvm.org at schrieb.de> wrote: > Hello, > > while writing a new LLVM backend I have observed that in some cases the > optimizer produces an "icmp sgt i32 %a, 0" where I would have expected an >
2011 Aug 01
2
[LLVMdev] "icmp sgt" when it should be "ugt" ?
Hello, while writing a new LLVM backend I have observed that in some cases the optimizer produces an "icmp sgt i32 %a, 0" where I would have expected an "icmp ugt i32 %a, 0". For example when I feed "opt -O3 -S ..." (LLVM 2.9, Windows) with ------------------------------------------------------------------------ target datalayout = "E-p:32:32:32"
2013 Oct 17
2
[LLVMdev] llvm-objdump disassembling jmp
In creating a test case for a bug fix in llvm-objdump, I noticed that it differs in its output of pc-relative immediates from objdump: [secdev:/tmp] s$ cat a.s main: jmp .LBL0 .LBL0: ret [secdev:/tmp] s$ llvm-mc -filetype=obj a.s > a.o [secdev:/tmp] s$ objdump -d a.o |tail -n 2 0: eb 00 jmp 2 <main+0x2> 2: c3 retq
2011 Aug 02
2
[LLVMdev] "icmp sgt" when it should be "ugt" ?
Hi Chris, > Icmp sgt is correct. while ugt would be wrong, I think sgt is too! For example, suppose %buf is 0 and %bufLen is ~0U. Then %add.ptr is ~0U, and %cmp is true, so control branches to %if.then. However in the optimized version %cmp is false and control branches to %if.end. The GEP does have an inbounds attribute, I'm not sure if that is relevant here. Ciao, Duncan. Note
2017 Dec 19
4
A code layout related side-effect introduced by rL318299
Hi, Recently 10% performance regression on an important benchmark showed up after we integrated https://reviews.llvm.org/rL318299. The analysis showed that rL318299 triggered loop rotation on an multi exits loop, and the loop rotation introduced code layout issue. The performance regression is a side-effect of rL318299. I got two testcases a.ll and b.ll attached to illustrate the problem. a.ll
2017 Dec 19
2
A code layout related side-effect introduced by rL318299
On Mon, Dec 18, 2017 at 5:46 PM Xinliang David Li <davidxl at google.com> wrote: > The introduction of cleanup.cond block in b.ll without loop-rotation > already makes the layout worse than a.ll. > > > Without introducing cleanup.cond block, the layout out is > > entry->while.cond -> while.body->ret > > All the arrows are hot fall through edges which is
2008 Feb 01
2
Aplication slow after migration
Hi, everybody! I have been using samab on Debian for years and I have recently migrated my file server from version 3.0.14a-3sarge2 to 3.0.24-6etch4. One or our applications stores its data in a shared folder. This data is distributed in over 29000 files of about 1k-40k and is so much slower when it runs on the new server. I have thoroughly revised both smb.conf files, but can't see
2008 Dec 05
2
[LLVMdev] (tablegen) Machine instruction without result
Hello, I am working on the backend for an architecture which has a compare instruction that affects only an internal condition code register (basically a sub without destination register). I get the following assert in the scheduling phase: llvm::SDNode::getValueType(unsigned int) const: Assertion `ResNo < NumValues && "Illegal result number!"' failed. It turns out
2015 Mar 27
2
[LLVMdev] `llvm.$op.with.overflow`, InstCombine and ScalarEvolution
> If we don't care about trying to optimize out overflow checks in > InstCombine, I'd go with moving the complexity to CGP. I think instcombine should optimize out overflow checks (as it does today) without introducing _with_overflow calls. Are there reasons why such an approach would not work? > However, I think > InstCombine is doing the right thing here by forming these.
2017 May 16
2
[RFC] Canonicalization of unsigned subtraction with saturation
Hi, This message is a result of a discussion of backend optimization for sub(max) pattern(https://reviews.llvm.org/D25987), which can be either converted to unsigned min-max or unsigned saturation instruction(if the target supports it). Currently these versions of the code produce different IR(and we need to manage both types in backend): (1.16) void foo(unsigned short *p, unsigned short max,
2009 Feb 13
2
extracting parts of words or extraxting letter to use in ifelse-func.
Hello I want to make some variables with the ifelse-function, but i don't know how to do it. I want to make these five variables; b2$PRRSvac <- ifelse(b2$status=='A' | b2$status=='Aa',1,0) b2$PRRSdk <- ifelse(b2$status=='B' | b2$status=='Bb',1,0) b2$sanVac <- ifelse(b2$status=='C' | b2$status=='sanAa',1,0) b2$sanDk <-
2007 Nov 23
1
[LLVMdev] Will any pass change simple return branch into select/return pair?
Hi, Can any llvm pass change simple return branch into select/return pair? For example: define i10 @mod_N(i10 zeroext %a) zeroext { entry: %tmp2 = icmp ugt i10 %a, -400 ; <i1> [#uses=1] br i1 %tmp2, label %cond_true, label %return cond_true: ; preds = %entry %tmp5 = add i10 %a, 400 ; <i10> [#uses=1] ret i10 %tmp5 return: ; preds = %entry ret
2017 May 16
2
[RFC] Canonicalization of unsigned subtraction with saturation
On 5/16/2017 6:30 AM, Sanjay Patel wrote: > Thanks for posting this question, Julia. > > I had a similar question about a signed min/max variant here: > http://lists.llvm.org/pipermail/llvm-dev/2016-November/106868.html > > The 2nd version in each case contains a canonical max/min > representation in IR, and this could enable more IR analysis. > A secondary advantage is
2008 Dec 05
0
[LLVMdev] (tablegen) Machine instruction without result
On Dec 5, 2008, at 6:53 AMPST, Christian Sayer wrote: > Hello, > > I am working on the backend for an architecture which has a compare > instruction that affects only an internal condition code register > (basically a sub without destination register). You want to model the condition codes as a pseudo-register rather than using OutFlag. See the X86 back end. > I get the
2016 Dec 14
2
analysis based on nonnull attribute
Does the nonnull parameter attribute give us information about subsequent uses of that value outside of the function that has the attribute? Example: define i1 @bar(i32* nonnull %x) { ; %x must be non-null in this function %y = load i32, i32* %x %z = icmp ugt i32 %y, 23 ret i1 %z } define i1 @foo(i32* %x) { %d = call i1 @bar(i32* %x) %null_check = icmp eq i32* %x, null ; check if null
2010 Dec 28
2
[LLVMdev] Missed optimization opportunity
I recently downloaded LLVM 2.8 and started playing with the optimizations a bit. I saw something curious while trying the following function: int g(unsigned int a) { unsigned int c[100]; c[10] = a; c[11] = a; unsigned int b = c[10] + c[11]; if(b > a*2) a = 4; else a = 8; return a + 7; } The generated code, with -O3 activated, is define i32 @g(i32 a) nounwind readnone { %add = shl i32