forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't create a cycle when translating IL
break
to IR. (mono/mono#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 mono/mono#9706. Commit migrated from mono/mono@e6e9d5f
- Loading branch information
1 parent
c0eb0ff
commit c2c7d82
Showing
3 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.assembly extern mscorlib { } | ||
|
||
.assembly test | ||
{ | ||
.hash algorithm 0x00008004 | ||
.ver 0:0:0:0 | ||
} | ||
|
||
.class private auto ansi beforefieldinit test.Test extends [mscorlib]System.Object | ||
{ | ||
.field private static int32 modreq([mscorlib]System.Runtime.CompilerServices.IsVolatile) non_constant | ||
|
||
.method private hidebysig specialname rtspecialname static void '.cctor' () cil managed | ||
{ | ||
.maxstack 8 | ||
ldc.i4.0 | ||
volatile. | ||
stsfld int32 modreq([mscorlib]System.Runtime.CompilerServices.IsVolatile) test.Test::non_constant | ||
ret | ||
} | ||
|
||
.method public specialname rtspecialname instance default void '.ctor' () cil managed | ||
{ | ||
.maxstack 8 | ||
ldarg.0 | ||
call instance void object::'.ctor'() | ||
ret | ||
} | ||
|
||
// If this test succeeds, it should run to completion. | ||
// If it fails, mono will hang in an infinite loop while doing DCE. | ||
.method public static hidebysig default void Main () cil managed | ||
{ | ||
.maxstack 8 | ||
.entrypoint | ||
volatile. | ||
ldsfld int32 modreq([mscorlib]System.Runtime.CompilerServices.IsVolatile) test.Test::non_constant | ||
ldc.i4.0 | ||
cgt | ||
brfalse.s end | ||
break // Should not be executed; merely needs to be present in the instruction stream. | ||
end: | ||
ret | ||
} | ||
} | ||
|