<div dir="ltr"><div>Hey everyone,</div><div>I was looking into how the global optimization pass fares against things like what's reported in <a href="https://bugs.llvm.org/show_bug.cgi?id=44676">https://bugs.llvm.org/show_bug.cgi?id=44676</a></div><div>Looking at this, I think it would be pretty trivial to optimize that down given that there are already threading assumptions made: <a href="https://godbolt.org/z/u6ZqoB">https://godbolt.org/z/u6ZqoB</a><br></div><div>Is this something I can look into? Another thing is that currently *all* external calls break this optimization, including calls to intrinsics that probably shouldn't: <a href="https://godbolt.org/z/pK7Cew">https://godbolt.org/z/pK7Cew</a></div><div>Maybe add some sort of way (i.e. an attribute) to mark that a call can be optimized through in this way?<br></div></div>