search for: setgt

Displaying 20 results from an estimated 55 matches for "setgt".

Did you mean: setdt
2002 Sep 27
3
[LLVMdev] setCC
what's the semantics for setCC if one of the operands is NULL pointer? %ptr=alloc int seteq int*, %pt, NULL what's the result for the second instruction? How about setne, setlt, setgt, setle, and setge? Thanks! Jianzhong
2012 Oct 19
2
[LLVMdev] interesting minor llvm optimizer flaw
...e CPU16Regs:$lhs, immZExt16:$rhs), (XorRxRxRy16 (SltiCCRxImmX16 CPU16Regs:$lhs, immZExt16:$rhs), (LiRxImmX16 1))>; I was able to work around this boundary case by doing the reverse transformation at the boundary. i..e. z = (x > (k-1)) => z = (x >= k) def: Mips16Pat <(setgt CPU16Regs:$lhs, -32769), (XorRxRxRy16 (SltiCCRxImmX16 CPU16Regs:$lhs, -32768), (LiRxImmX16 1))>;
2016 Jun 02
4
Lowering For Loops to use architecture "loop" instruction
Hi, I'm working on project which involves writing a backend for a hypothetical architecture. I am currently trying to figure out the best way to translate for loops to use a specialized "loop" instruction the architecture supports. The instruction is similar X86's loop instruction, where a register is automatically decremented and the condition is automatically checked to see if
2007 Jan 29
2
[LLVMdev] A question about GetElementPtr common subexpression elimination/loop invariant code motion
...4 = load int* %tmp13 ; <int> [#uses=1] %tmp15 = xor int %tmp14, %tmp6 ; <int> [#uses=1] %tmp17 = add int %tmp15, %sum.0.4 ; <int> [#uses=4] %tmp19 = add int %k.2.4, 1 ; <int> [#uses=2] %tmp13 = setgt int %tmp19, 6 ; <bool> [#uses=1] br bool %tmp13, label %bb22, label %cond_true bb22: ; preds = %cond_true %tmp24 = add int %j.1.2.ph, 1 ; <int> [#uses=2] %tmp2719 = setgt int %tmp24, 6 ; <bool> [#uses=1] br b...
2004 May 09
2
[LLVMdev] Strange SetCond Behavior
Before I file a bug, I thought I'd check to make sure something hasn't changed. Stacker used to work in 1.2, now it fails on six tests. All six tests pertain to use of the SetLT, SetGT, SetLE, and SetGE SetCondInst. In my test programs they all fail, regardless of the values. The *only* thing I've done to Stacker is to change the base type involved in the comparison from int to long. Is there something "different" about the comparison of longs? The code generated...
2004 Apr 08
3
[LLVMdev] Code documentation
...ther than produced by doxygen? The reason I'm asking is that doxygen docs are (1) not very complete at the moment, as lot of classes don't even have a description (2) is generally not the best way to get high-level view of a big codebase. As an example, consider this code: %tmp.1 = setgt int %i, 0 br bool %tmp.1, label %then.0, label %else.0 It appears that Value* that corresponds to the %tmp.1 operand of the second instruction is actually a pointer to Instruction* which represents the first instruction. This looks a nice design, given that all code is in SSA, but I've...
2003 Sep 08
1
[LLVMdev] Induction Variables
...semi-pass"? I have tested it out on spec benchmarks, and while it does correctly identify some of the variables, it fails to recognize most. Typically the following scenario arises a_loop: ... %tmp.19 = load int* %bsLive %tmp.20 = add int %tmp.19, -8 store int %tmp.20, int* %bsLive %tmp.5 = setgt int %tmp.20, 0 br bool %tmp.5, label a_loop, label a_exit a_exit: Is there any way to force this variable to stay in a register, such that it is handled with a phi node, and recognized by the InductionVariable class? Thanks, Dave
2004 May 09
0
[LLVMdev] Strange SetCond Behavior
On Sun, 9 May 2004, Reid Spencer wrote: > Before I file a bug, I thought I'd check to make sure something hasn't > changed. Stacker used to work in 1.2, now it fails on six tests. All six > tests pertain to use of the SetLT, SetGT, SetLE, and SetGE SetCondInst. > In my test programs they all fail, regardless of the values. > > The *only* thing I've done to Stacker is to change the base type > involved in the comparison from int to long. Is there something > "different" about the comparison of lon...
2007 Jul 04
1
[LLVMdev] a strange emit of llvm-g++
...---------------------------------------------------------- LLVM assembly was emitted out as follows: ------------------------------------------------------------- void %_Z6f_loopPll(int* %c, int %sz) { entry: %sz = cast int %sz to uint ; <uint> [#uses=1] %tmp18 = setgt int %sz, 0 ; <bool> [#uses=1] ... ... ... ------------------------------------------------------------- The function name is strange.. Hmmm... llvm-gcc emitted normally as shown like this: ------------------------------------------------------------- void %f_loop(int* %c, int %...
2007 Feb 05
1
[LLVMdev] Misc optimization issue
...duleID = '/tmp/webcompile/_24843_0.bc' target datalayout = "e-p:32:32" target endian = little target pointersize = 32 target triple = "i686-pc-linux-gnu" implementation ; Functions: int %ltst(int %x) { entry: %x = cast int %x to uint ; <uint> [#uses=1] %tmp13 = setgt int %x, 0 ; <bool> [#uses=1] br bool %tmp13, label %bb, label %bb7 bb: ; preds = %bb, %entry %indvar = phi uint [ 0, %entry ], [ %indvar.next, %bb ] ; <uint> [#uses=2] %i.0.0 = cast uint %indvar to int ; <int> [#uses...
2005 Apr 14
1
[LLVMdev] Variables and/or identifiers?
...ing C-like language snippet: int f() { int i = rand(); if(i > 5) i = 1; return i; } Ignoring optimizations, what should I use to represent 'i'? Online demo gives the following output for the above code: int %_Z1fv() { entry: %tmp.0 = call int %rand( ); <int> [#uses=2] %tmp.2 = setgt int %tmp.0, 5; <bool> [#uses=1] %retval = select bool %tmp.2, int 1, int %tmp.0; <int> [#uses=1] ret int %retval } but this is optimized, 'i' (tmp.0) is never reassigned a value. It looks like no matter how convoluted I get, I can't fool the optimizier :) It seems to me tha...
2005 Jun 09
1
[LLVMdev] gmake check failures on FreeBSD 5.4
...#uses=1] %Y = cast sbyte %SB to int ; <int> [#uses=1] %Y = cast ubyte %SB to uint ; <uint> [#uses=1] %Y = cast ubyte %SB to int ; <int> [#uses=1] FAIL: /usr/home/jeffc/llvm/obj/../test/Regression/Transforms/InstCombine/JavaCompare.ll: %c1 = setgt int %A, %B ; <bool> [#uses=1] %tmp = cast bool %c1 to int ; <int> [#uses=1] %c2 = setlt int %A, %B ; <bool> [#uses=1] %c31 = setlt int %tmp, 1 ; <bool> [#uses=1] %c3 = or bool %c2, %c31 ; <bool> [#uses=1] FAIL: /usr/...
2004 Mar 31
0
[LLVMdev] A question about induction variables
...l void %__main( ) br label %no_exit no_exit: ; preds = %entry, %no_exit %i.0.0 = phi int [ 0, %entry ], [ %inc, %no_exit ] %r.0.0 = phi int [ 0, %entry ], [ %tmp.4, %no_exit ] %tmp.4 = add int %r.0.0, %i.0.0 ; <int> [#uses=2] %inc = add int %i.0.0, 1 ; <int> [#uses=2] %tmp.1 = setgt int %inc, 99 ; <bool> [#uses=1] br bool %tmp.1, label %loopexit, label %no_exit loopexit: ; preds = %no_exit ret int %tmp.4 } > I compile it and then run: > analyze -indvars x.bc > which prints: > Printing analysis 'Induction Variable Analysis' for function ...
2004 Mar 31
2
[LLVMdev] A question about induction variables
Hello, I've just downloaded the latest release of LLVM, and playing with the following simple example: int main() { int r(0); for (int i = 0; i < 100; ++i) r += i; ; return r; } I compile it and then run: analyze -indvars x.bc which prints: Printing analysis 'Induction Variable Analysis' for function 'main': and nothing else. It is a
2004 Apr 22
0
[LLVMdev] Motivation for 'select' instruction
...tion. However, the LLVM code: > > int %logsch(int %ih, int %nbh) { > entry: > %tmp.1 = setlt int %nbh, 0 > %ih_addr.1 = select bool %tmp.1, int 10, int %ih > %nbh_addr.1 = select bool %tmp.1, int 0, int %nbh > %tmp.4 = setgt int %nbh_addr.1, 22528 > %ih_addr.0 = select bool %tmp.4, int 7, int %ih_addr.1 > %nbh_addr.0 = select bool %tmp.4, int 22528, int %nbh_addr.1 > %tmp.8 = add int %nbh_addr.0, %ih_addr.0 > ret int %tmp.8 > } > > Has 'se...
2004 Apr 22
2
[LLVMdev] Motivation for 'select' instruction
...> > > int %logsch(int %ih, int %nbh) { > > entry: > > %tmp.1 = setlt int %nbh, 0 > > %ih_addr.1 = select bool %tmp.1, int 10, int %ih > > %nbh_addr.1 = select bool %tmp.1, int 0, int %nbh > > %tmp.4 = setgt int %nbh_addr.1, 22528 > > %ih_addr.0 = select bool %tmp.4, int 7, int %ih_addr.1 > > %nbh_addr.0 = select bool %tmp.4, int 22528, int %nbh_addr.1 > > %tmp.8 = add int %nbh_addr.0, %ih_addr.0 > > ret int %tmp.8 > >...
2004 Apr 22
2
[LLVMdev] Motivation for 'select' instruction
Hello, I'm wondering what was the original motivaton for the 'select' instruction. Was it for convenience, or for some deep reason. I'm asking because it's causing me some problems (see below) and I'd like to know I understand the situation before working those problems around. I have the following function: int logsch(int ih,int nbh) { if(nbh < 0)
2006 Mar 16
2
[LLVMdev] Stupid '-load-vn -licm' question (LLVM 1.6)
...%next = getelementptr ubyte* %iter, int 1 ; <ubyte*> [#uses=1] br label %loop_test loop_test: ; preds = %loop_step, %entry %iter = phi ubyte* [ %begin, %entry ], [ %next, % loop_step ] ; <ubyte*> [#uses=4] %done = setgt ubyte* %iter, %scan_end ; <bool> [#uses=1] br bool %done, label %ret_false, label %regex6 ret_true: ; preds = %regex2, %regex6 ret bool true ret_false: ; preds = %loop_test ret bool false }
2018 Jul 03
2
Question about canonicalizing cmp+select
...sext+add into shift+or? I think the > answer is 'yes'. We probably should add that fold. This seems like a > similar case as the recent: https://reviews.llvm.org/D48466 > > Note that on x86, the sext+add becomes zext+sub: > t20: i8 = setcc t3, Constant:i16<-1>, setgt:ch > t24: i16 = zero_extend t20 > t17: i16 = sub Constant:i16<5>, t24 > > Would that transform help your target? > > On Tue, Jul 3, 2018 at 3:55 PM, Yuan Lin <yualin at google.com> wrote: > >> Hi, Roman and Sanjay, >> >> Thank you for y...
2005 Apr 25
5
[LLVMdev] "Best" alias analysis algorithm
Hello, I'm playing with alias analysis, using the following program: %i = external global int ; <int*> [#uses=2] implementation ; Functions: int %_Z3bari(int %p) { entry: %tmp.0 = load int* %i ; <int> [#uses=1] %tmp.1 = setgt int %tmp.0, 10 ; <bool> [#uses=1] br bool %tmp.1, label %then, label %UnifiedReturnBlock then: ; preds = %entry %tmp.3 = add int %p, 2 ; <int> [#uses=1] ret int %tmp.3 UnifiedReturnBlock: ; preds = %entry ret int 0 } int %_Z3fooi(in...