search for: ugt

Displaying 20 results from an estimated 78 matches for "ugt".

Did you mean: gt
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" define void @foo(i8* %buf, i32 %bufLen, i32* %ret) nounwind { entry: %add.ptr = g...
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...
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 su...
2011 Aug 02
0
[LLVMdev] "icmp sgt" when it should be "ugt" ?
On Tue, Aug 2, 2011 at 3:47 AM, Duncan Sands <baldrick at free.fr> wrote: > 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 inboun...
2011 Aug 02
3
[LLVMdev] "icmp sgt" when it should be "ugt" ?
Hi Eli, >>> 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...
2011 Aug 02
0
[LLVMdev] "icmp sgt" when it should be "ugt" ?
On Aug 2, 2011, at 8:53 AM, Duncan Sands wrote: > Hi Eli, > >>>> 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. >...
2008 Feb 01
2
Aplication slow after migration
...both smb.conf files, but can't see significant differences. I have read them so much that probably I'm already obfuscated. I have tuned socket options, but can't see any improvement. Any ideas? Thanks in advance -- ============================== Felipe Mart?nez Hermo felipe@galicia.ugt.org fmartinez@galicia.ugt.org ============================== Servicios Inform?ticos UGT Galicia informatica@galicia.ugt.org ugtgalicia@gmail.com ============================== New server max. Version 3.0.24-6etch4. Old server clarence. Version 3.0.14a-3sarge2 WARNING: You have some share name...
2014 May 13
2
[LLVMdev] Missed optimization opportunity in 3-way integer comparison case
...; } else if (i1>i2) { return 1; } return 0; } --- llvm code --- define i32 @mycmp(i32, i32) #0 { lbl0: %icmp.ULT = icmp ult i32 %0, %1 br i1 %icmp.ULT, label %lbl1, label %lbl2 lbl1: %merge = phi i32 [ -1, %lbl0 ], [ %., %lbl2 ] ret i32 %merge lbl2: %icmp.UGT = icmp ugt i32 %0, %1 %. = zext i1 %icmp.UGT to i32 br label %lbl1 } --- intel assembly --- 0000000000000010 <mycmp>: 10: 55 push %rbp 11: 48 89 e5 mov %rsp,%rbp 14: b8 ff ff ff ff mov $0xffffffff,%eax 19: 39 f7...
2015 Mar 27
2
[LLVMdev] `llvm.$op.with.overflow`, InstCombine and ScalarEvolution
...ut the _with_overflow intrinsics to optimize IR that it could have otherwise optimized. Another example is GVN -- `opt -gvn` optimizes away %to.optimize but `opt -instcombine -gvn` does not. declare void @side_effect(i1) define void @foo(i8 %x, i8 %y) { entry: %sum = add i8 %x, %y %e = icmp ugt i8 %x, %sum br i1 %e, label %yes, label %no yes: %to.optimize = icmp ugt i8 %x, %sum call void @side_effect(i1 %to.optimize) br label %no no: ret void }
2017 May 16
2
[RFC] Canonicalization of unsigned subtraction with saturation
...analyze in ComputeMaskedBits or something, but we don't really do much to optimize selects involving zero. -Eli > On Tue, May 16, 2017 at 5:30 AM, Koval, Julia <julia.koval at intel.com > <mailto:julia.koval at intel.com>> wrote: > > (1.16) > %cmp = icmp ugt i16 %x, %y > %sub2 = sub i16 %y, %x > %res = select i1 %cmp, i16 0, i16 %sub2 > > or > > (2.16) > %cmp = icmp ugt i16 %x, %y > %sel = select i1 %cmp, i16 %x, i16 %y > %sub = sub i16 %sel, %x > > Which of these versions is canonical? I...
2017 May 16
2
[RFC] Canonicalization of unsigned subtraction with saturation
...; n; i++) { m = *--p; *p =(m >= max ? m-max : 0); } } (2.16) void goo(unsigned short *p, unsigned short max, int n) { int i; unsigned short m; for (i = 0; i < n; i++) { m = *--p; unsigned short umax = m > max ? m : max; *p =umax - max; } } (1.16) %cmp = icmp ugt i16 %x, %y %sub2 = sub i16 %y, %x %res = select i1 %cmp, i16 0, i16 %sub2 or (2.16) %cmp = icmp ugt i16 %x, %y %sel = select i1 %cmp, i16 %x, i16 %y %sub = sub i16 %sel, %x Which of these versions is canonical? I think first version is better, because it can be converted to unsigned saturation...
2009 Feb 13
2
extracting parts of words or extraxting letter to use in ifelse-func.
...Sdk <- ifelse(b2$status=='B' | b2$status=='Bb',1,0) b2$sanVac <- ifelse(b2$status=='C' | b2$status=='sanAa',1,0) b2$sanDk <- ifelse(b2$status=='D' | b2$status=='sanBb',1,0) b2$totalvac <- ifelse(b2$status=='San',1,0) And b2$UGT <- ifelse(b2$status=='UGT',1,0) b2$KOM <- ifelse(b2$status=='KOM',1,0) But, as one from this forum told me, it doesn't work because the words is in a wrong format or something like that. I have attached the text-file i've used, and the R-kode. Hope anyone can he...
2005 Apr 11
0
smbd process hangs up - XP login problems
...twork places", close session and try to log on to the domain again it works! Are these two problems related to each other? Is problem #1 a bug? How can I get to log in at the first try? Thank you for reading this. -- ============================== Felipe Mart?nez Hermo felipe@galicia.ugt.org fmartinez@galicia.ugt.org ============================== Servicios Inform?ticos UGT Galicia informatica@galicia.ugt.org ==============================
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 i10 %a } Changed into: define i10 @mod_N(i10 zeroext %a) ze...
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 after call that guarantees non-null? br i1 %null_check, label %t, label %f t: ret i1 1 f: ret i1 %d } $ opt -inline nonnull.ll -S ... define i1 @foo(i32* %...
2017 May 19
4
memcmp code fragment
...n 1 %idxprom1 = zext i32 %i2 to i64 %arrayidx2 = getelementptr inbounds i8, i8* %block, i64 %idxprom1 %1 = load i8, i8* %arrayidx2, align 1 %cmp = icmp eq i8 %0, %1 br i1 %cmp, label %if.end, label %if.then if.then: ; preds = %entry %cmp7 = icmp ugt i8 %0, %1 br label %return if.end: ; preds = %entry %inc = add i32 %i1, 1 %inc10 = add i32 %i2, 1 %idxprom11 = zext i32 %inc to i64 %arrayidx12 = getelementptr inbounds i8, i8* %block, i64 %idxprom11 %2 = load i8, i8* %arrayidx12, align 1 %id...
2017 Dec 19
4
A code layout related side-effect introduced by rL318299
...adnone returned %p3) local_unnamed_addr #3 { entry: br label %while.cond while.cond: ; preds = %while.body, %entry %h.addr.0 = phi i8* [ %h, %entry ], [ %add.ptr4, %while.body ] %d.addr.0 = phi i8* [ %d, %entry ], [ %add.ptr3, %while.body ] %cmp = icmp ugt i8* %h.addr.0, @i br i1 %cmp, label %while.end, label %while.body while.body: ; preds = %while.cond %0 = bitcast i8* %d.addr.0 to i64* %1 = load i64, i64* %0, align 1 %2 = bitcast i8* %h.addr.0 to i64* store i64 %1, i64* %2, align 1 %add.ptr = gete...
2017 Dec 19
2
A code layout related side-effect introduced by rL318299
...br label %while.cond >> >> while.cond: ; preds = %while.body, >> %entry >> %h.addr.0 = phi i8* [ %h, %entry ], [ %add.ptr4, %while.body ] >> %d.addr.0 = phi i8* [ %d, %entry ], [ %add.ptr3, %while.body ] >> %cmp = icmp ugt i8* %h.addr.0, @i >> br i1 %cmp, label %while.end, label %while.body >> >> while.body: ; preds = %while.cond >> %0 = bitcast i8* %d.addr.0 to i64* >> %1 = load i64, i64* %0, align 1 >> %2 = bitcast i8* %h.addr.0 to i6...
2008 Jan 22
0
[LLVMdev] [llvm-commits] a question about type conversion propagation and elimination
...le, if I add the datalayout string for x86-32 darwin: target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32- i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64- f80:128:128" Instcombine produces: define i8* @tag_on(i8* %ptr, i8* %end, i8 %tag) { Entry: icmp ugt i8* %end, %ptr ; <i1>:0 [#uses=1] br i1 %0, label %B1, label %B2 B1: ; preds = %Entry store i8 1, i8* %ptr %ctg2 = getelementptr i8* %ptr, i32 1 ; <i8*> [#uses=1] br label %B2 B2: ; preds = %B1, %Entry %eax.0.in = phi i8* [ %ctg2, %B1 ], [ %ptr, %Entry ] ; <i8*> [#uses...
2016 Dec 14
0
analysis based on nonnull attribute
...t; attribute? Yes. We're guaranteeing that we never pass a null value for the argument, so that information can be used to optimize the caller as well. > 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 after call that > guarantees non-null? > br i1 %null_check, label %t, label %f > t: > ret i1 1 > f: > ret i1 %d > } > $...