<div dir="ltr"><div>Dear,<br><br></div>I have defined an intrinsic in IntrinsicsX86.td and want to insert this intrinsic in a basic block of IR.<br><br> Module* mod = new Module("test", getGlobalContext());<br> BasicBlock* block = BasicBlock::Create(getGlobalContext(), "entry", temp);<br>
 IRBuilder<> builder(block);<br clear="all"><div><div> std::vector<Type *> arg_type;<br> arg_type.push_back(IntegerType::get(getGlobalContext(),32));<br> arg_type.push_back(IntegerType::get(getGlobalContext(),32));<br>
  <br>  Function *fun = Intrinsic::getDeclaration(mod, Intrinsic::int_x86_addenc_32,arg_type);<br>  Value *recurCall1 = builder.CreateCall2(fun,arg_type[0],arg_type[1]);<br><br><br></div><div>The int_addenc_32 instrinsic takes in 2 i32 and returns 1 i32. There is some problem in the last two lines of my code and I am able to figure it out.<br>
</div><div>Any help would be appreciated.<br><br></div><div>Thanks!<br></div><div><br>-- <br>Pratik<div><br></div>
</div></div></div>