<div dir="ltr">Hello all,<br><br>I have a question related to noduplicate attribute.<br><br>For example, if I have the following source code:<br><br>__attribute__((noduplicate)) __attribute__((always_inline)) void wait () {<br>    // some code<br>    barrier();<br>    // some code<br>}<br><br>__attribute__((noduplicate)) void barrier ();<br><br>void f () {<br>    // some code<br>    wait();<br>    // some code<br>}<br><br>Sometimes I observed a phenomenon that SimplifyCFGPass would transform function f to:<br><br>void f () {<br>    // some code<br>    wait();<div>    // some code<br>critedge:</div><div>    // some code<br>    wait();<br>    // some code<br>}<br><br>After the execution of AlwaysInliner, the function f would be:<br><br>void f () {<br>    // some code<br>    barrier();</div><div>    // some code<br>critedge:<br>    // some code<br></div><div>    barrier();<br>    // some code<br>}<br><br>It seems that barrier call is duplicated in function f. I am wondering whether it is a bug of LLVM. Should we add noduplicate attribute on the function which contains a noduplicate function call?<br><br>Thanks.</div></div>