<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 4, 2017, at 12:27 PM, James Y Knight via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 4, 2017 at 2:12 PM, Matthias Braun <span dir="ltr" class=""><<a href="mailto:matze@braunis.de" target="_blank" class="">matze@braunis.de</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">- The register allocator fails when the terminator instruction also writes a register which is subsequently spilled (none of the existing targets does that, but you could specify this situation in inline assembly).<br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">You can't actually have outputs from an asm goto in the GCC implementation (and I'd suggest leaving that restriction in the LLVM implementation too if it makes the implementation easier).</div><div class=""><br class=""></div><div class="">From <a href="https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/Extended-Asm.html" class="">GCC docs</a>:</div><div class="">"This form of asm is restricted to not have outputs. This is due to a internal restriction in the compiler that control transfer instructions cannot have outputs. This restriction on asm goto may be lifted in some future version of the compiler. In the meantime, asm goto may include a memory clobber, and so leave outputs in memory."</div></div></div></div></div></blockquote>Ah that is convenient :)</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class="">You can still have register clobbers, which I suppose might trigger the same failure case?</div></div></div></div></div></blockquote><div>clobbers are less of a problem as there is no reason to spill a register that is just clobbered by a regmask.</div><div><br class=""></div><div>- Matthias</div></div></body></html>