Don't create a cycle when translating IL `break` to IR. (#14980)
commite6e9d5f6eb5488d9f87ab39727d76fb2ca81702c
authorimhameed <50922266+imhameed@users.noreply.github.com>
Thu, 13 Jun 2019 17:56:07 +0000 (13 10:56 -0700)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Thu, 13 Jun 2019 17:56:07 +0000 (13 13:56 -0400)
tree47d32ed0635819ce695c06a8d4a9516caaa78bb0
parent1e0890f61f9cca1915c98446ea047144b41a9e8a
Don't create a cycle when translating IL `break` to IR. (#14980)

Don't create a cycle when translating IL `break` to IR.

`mono_emit_jit_icall` adds the instruction it generates to the current
basic block, and the redundant use of `MONO_ADD_INS` on an instruction
that has already been added to a BB will create a cycle in the `prev`
link chain.

Fixes #9706.
mono/mini/method-to-ir.c
mono/tests/Makefile.am
mono/tests/bug-gh-9706.il [new file with mode: 0644]