<div>hello,</div><div><br></div><div>I want to change the following IR:<br></div><div>  %2 = tail call i16 @llvm.nvvm.read.ptx.sreg.tid.x() #2<br>  %add = add i16 %mul6, %2</div><div>to <br></div><div><div>  %2 = tail call i16v @llvm.nvvm.read.ptx.sreg.tid.x() #2<br>(i16v)%add = add i16 %mul6, (i16v)%2     //Here keep %mul6 i16 as it is.</div><div><br></div><div>I'm not familar with LLVM IR API, it's not easy to get the type and change it right away. Seems need to create a new IR and replace the old one? <br></div><div>But it's also hard to CreateCall() or CreateAdd(), hard to get the original IR's info to fill in those CreateXXX parameter. <br></div><div><br></div><div>Any ideas or reference code?</div><div>How to learn LLVM IR API quickly?</div><div><br></div><div>--</div><div>Best Regards</div><div>Celine<br></div><div><br></div></div>