run asyncify after legalization, so that it won't create more illegal things that might not be handleable
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp
index cb0a596..86c17f5 100644
--- a/lib/Target/JSBackend/JSBackend.cpp
+++ b/lib/Target/JSBackend/JSBackend.cpp
@@ -4299,9 +4299,6 @@
 
     PM.add(createExpandCtorsPass());
 
-    if (EnableEmAsyncify)
-      PM.add(createLowerEmAsyncifyPass());
-
     // ExpandStructRegs must be run after ExpandArithWithOverflow to expand out
     // the insertvalue instructions that ExpandArithWithOverflow introduces.
     PM.add(createExpandArithWithOverflowPass());
@@ -4356,6 +4353,10 @@
   }
   // end PNaCl legalization
 
+  if (EnableEmAsyncify) {
+    PM.add(createLowerEmAsyncifyPass());
+  }
+
   PM.add(createExpandInsertExtractElementPass());
 
   if (!OnlyWebAssembly) {