search for: icmp_sl

Displaying 10 results from an estimated 10 matches for "icmp_sl".

Did you mean: icmp_sle
2010 Feb 12
2
[LLVMdev] [PATCH] Fix off-by-one errors in the doxygen documentation
...ICMP_UGT = 34, /// unsigned greater than - ICMP_UGE = 35, /// unsigned greater or equal - ICMP_ULT = 36, /// unsigned less than - ICMP_ULE = 37, /// unsigned less or equal - ICMP_SGT = 38, /// signed greater than - ICMP_SGE = 39, /// signed greater or equal - ICMP_SLT = 40, /// signed less than - ICMP_SLE = 41, /// signed less or equal + ICMP_EQ = 32, ///< equal + ICMP_NE = 33, ///< not equal + ICMP_UGT = 34, ///< unsigned greater than + ICMP_UGE = 35, ///< unsigned greater or equal + ICMP_ULT = 36, ///< u...
2007 Nov 26
1
[LLVMdev] How to declare and use sprintf
...t bb = builder_at_end (entry_block fibf) in let n = param fibf 0 in let retbb = append_block "return" fibf in let retb = builder_at_end retbb in let recursebb = append_block "recurse" fibf in let recurseb = builder_at_end recursebb in let ( <= ) f g = build_icmp Icmp_sle f g "cond" bb in build_cond_br (n <= int 2) retbb recursebb bb |> ignore; return retb (int 1); let apply f xs = build_call f xs "apply" recurseb in let ( +: ) f g = build_add f g "add" recurseb in let ( -: ) f g = build_sub f g "sub" recurs...
2007 Nov 25
2
[LLVMdev] Fibonacci example in OCaml
...let argx = param fibf 0 in set_value_name "AnArg" argx; let retbb = append_block "return" fibf in let retb = builder_at_end retbb in let recursebb = append_block "recurse" fibf in let recurseb = builder_at_end recursebb in let condinst = build_icmp Icmp_sle argx two "cond" bb in ignore(build_cond_br condinst retbb recursebb bb); ignore(build_ret one retb); let sub = build_sub argx one "arg" recurseb in let callfibx1 = build_call fibf [|sub|] "fibx1" recurseb in let sub = build_sub argx two "arg&quot...
2007 Nov 26
0
[LLVMdev] How to declare and use sprintf
On Nov 25, 2007, at 18:53, Jon Harrop wrote: > So my Fib program is segfaulting and I'm not sure why. I think it > might be because my declaration and use of sprintf is wrong. > > I notice llvm-gcc produces declarations containing "..." like: > > declare int %printf(sbyte*, ...) > > What is the correct way to do this? The type you want is: let sp =
2016 Feb 07
3
[PATCH] strlen -> strnlen optimization
...; + + if (RHS == CI) + IC->swapOperands(); + + switch (IC->getPredicate()) { + case ICmpInst::ICMP_EQ: + case ICmpInst::ICMP_NE: + case ICmpInst::ICMP_UGT: + case ICmpInst::ICMP_UGE: + case ICmpInst::ICMP_ULE: + case ICmpInst::ICMP_SGT: + case ICmpInst::ICMP_SGE: + case ICmpInst::ICMP_SLE: + // XXX: check for wrapping + if (con_val == UINT64_MAX) + return nullptr; + return emitStrNLen(Src, ConstantInt::get(SizeType, con_val + 1), + B, DL, TLI); + case ICmpInst::ICMP_ULT: + case ICmpInst::ICMP_SLT: + return emitStrNLen(Src, Con, + B, DL, TLI); + default...
2007 Nov 25
2
[LLVMdev] How to declare and use sprintf
So my Fib program is segfaulting and I'm not sure why. I think it might be because my declaration and use of sprintf is wrong. I notice llvm-gcc produces declarations containing "..." like: declare int %printf(sbyte*, ...) but I'm not sure how to do this so I've used: let sprintf = declare_function "sprintf" (function_type (pointer_type
2007 Nov 26
0
[LLVMdev] Fibonacci example in OCaml
...i32_type n, state | Var x -> find state x, state | BinOp(op, f, g) -> let f, state = expr state f in let g, state = expr state g in let build, name = match op with | `Add -> build_add, "add" | `Sub -> build_sub, "sub" | `Leq -> build_icmp Icmp_sle, "leq" in build f g name (bb state), state | If(p, t, f) -> let t_blk = new_block state "pass" in let f_blk = new_block state "fail" in let k_blk = new_block state "cont" in let cond, state = expr state p in build_con...
2012 Dec 12
0
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
On Wed, Dec 12, 2012 at 1:26 PM, Joerg Sonnenberger <joerg at britannica.bec.de> wrote: > On Wed, Dec 12, 2012 at 11:01:01AM -0800, Dan Gohman wrote: >> > Is that >> > assumption violated if I explicitly cast away const and pass the result >> > to a function with NoAlias argument? >> >> Not immediately, no. It means that you can't access the
2012 Dec 12
3
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
On Wed, Dec 12, 2012 at 11:01:01AM -0800, Dan Gohman wrote: > > Is that > > assumption violated if I explicitly cast away const and pass the result > > to a function with NoAlias argument? > > Not immediately, no. It means that you can't access the constant > pointer's pointee directly within the noalias argument's scope. Access > to that object must go
2013 Jan 15
2
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
...onstant null is on the right. - if (llvm::isKnownNonNull(LHSPtr) && isa<ConstantPointerNull>(RHSPtr)) { - if (Pred == CmpInst::ICMP_EQ) + if (LHSPtr == RHSPtr) { + switch (Predicate) { + case ICmpInst::ICMP_EQ: + case ICmpInst::ICMP_UGE: + case ICmpInst::ICMP_SLE: + return ConstantInt::get(ITy, true); + case ICmpInst::ICMP_NE: + case ICmpInst::ICMP_UGT: + case ICmpInst::ICMP_SLT: return ConstantInt::get(ITy, false); - else if (Pred == CmpInst::ICMP_NE) - return ConstantInt::get(ITy, true); + default: +...