<div dir="ltr">Hello,<div><br></div><div>Code: <a href="https://godbolt.org/g/EG4Wi6">https://godbolt.org/g/EG4Wi6</a></div><div><br></div><div><div style="color:rgb(0,0,0);background-color:rgb(255,255,254)"><div><span style="color:rgb(0,0,255)">unsigned</span> fff3(<span style="color:rgb(0,0,255)">void</span>) {</div><div>    <span style="color:rgb(0,0,255)">    char</span> buf[<span style="color:rgb(9,136,90)">10</span>] = <span style="color:rgb(163,21,21)">""</span>;</div><div>    <span style="color:rgb(0,0,255)">    return</span> strlen(buf);</div><div>}</div><div><br></div></div></div><div>Since we are memset-ing before strlen call, we could replace strlen with just 0.</div><div><br></div><div>Has LLVM any API to get "last instruction before strlen" which modifies strlen argument "buf"? So we can check "yes, it is memset there, replace strlen with zero" ?</div><div><br></div><div><br></div><div>Thanks</div></div>