PR target/90193
* rtl.c (classify_insn): Return JUMP_INSN for asm goto.
* emit-rtl.c (try_split): Copy over REG_LABEL_TARGET.
* gcc.target/i386/pr90193.c: New test.
From-SVN: r270550
+2019-04-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/90193
+ * rtl.c (classify_insn): Return JUMP_INSN for asm goto.
+ * emit-rtl.c (try_split): Copy over REG_LABEL_TARGET.
+
2019-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
PR target/89952
break;
case REG_NON_LOCAL_GOTO:
+ case REG_LABEL_TARGET:
for (insn = insn_last; insn != NULL_RTX; insn = PREV_INSN (insn))
{
if (JUMP_P (insn))
return CALL_INSN;
if (ANY_RETURN_P (x))
return JUMP_INSN;
+ if (GET_CODE (x) == ASM_OPERANDS && ASM_OPERANDS_LABEL_VEC (x))
+ return JUMP_INSN;
if (GET_CODE (x) == SET)
{
if (GET_CODE (SET_DEST (x)) == PC)
return CALL_INSN;
if (has_return_p)
return JUMP_INSN;
+ if (GET_CODE (XVECEXP (x, 0, 0)) == ASM_OPERANDS
+ && ASM_OPERANDS_LABEL_VEC (XVECEXP (x, 0, 0)))
+ return JUMP_INSN;
}
#ifdef GENERATOR_FILE
if (GET_CODE (x) == MATCH_OPERAND
+2019-04-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/90193
+ * gcc.target/i386/pr90193.c: New test.
+
2019-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
PR target/89952
--- /dev/null
+/* PR target/90193 *
+/* { dg-do link } */
+/* { dg-options "-O1" } */
+/* { dg-require-effective-target tls } */
+
+__thread int var;
+
+static int
+foo (void)
+{
+ asm goto ("jmp %l[l]\n\t" : : "m" (var) : : l);
+ return 0;
+l:
+ return 1;
+}
+
+int
+main ()
+{
+ return foo ();
+}