<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Tingyuan,</p>
<blockquote type="cite" cite="mid:HK0PR01MB2466F98A0339834E61D89D30EC1F0@HK0PR01MB2466.apcprd01.prod.exchangelabs.com">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
    For example,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
             call void @_Z2f2PA100_i([100 x i32]* nonnull %arraydecay)<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
    If I use getNumOperands(), it will return 2.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
    However, if I use getCalledFunction()->getNumParams(), it will return 1.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
    According to the IR, I think the number of operands of the call instruction should be 1.</div>
</blockquote>
<p>I think you'll find that the first operand of the 'call' instruction is the callee (the function being called) itself. So two operands makes sense in your case: one callee and one parameter.</p>
<p>/ Bevin<br>
</p>
</body>
</html>