<div dir="ltr">Hi all,<div><br></div><div>Usually if we want to get the called Function we can directly use CallInst->getCalledFunction(), however, today i encounter an unusual CallInst as follows:</div><div><br></div><div> %call11 = call double (...)* bitcast (double ()* @quantum_frand to double (...)*)()<br></div><div><br></div><div>the original C source involve type cast:</div><div><br></div><div>float u,v;<br></div><div>extern double quantum_frand();<br></div><div><div><span class="" style="white-space:pre">   </span>    u = 2 * quantum_frand() - 1;</div><div><span class="" style="white-space:pre"> </span>    v = 2 * quantum_frand() - 1;</div></div><div><br></div><div>In this case, CallInst->getCalledFunction() returns a nullptr unusually, I printed out the getOperand(0) and found the operand is the whole thing of  "double (...)* bitcast (double ()* @quantum_frand to double (...)*)()". Any member function calling on that fails so i don't know whether there is an efficient way to exactly get the called function @quantum_frand(...) here? Thanks!</div><div><br></div><div><br></div><div>Best regards,</div><div><br></div><div>Shen</div><div><br></div><div><br></div><div><br></div></div>