PR middle-end/52650
* function.c (instantiate_virtual_regs_in_insn): Don't delete invalid
asm gotos, instead just clear their template and inputs.
From-SVN: r193846
2012-11-27 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/52650
+ * function.c (instantiate_virtual_regs_in_insn): Don't delete invalid
+ asm gotos, instead just clear their template and inputs.
+
PR tree-optimization/55110
* tree-vect-loop.c (vectorizable_reduction): Don't assert
that STMT_VINFO_RELATED_STMT of orig_stmt is stmt.
if (!check_asm_operands (PATTERN (insn)))
{
error_for_asm (insn, "impossible constraint in %<asm%>");
- delete_insn_and_edges (insn);
+ /* For asm goto, instead of fixing up all the edges
+ just clear the template and clear input operands
+ (asm goto doesn't have any output operands). */
+ if (JUMP_P (insn))
+ {
+ rtx asm_op = extract_asm_operands (PATTERN (insn));
+ ASM_OPERANDS_TEMPLATE (asm_op) = ggc_strdup ("");
+ ASM_OPERANDS_INPUT_VEC (asm_op) = rtvec_alloc (0);
+ ASM_OPERANDS_INPUT_CONSTRAINT_VEC (asm_op) = rtvec_alloc (0);
+ }
+ else
+ delete_insn (insn);
}
}
else