<div dir="ltr">I think we may already support it. At least that's the implication from the post-commit thread of r288093, in particular this reply from Reid <a href="https://www.mail-archive.com/cfe-commits@lists.llvm.org/msg43592.html">https://www.mail-archive.com/cfe-commits@lists.llvm.org/msg43592.html</a><div><br></div><div>Do you have a test case?<br><div><br></div><div>-- Sean Silva</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 4, 2017 at 10:30 PM, Andrew Kelley via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>from <a href="https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html" target="_blank">https://gcc.gnu.org/<wbr>onlinedocs/gcc/Extended-Asm.<wbr>html</a></div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Under certain circumstances, GCC may duplicate (or remove duplicates of) your assembly code when optimizing. This can lead to unexpected duplicate symbol errors during compilation if your asm code defines symbols or labels. Using ‘%=’ (see AssemblerTemplate) may help resolve this problem.</blockquote><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">‘%=’<br>Outputs a number that is unique to each instance of the asm statement in the entire compilation. This option is useful when creating local labels and referring to them multiple times in a single template that generates multiple assembler instructions. </blockquote></div><div><br></div></div><div><br></div><div>I tried to implement %= in my front-end but I ran into this problem with the optimizer. So in order to have this feature, LLVM would need to support it in the IR language.</div><div><br></div><div>As far as I can tell, Clang does not support this feature. Is it a reasonable feature request?</div><div><br></div><div>Regards,</div><div>Andrew</div></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>