<div dir="ltr">Not yet. On trunk, wasm is running the BranchFolding pass which invalidates liveness before this pass runs and so the problem never gets triggered. I'm experimenting with requiring passes to opt-in to support virtual registers (so I disabled BranchFolding) and got the problem. I'm planning to post to llvm-dev shortly with more on that.</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 13, 2016 at 1:54 PM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 13, 2016 at 9:10 AM, Derek Schuff via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@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">Author: dschuff<br>
Date: Wed Jan 13 11:10:28 2016<br>
New Revision: 257620<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=257620&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=257620&view=rev</a><br>
Log:<br>
[WebAssemly] Invalidate liveness in CFG stackifier<br>
<br>
WebAssemblyCFGStackify does not track liveness for EXPR_STACK, causing<br>
verifier failure if liveness has not already been invalidated.<br></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br>Got a test for this?</div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified:<br>
    llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp<br>
<br>
Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp?rev=257620&r1=257619&r2=257620&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp?rev=257620&r1=257619&r2=257620&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp (original)<br>
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp Wed Jan 13 11:10:28 2016<br>
@@ -34,6 +34,7 @@<br>
 #include "llvm/CodeGen/MachineFunction.h"<br>
 #include "llvm/CodeGen/MachineInstrBuilder.h"<br>
 #include "llvm/CodeGen/MachineLoopInfo.h"<br>
+#include "llvm/CodeGen/MachineRegisterInfo.h"<br>
 #include "llvm/CodeGen/Passes.h"<br>
 #include "llvm/Support/Debug.h"<br>
 #include "llvm/Support/raw_ostream.h"<br>
@@ -475,7 +476,9 @@ bool WebAssemblyCFGStackify::runOnMachin<br>
<br>
   const auto &MLI = getAnalysis<MachineLoopInfo>();<br>
   auto &MDT = getAnalysis<MachineDominatorTree>();<br>
+  // Liveness is not tracked for EXPR_STACK physreg.<br>
   const auto &TII = *MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();<br>
+  MF.getRegInfo().invalidateLiveness();<br>
<br>
   // RPO sorting needs all loops to be single-entry.<br>
   EliminateMultipleEntryLoops(MF, MLI);<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div></div></blockquote></div>