Suspend check fix

Change-Id: I7c8c3a66b4d9be863804d53d8a6d9d2f7a71b8c0
diff --git a/src/compiler/codegen/arm/Thumb2/Gen.cc b/src/compiler/codegen/arm/Thumb2/Gen.cc
index e729b51..4d95c52 100644
--- a/src/compiler/codegen/arm/Thumb2/Gen.cc
+++ b/src/compiler/codegen/arm/Thumb2/Gen.cc
@@ -1696,8 +1696,25 @@
                  OFFSETOF_MEMBER(Thread, pCheckSuspendFromCode), rLR);
     genRegCopy(cUnit, r0, rSELF);
     opRegImm(cUnit, kOpCmp, rSuspendCount, 0);
+    /*
+     * FIXME: for efficiency we should use an if-converted suspend
+     * test here.  However, support for IT is a bit weak at the
+     * moment, and requires knowledge of the exact number of instructions
+     * to fall in the skip shadow.  While the exception mechanism
+     * remains in flux, use a compare and branch sequence.  Once
+     * things firm up, restore the conditional skip (and perhaps
+     * fix the utility to handle variable-sized shadows).
+     */
+#if 0
     genIT(cUnit, kArmCondNe, "");
     callUnwindableHelper(cUnit, rLR); // CheckSuspendFromCode(self)
+#else
+    ArmLIR* branch = opCondBranch(cUnit, kArmCondEq);
+    callUnwindableHelper(cUnit, rLR); // CheckSuspendFromCode(self)
+    ArmLIR* target = newLIR0(cUnit, kArmPseudoTargetLabel);
+    target->defMask = ENCODE_ALL;
+    branch->generic.target = (LIR*)target;
+#endif
     oatFreeCallTemps(cUnit);
 }