search for: createlshr

Displaying 6 results from an estimated 6 matches for "createlshr".

2015 Sep 25
2
Upper 32bits from 64bit value
Hi, I need to fetch lower and higher 32bits from 64bit value. I found "CreateLShr" function to fetch lower 32bits, llvm::Value *intermediateValue = LLVMIRBuilder->CreateLShr(x64BitValue, 32); What function I need to use for fetching upper 32bits from 64bit value. Thanks in advance, Deep -------------- next part -------------- An HTML attachment was scrubbed... URL: &lt...
2008 Jul 01
2
[LLVMdev] vmkit on x86_64
...Int(); Value* val1 = popAsInt(); Value* mask = ConstantInt::get(Type::Int32Ty, 0x1F); - val2 = BinaryOperator::CreateAnd(val2, mask, "", currentBlock); + val2 = BinaryOperator::createAnd(val2, mask, "", currentBlock); push(BinaryOperator::createLShr(val1, val2, "", currentBlock), AssessorDesc::dInt); break; @@ -1017,7 +1017,7 @@ case LUSHR : { Value* val2 = new ZExtInst(pop(), Type::Int64Ty, "", currentBlock); Value* mask = ConstantInt::get(Type::Int64Ty, 0x3F); - val2...
2008 Jul 01
0
[LLVMdev] vmkit on x86_64
...e* val1 = popAsInt(); > Value* mask = ConstantInt::get(Type::Int32Ty, 0x1F); > - val2 = BinaryOperator::CreateAnd(val2, mask, "", currentBlock); > + val2 = BinaryOperator::createAnd(val2, mask, "", currentBlock); > push(BinaryOperator::createLShr(val1, val2, "", currentBlock), > AssessorDesc::dInt); > break; > @@ -1017,7 +1017,7 @@ > case LUSHR : { > Value* val2 = new ZExtInst(pop(), Type::Int64Ty, "", currentBlock); > Value* mask = ConstantInt::get(Type::...
2012 Jul 31
0
[LLVMdev] rotate
Oh, no. I should have been more clear. The patch was not rejected, just lost in the daily shuffle. I already have my employer's approval to send this upstream, so I will prepare a patch against trunk this morning. > I proposed a similar patch to LLVM (left circular shift) around 10/2011. > > Parts of my patch did make it into trunk about a year after, but others > > did not.
2012 Jul 31
4
[LLVMdev] rotate
On Monday, July 30, 2012 12:16 AM, Cameron McInally wrote: > Hey Andy, > > I proposed a similar patch to LLVM (left circular shift) around 10/2011. > Parts of my patch did make it into trunk about a year after, but others > did not. > > At that time, my solution was to add a binary operator to the IRBuilder, > since LCS fits in nicely with the other shift operators. But,
2012 Jul 31
3
[LLVMdev] rotate
...tant *C, Type *Ty); static Constant *getSExt (Constant *C, Type *Ty); Index: include/llvm/IRBuilder.h =================================================================== --- include/llvm/IRBuilder.h (revision 161045) +++ include/llvm/IRBuilder.h (working copy) @@ -691,6 +691,19 @@ return CreateLShr(LHS, ConstantInt::get(LHS->getType(), RHS), Name,isExact); } + Value *CreateCShl(Value *LHS, Value *RHS, const Twine &Name = "") { + if (Constant *LC = dyn_cast<Constant>(LHS)) + if (Constant *RC = dyn_cast<Constant>(RHS)) + return Insert(Folder.Cre...