[LLVMdev] Crash in CreateShl() method

Rasha Omar rasha.sala7 at gmail.com
Wed Aug 21 23:31:00 PDT 2013


Hi All,


AllocaInst * AI = builder.CreateAlloca(type, 0, BBName);
StoreInst* ST=  builderTF.CreateStore(ConstantInt::get(type,1),AI);
Value * Vresult = (Value*)ST;
Vresult = builderWait.CreateShl(Vresult, 1);

I need to make one bit shift left to the variable stored in the second step

I've got crash in this step

opt: /home/xx/llvm2/llvm/include/llvm/Support/Casting.h:237: typename
enable_if<is_same<Y, typename simplify_type<Y>::SimpleType>, typename
cast_retty<X, Y
*>::ret_type>::type llvm::cast(Y *) [X = llvm::IntegerType, Y =
llvm::Type]: Assertion
`isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.

How could this crash be fixed?

Thanks in advance





-- 
*     Rasha Salah Omar
     Msc Student at E-JUST
     Demonestrator  at Faculty of Computers and Informatics
     Benha University*

*     e-mail: rasha.omar at ejust.edu.eg*
 P* Please consider the environment before printing this email.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130822/3133b4aa/attachment.html>


More information about the llvm-dev mailing list