Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect float return on x86 results in NaN value #20458

Open
joncham opened this issue Oct 6, 2020 · 14 comments
Open

Incorrect float return on x86 results in NaN value #20458

joncham opened this issue Oct 6, 2020 · 14 comments
Assignees

Comments

@joncham
Copy link
Contributor

joncham commented Oct 6, 2020

Steps to Reproduce

  1. Compile the test case with Roslyn in release (debug does not reproduce)
  2. Run with mono x86. I used Windows
using System;
using System.Collections.Generic;

class Program
{
    static void Main(string[] args)
    {

        var bug = new Bug(new Vector3ForBug());
        Console.WriteLine(bug.ShowBug(1.0f));

    }

    struct Vector3ForBug
    {
        public float x;
        public float y;
        public float z;
    }

    class Bug
    {
        List<Vector3ForBug> _points = new List<Vector3ForBug>();

        public Bug(Vector3ForBug p0)
        {
            _points.Add(p0);
            _points.Add(p0);
            _points.Add(p0);
            _points.Add(p0);
        }

        public float ShowBug(float t)
        {
            return GetBadFloatReturn(t, out var _);
        }

        private float GetBadFloatReturn(float t, out Vector3ForBug p0)
        {
            var count = (_points.Count - 1) / 3;
            var index = 1;
            var pointIndex = index * 3;
            var ts = (t - ((float)index / count)) * count;

            p0 = _points[pointIndex];

            return ts;
        }
    }
}

Current Behavior

NaN

Expected Behavior

0

On which platforms did you notice this

[ ] macOS
[ ] Linux
[X ] Windows

Version Used:

5.11.0

@joncham
Copy link
Contributor Author

joncham commented Oct 6, 2020

@vargaz vargaz self-assigned this Oct 6, 2020
@vargaz
Copy link
Contributor

vargaz commented Oct 10, 2020

Could you run with MONO_VERBOSE_METHOD=GetBadFloatReturn on windows and attach the output ?

@joncham
Copy link
Contributor Author

joncham commented Oct 12, 2020

Note as command was not available so there is no disassembly.

converting method single Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&)
created temp 0 (R8) of type System.Single
creating vars
created temp 1 (R9) of type System.IntPtr
created temp 2 (R10) of type System.Single
created temp 3 (R11) of type System.IntPtr
	return :  arg R8 <-
	this:  arg R9 <-
	arg [0]:  arg R10 <-
	arg [1]:  arg R11 <-
creating locals
	local [0]: created temp 4 (R12) of type System.Int32
	local [1]: created temp 5 (R13) of type System.Int32
	local [2]: created temp 6 (R14) of type System.Int32
locals done
method to IR Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&)
converting (in B2: stack: 0) IL_0000: ldarg.0   
converting (in B2: stack: 1) IL_0001: ldfld     0x04000014
converting (in B2: stack: 1) IL_0006: callvirt  0x0a0000a8
cmethod = int System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()
INLINE START 00A54430 Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) -> System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()
created temp 7 (R17) of type System.Int32
method to IR System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()
created temp 8 (R18) of type System.Object
converting (in B7: stack: 0) IL_0000: ldarg.0   
converting (in B7: stack: 1) IL_0001: ldfld     0x0a000c34
converting (in B7: stack: 1) IL_0006: ret       
INLINE END Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) -> System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()
converting (in B2: stack: 1) IL_000b: ldc.i4.1  
converting (in B2: stack: 2) IL_000c: sub       
converting (in B2: stack: 1) IL_000d: ldc.i4.3  
converting (in B2: stack: 2) IL_000e: div       
converting (in B2: stack: 1) IL_000f: stloc.0   
converting (in B2: stack: 0) IL_0010: ldc.i4.1  
converting (in B2: stack: 1) IL_0011: stloc.1   
converting (in B2: stack: 0) IL_0012: ldloc.1   
converting (in B2: stack: 1) IL_0013: ldc.i4.3  
converting (in B2: stack: 2) IL_0014: mul       
converting (in B2: stack: 1) IL_0015: stloc.2   
converting (in B2: stack: 0) IL_0016: ldarg.1   
converting (in B2: stack: 1) IL_0017: ldloc.1   
converting (in B2: stack: 2) IL_0018: conv.r4   
converting (in B2: stack: 2) IL_0019: ldloc.0   
converting (in B2: stack: 3) IL_001a: conv.r4   
converting (in B2: stack: 3) IL_001b: div       
converting (in B2: stack: 2) IL_001c: sub       
converting (in B2: stack: 1) IL_001d: ldloc.0   
converting (in B2: stack: 2) IL_001e: conv.r4   
converting (in B2: stack: 2) IL_001f: mul       
converting (in B2: stack: 1) IL_0020: ldarg.2   
converting (in B2: stack: 2) IL_0021: ldarg.0   
converting (in B2: stack: 3) IL_0022: ldfld     0x04000014
converting (in B2: stack: 3) IL_0027: ldloc.2   
converting (in B2: stack: 4) IL_0028: callvirt  0x0a0000a9
cmethod = Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)
created temp 9 (R46) of type Program.Vector3ForBug
converting (in B2: stack: 3) IL_002d: stobj     0x02000009
converting (in B2: stack: 1) IL_0032: ret       
REGION BB0 IL_0000 ID_FFFFFFFF
REGION BB3 IL_0000 ID_FFFFFFFF
REGION BB2 IL_0032 ID_FFFFFFFF
REGION BB1 IL_0000 ID_FFFFFFFF
AFTER METHOD-TO-IR 0: [IN: , OUT:  BB3(0) ]
AFTER METHOD-TO-IR 3: [IN:  BB0(0), OUT:  BB2(0) ]
 iconst R12 <- [0]
 iconst R13 <- [0]
 iconst R14 <- [0]
AFTER METHOD-TO-IR 2: [IN:  BB3(0), OUT:  BB1(0) ]
 il_seq_point il: 0x0
 move R15 <- R9
 not_null R15
 load_membase R16 <- [R15 + 0x8]
 nop
 move R18 <- R16
 move R19 <- R18
 check_this [R19 + 0x0]
 not_null R19
 move R20 <- R18
 not_null R20
 loadi4_membase R21 <- [R20 + 0x10]
 move R17 <- R21
 nop
 move R22 <- R17
 il_seq_point il: 0xb, nonempty-stack
 nop
 int_sub_imm R24 <- R22 [1] clobbers: 1
 nop
 nop
 int_div_imm R26 <- R24 clobbers: d
 move R12 <- R26
 il_seq_point il: 0x10
 iconst R13 <- [1]
 il_seq_point il: 0x12
 move R29 <- R13
 nop
 int_mul_imm R31 <- R29
 move R14 <- R31
 il_seq_point il: 0x16
 fmove R32 <- R10
 move R33 <- R13
 int_conv_to_r4 R34 <- R33
 move R35 <- R12
 int_conv_to_r4 R36 <- R35
 float_div R37 <- R34 R36
 float_sub R38 <- R32 R37
 move R39 <- R12
 int_conv_to_r4 R40 <- R39
 float_mul R41 <- R38 R40
 move R42 <- R11
 move R43 <- R9
 not_null R43
 load_membase R44 <- [R43 + 0x8]
 move R45 <- R14
 outarg_vtretaddr R47 <- R46
 store_membase_reg [%esp + 0x8] <- R45
 store_membase_reg [%esp + 0x4] <- R47
 store_membase_reg [%esp] <- R44
 check_this [R44 + 0x0]
 not_null R44
 vcall R46 <- [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
 il_seq_point il: 0x2d, nonempty-stack
 storev_membase [R42 + 0x0] <- R46
 il_seq_point il: 0x32
 br [B1]
AFTER METHOD-TO-IR 1: [IN:  BB2(0), OUT:  ]
CCOPY/2: R15 -> R9
CCOPY/2: R15 -> R9
CCOPY/2: R20 -> R18
CCOPY/2: R20 -> R18
CCOPY/2: R35 -> R12
CCOPY/2: R39 -> R12
CCOPY/2: R43 -> R9
CCOPY/2: R43 -> R9
CCOPY: R42 -> R11
block merge triggered 3 -> 2
br removal triggered 3 -> 1

HANDLE-GLOBAL-VREGS BLOCK 0:

HANDLE-GLOBAL-VREGS BLOCK 3:
 iconst R12 <- [0]
 iconst R13 <- [0]
 iconst R14 <- [0]
 il_seq_point il: 0x0
 move R15 <- R9
 not_null R9
 load_membase R16 <- [R9 + 0x8]
 move R18 <- R16
 move R19 <- R18
 check_this [R19 + 0x0]
 not_null R19
 move R20 <- R18
 not_null R18
 loadi4_membase R21 <- [R18 + 0x10]
 move R17 <- R21
 move R22 <- R17
 il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R24 <- R22 [1] clobbers: 1
 iconst R51 <- [1431655766]
 bigmul R48 <- R24 R51
  Create LVAR R48 (R49, R50)
created temp 10 (R48) of type System.Int64
LONG VREG R48 made global.
 int_shr_imm R51 <- R50 clobbers: 1
 int_shr_un_imm R26 <- R51 clobbers: 1
 int_add R26 <- R26 R51 clobbers: 1
 move R12 <- R26
 il_seq_point il: 0x10
 iconst R13 <- [1]
 il_seq_point il: 0x12
 iconst R29 <- [1]
 iconst R31 <- [3]
 iconst R14 <- [3]
 il_seq_point il: 0x16
 fmove R32 <- R10
 iconst R33 <- [1]
 int_conv_to_r4 R34 <- R33
 move R35 <- R12
 int_conv_to_r4 R36 <- R12
 float_div R37 <- R34 R36
 float_sub R38 <- R32 R37
 move R39 <- R12
 int_conv_to_r4 R40 <- R12
 float_mul R41 <- R38 R40
 move R42 <- R11
 move R43 <- R9
 not_null R9
 load_membase R44 <- [R9 + 0x8]
 iconst R45 <- [3]
 outarg_vtretaddr R47 <- R46
 store_membase_imm [%esp + 0x8] <- [3]
 store_membase_reg [%esp + 0x4] <- R47
 store_membase_reg [%esp] <- R44
 check_this [R44 + 0x0]
 not_null R44
 vcall R46 <- [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
 il_seq_point il: 0x2d, nonempty-stack
 storev_membase [R11 + 0x0] <- R46
 il_seq_point il: 0x32
 nop

HANDLE-GLOBAL-VREGS BLOCK 1:
CONVERTED R12(4) TO VREG.
CONVERTED R13(5) TO VREG.
CONVERTED R14(6) TO VREG.
CONVERTED R17(7) TO VREG.
CONVERTED R18(8) TO VREG.
CONVERTED R46(9) TO VREG.
	Reverse copyprop in BB3 on  move R12 <- R26
	Reverse copyprop in BB3 on  move R22 <- R17
	Reverse copyprop in BB3 on  move R22 <- R21
	Reverse copyprop in BB3 on  move R18 <- R16
BB0 IN: 
BB3 IN: 0 
BB1 IN: 3 
DTREE Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) 0
BB0(dfn=0) (IDOM=BB-1):  BB0
BB3(dfn=1) (IDOM=BB0):  BB0 BB3
BB1(dfn=2) (IDOM=BB3):  BB0 BB3 BB1
BEFORE LOWER-VTYPE-OPTS  0: [IN: , OUT:  BB3(1) ]
AFTER LOWER-VTYPE-OPTS  0: [IN: , OUT:  BB3(1) ]
BEFORE LOWER-VTYPE-OPTS  3: [IN:  BB0(0), OUT:  BB1(2) ]
 il_seq_point il: 0x0
 not_null R9
 load_membase R18 <- [R9 + 0x8]
 move R19 <- R18
 check_this [R19 + 0x0]
 not_null R19
 not_null R18
 loadi4_membase R22 <- [R18 + 0x10]
 il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R24 <- R22 [1] clobbers: 1
 iconst R51 <- [1431655766]
 bigmul R48 <- R24 R51
 int_shr_imm R51 <- R50 clobbers: 1
 int_shr_un_imm R26 <- R51 clobbers: 1
 int_add R12 <- R26 R51 clobbers: 1
 il_seq_point il: 0x10
 il_seq_point il: 0x12
 il_seq_point il: 0x16
 fmove R32 <- R10
 iconst R33 <- [1]
 int_conv_to_r4 R34 <- R33
 int_conv_to_r4 R36 <- R12
 float_div R37 <- R34 R36
 float_sub R38 <- R32 R37
 int_conv_to_r4 R40 <- R12
 float_mul R41 <- R38 R40
 not_null R9
 load_membase R44 <- [R9 + 0x8]
 outarg_vtretaddr R47 <- R46
 store_membase_imm [%esp + 0x8] <- [3]
 store_membase_reg [%esp + 0x4] <- R47
 store_membase_reg [%esp] <- R44
 check_this [R44 + 0x0]
 not_null R44
 vcall R46 <- [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
 il_seq_point il: 0x2d, nonempty-stack
 storev_membase [R11 + 0x0] <- R46
 il_seq_point il: 0x32
created temp 5 (R46) of type Program.Vector3ForBug
AFTER LOWER-VTYPE-OPTS  3: [IN:  BB0(0), OUT:  BB1(2) ]
 il_seq_point il: 0x0
 not_null R9
 load_membase R18 <- [R9 + 0x8]
 move R19 <- R18
 check_this [R19 + 0x0]
 not_null R19
 not_null R18
 loadi4_membase R22 <- [R18 + 0x10]
 il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R24 <- R22 [1] clobbers: 1
 iconst R51 <- [1431655766]
 bigmul R48 <- R24 R51
 int_shr_imm R51 <- R50 clobbers: 1
 int_shr_un_imm R26 <- R51 clobbers: 1
 int_add R12 <- R26 R51 clobbers: 1
 il_seq_point il: 0x10
 il_seq_point il: 0x12
 il_seq_point il: 0x16
 fmove R32 <- R10
 iconst R33 <- [1]
 int_conv_to_r4 R34 <- R33
 int_conv_to_r4 R36 <- R12
 float_div R37 <- R34 R36
 float_sub R38 <- R32 R37
 int_conv_to_r4 R40 <- R12
 float_mul R41 <- R38 R40
 not_null R9
 load_membase R44 <- [R9 + 0x8]
 ldaddr R47 <- R46
 store_membase_imm [%esp + 0x8] <- [3]
 store_membase_reg [%esp + 0x4] <- R47
 store_membase_reg [%esp] <- R44
 check_this [R44 + 0x0]
 not_null R44
 vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
 il_seq_point il: 0x2d, nonempty-stack
 ldaddr R53 <- R46
 add_imm R54 <- R11 [0] clobbers: 1
 loadi4_membase R55 <- [R53 + 0x0]
 storei4_membase_reg [R54] <- R55
 loadi4_membase R56 <- [R53 + 0x4]
 storei4_membase_reg [R54 + 0x4] <- R56
 loadi4_membase R57 <- [R53 + 0x8]
 storei4_membase_reg [R54 + 0x8] <- R57
 il_seq_point il: 0x32
BEFORE LOWER-VTYPE-OPTS  1: [IN:  BB3(1), OUT:  ]
AFTER LOWER-VTYPE-OPTS  1: [IN:  BB3(1), OUT:  ]

LIVENESS:
BLOCK BB0 (BB3, ):
GEN  BB0: {}
KILL BB0: {}
BLOCK BB3 (BB1, ):
	1  il_seq_point il: 0x0
	1  not_null R9
	GEN: R9(1)
	1  load_membase R18 <- [R9 + 0x8]
	GEN: R9(1)
	1  move R19 <- R18
	1  check_this [R19 + 0x0]
	1  not_null R19
	1  not_null R18
	1  loadi4_membase R22 <- [R18 + 0x10]
	1  il_seq_point il: 0xb, nonempty-stack
	1  int_sub_imm R24 <- R22 [1] clobbers: 1
	1  iconst R51 <- [1431655766]
	1  bigmul R48 <- R24 R51
	KILL: R48(4)
	1  int_shr_imm R51 <- R50 clobbers: 1
	GEN: R50(4)
	1  int_shr_un_imm R26 <- R51 clobbers: 1
	1  int_add R12 <- R26 R51 clobbers: 1
	1  il_seq_point il: 0x10
	1  il_seq_point il: 0x12
	1  il_seq_point il: 0x16
	1  fmove R32 <- R10
	GEN: R10(2)
	1  iconst R33 <- [1]
	1  int_conv_to_r4 R34 <- R33
	1  int_conv_to_r4 R36 <- R12
	1  float_div R37 <- R34 R36
	1  float_sub R38 <- R32 R37
	1  int_conv_to_r4 R40 <- R12
	1  float_mul R41 <- R38 R40
	1  not_null R9
	GEN: R9(1)
	1  load_membase R44 <- [R9 + 0x8]
	GEN: R9(1)
	1  ldaddr R47 <- R46
	GEN: R46(5)
	1  store_membase_imm [%esp + 0x8] <- [3]
	1  store_membase_reg [%esp + 0x4] <- R47
	1  store_membase_reg [%esp] <- R44
	1  check_this [R44 + 0x0]
	1  not_null R44
	1  vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
	1  il_seq_point il: 0x2d, nonempty-stack
	1  ldaddr R53 <- R46
	GEN: R46(5)
	1  add_imm R54 <- R11 [0] clobbers: 1
	GEN: R11(3)
	1  loadi4_membase R55 <- [R53 + 0x0]
	1  storei4_membase_reg [R54] <- R55
	1  loadi4_membase R56 <- [R53 + 0x4]
	1  storei4_membase_reg [R54 + 0x4] <- R56
	1  loadi4_membase R57 <- [R53 + 0x8]
	1  storei4_membase_reg [R54 + 0x8] <- R57
	1  il_seq_point il: 0x32
GEN  BB3: {1, 2, 3, 5}
KILL BB3: {4}
BLOCK BB1 ():
GEN  BB1: {}
KILL BB1: {}

ITERATION:
P: BB1(2): IN: BB3 OUT:
P: BB3(1): IN: BB0 OUT:BB1 
	LIVE IN  BB3: {1, 2, 3, 5}
P: BB0(0): IN: OUT:BB3 
	LIVE IN  BB0: {1, 2, 3, 5}
IT: 3 2.
LIVE IN  BB1: {}
LIVE OUT BB1: {}
LIVE IN  BB3: {1, 2, 3, 5}
LIVE OUT BB3: {}
LIVE IN  BB0: {1, 2, 3, 5}
LIVE OUT BB0: {1, 2, 3, 5}
V0: [0x0 - 0x0]
V1: [0x0 - 0x40038]
V2: [0x0 - 0x40026]
V3: [0x0 - 0x4004c]
V4: [0x40019 - 0x4001a]
V5: [0x0 - 0x4004a]
COSTLY: R3 C1 C3 %edi
NOT REGVAR: 3
ALLOCATED R9(1) TO HREG 6 COST 4

SPILL BLOCK 0:

SPILL BLOCK 3:
 il_seq_point il: 0x0
	     -1
	1  il_seq_point il: 0x0
 not_null R9
	  i  -1 9
	1  not_null %esi
 load_membase R18 <- [R9 + 0x8]
	 ii  18 9
	1  load_membase R18 <- [%esi + 0x8]
 move R19 <- R18
	 ii  19 18
	1  move R19 <- R18
 check_this [R19 + 0x0]
	  i  -1 19
	1  check_this [R19 + 0x0]
 not_null R19
	  i  -1 19
	1  not_null R19
 not_null R18
	  i  -1 18
	1  not_null R18
 loadi4_membase R22 <- [R18 + 0x10]
	 ii  22 18
	1  loadi4_membase R22 <- [R18 + 0x10]
 il_seq_point il: 0xb, nonempty-stack
	     -1
	1  il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R24 <- R22 [1] clobbers: 1
	 ii  24 22
	1  int_sub_imm R24 <- R22 [1] clobbers: 1
 iconst R51 <- [1431655766]
	 i   51
	1  iconst R51 <- [1431655766]
 bigmul R48 <- R24 R51
	 lii 48 24 51
	1  bigmul R58 <- R24 R51
 storei4_membase_reg [%ebp + 0xffffffe4] <- R60
	  ii -1 60
	1  storei4_membase_reg [%ebp + 0xffffffe4] <- R60
 storei4_membase_reg [%ebp + 0xffffffe0] <- R59
	  ii -1 59
	1  storei4_membase_reg [%ebp + 0xffffffe0] <- R59
 int_shr_imm R51 <- R50 clobbers: 1
	 ii  51 50
	0  loadi4_membase R61 <- [%ebp + 0xffffffe4]
	1  int_shr_imm R51 <- R61 clobbers: 1
 int_shr_un_imm R26 <- R51 clobbers: 1
	 ii  26 51
	1  int_shr_un_imm R26 <- R51 clobbers: 1
 int_add R12 <- R26 R51 clobbers: 1
	 iii 12 26 51
	1  int_add R12 <- R26 R51 clobbers: 1
 il_seq_point il: 0x10
	     -1
	1  il_seq_point il: 0x10
 il_seq_point il: 0x12
	     -1
	1  il_seq_point il: 0x12
 il_seq_point il: 0x16
	     -1
	1  il_seq_point il: 0x16
 fmove R32 <- R10
	 ff  32 10
	0  loadr4_membase R32 <- [%ebp + 0xc]
	1  nop
 iconst R33 <- [1]
	 i   33
	1  iconst R33 <- [1]
 int_conv_to_r4 R34 <- R33
	 fi  34 33
	1  int_conv_to_r4 R34 <- R33
 int_conv_to_r4 R36 <- R12
	 fi  36 12
	1  int_conv_to_r4 R36 <- R12
 float_div R37 <- R34 R36
	 fff 37 34 36
	1  float_div R37 <- R34 R36
 float_sub R38 <- R32 R37
	 fff 38 32 37
	1  float_sub R38 <- R32 R37
 int_conv_to_r4 R40 <- R12
	 fi  40 12
	1  int_conv_to_r4 R40 <- R12
 float_mul R41 <- R38 R40
	 fff 41 38 40
	1  float_mul R41 <- R38 R40
 not_null R9
	  i  -1 9
	1  not_null %esi
 load_membase R44 <- [R9 + 0x8]
	 ii  44 9
	1  load_membase R44 <- [%esi + 0x8]
 ldaddr R47 <- R46
	 ii  47 5
	1  add_imm R47 <- %ebp [-20] clobbers: 1
 store_membase_imm [%esp + 0x8] <- [3]
	   i -1
	1  store_membase_imm [%esp + 0x8] <- [3]
 store_membase_reg [%esp + 0x4] <- R47
	  ii -1 47
	1  store_membase_reg [%esp + 0x4] <- R47
 store_membase_reg [%esp] <- R44
	  ii -1 44
	1  store_membase_reg [%esp] <- R44
 check_this [R44 + 0x0]
	  i  -1 44
	1  check_this [R44 + 0x0]
 not_null R44
	  i  -1 44
	1  not_null R44
 vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
	     -1
	1  vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
 il_seq_point il: 0x2d, nonempty-stack
	     -1
	1  il_seq_point il: 0x2d, nonempty-stack
 ldaddr R53 <- R46
	 ii  53 5
	1  add_imm R53 <- %ebp [-20] clobbers: 1
 add_imm R54 <- R11 [0] clobbers: 1
	 ii  54 11
	0  load_membase R62 <- [%ebp + 0x10]
	1  add_imm R54 <- R62 [0] clobbers: 1
 loadi4_membase R55 <- [R53 + 0x0]
	 ii  55 53
	1  loadi4_membase R55 <- [R53 + 0x0]
 storei4_membase_reg [R54] <- R55
	  ii -1 55
	1  storei4_membase_reg [R54] <- R55
 loadi4_membase R56 <- [R53 + 0x4]
	 ii  56 53
	1  loadi4_membase R56 <- [R53 + 0x4]
 storei4_membase_reg [R54 + 0x4] <- R56
	  ii -1 56
	1  storei4_membase_reg [R54 + 0x4] <- R56
 loadi4_membase R57 <- [R53 + 0x8]
	 ii  57 53
	1  loadi4_membase R57 <- [R53 + 0x8]
 storei4_membase_reg [R54 + 0x8] <- R57
	  ii -1 57
	1  storei4_membase_reg [R54 + 0x8] <- R57
 il_seq_point il: 0x32
	     -1
	1  il_seq_point il: 0x32

SPILL BLOCK 1:
CCOPY: R54 -> R62
CCOPY: R54 -> R62
CCOPY: R54 -> R62
DUMP BLOCK 0:
DUMP BLOCK 3:
 il_seq_point il: 0x0
 not_null %esi
 load_membase R18 <- [%esi + 0x8]
 move R19 <- R18
 check_this [R19 + 0x0]
 not_null R19
 not_null R18
 loadi4_membase R22 <- [R18 + 0x10]
 il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R24 <- R22 [1] clobbers: 1
 iconst R51 <- [1431655766]
 bigmul R58 <- R24 R51
 storei4_membase_reg [%ebp + 0xffffffe4] <- R60
 storei4_membase_reg [%ebp + 0xffffffe0] <- R59
 loadi4_membase R61 <- [%ebp + 0xffffffe4]
 int_shr_imm R51 <- R61 clobbers: 1
 int_shr_un_imm R26 <- R51 clobbers: 1
 int_add R12 <- R26 R51 clobbers: 1
 il_seq_point il: 0x10
 il_seq_point il: 0x12
 il_seq_point il: 0x16
 loadr4_membase R32 <- [%ebp + 0xc]
 iconst R33 <- [1]
 int_conv_to_r4 R34 <- R33
 int_conv_to_r4 R36 <- R12
 float_div R37 <- R34 R36
 float_sub R38 <- R32 R37
 int_conv_to_r4 R40 <- R12
 float_mul R41 <- R38 R40
 not_null %esi
 load_membase R44 <- [%esi + 0x8]
 add_imm R47 <- %ebp [-20] clobbers: 1
 store_membase_imm [%esp + 0x8] <- [3]
 store_membase_reg [%esp + 0x4] <- R47
 store_membase_reg [%esp] <- R44
 check_this [R44 + 0x0]
 not_null R44
 vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
 il_seq_point il: 0x2d, nonempty-stack
 load_membase R62 <- [%ebp + 0x10]
 loadi4_membase R55 <- [%ebp + 0xffffffec]
 storei4_membase_reg [R62] <- R55
 loadi4_membase R56 <- [%ebp + 0xfffffff0]
 storei4_membase_reg [R62 + 0x4] <- R56
 loadi4_membase R57 <- [%ebp + 0xfffffff4]
 storei4_membase_reg [R62 + 0x8] <- R57
 il_seq_point il: 0x32
DUMP BLOCK 1:

LOCAL REGALLOC BLOCK 3:
	1  il_seq_point il: 0x0
	2  not_null %esi
	3  load_membase R18 <- [%esi + 0x8]
	4  move R19 <- R18
	5  check_this [R19 + 0x0]
	6  not_null R19
	7  not_null R18
	8  loadi4_membase R22 <- [R18 + 0x10]
	9  il_seq_point il: 0xb, nonempty-stack
	10 int_sub_imm R24 <- R22 [1] clobbers: 1
	11 iconst R51 <- [1431655766]
	12 bigmul R59 <- R24 R51
	13 storei4_membase_reg [%ebp + 0xffffffe4] <- R60
	14 storei4_membase_reg [%ebp + 0xffffffe0] <- R59
	15 loadi4_membase R61 <- [%ebp + 0xffffffe4]
	16 int_shr_imm R51 <- R61 clobbers: 1
	17 int_shr_un_imm R26 <- R51 clobbers: 1
	18 int_add R12 <- R26 R51 clobbers: 1
	19 il_seq_point il: 0x10
	20 il_seq_point il: 0x12
	21 il_seq_point il: 0x16
	22 loadr4_membase R32 <- [%ebp + 0xc]
	23 iconst R33 <- [1]
	24 int_conv_to_r4 R34 <- R33
	25 int_conv_to_r4 R36 <- R12
	26 float_div R37 <- R34 R36
	27 float_sub R38 <- R32 R37
	28 int_conv_to_r4 R40 <- R12
	29 float_mul R41 <- R38 R40
	30 not_null %esi
	31 load_membase R44 <- [%esi + 0x8]
	32 x86_lea_membase R47 <- %ebp
	33 store_membase_imm [%esp + 0x8] <- [3]
	34 store_membase_reg [%esp + 0x4] <- R47
	35 store_membase_reg [%esp] <- R44
	36 check_this [R44 + 0x0]
	37 not_null R44
	38 vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
	39 il_seq_point il: 0x2d, nonempty-stack
	40 load_membase R62 <- [%ebp + 0x10]
	41 loadi4_membase R55 <- [%ebp + 0xffffffec]
	42 storei4_membase_reg [R62] <- R55
	43 loadi4_membase R56 <- [%ebp + 0xfffffff0]
	44 storei4_membase_reg [R62 + 0x4] <- R56
	45 loadi4_membase R57 <- [%ebp + 0xfffffff4]
	46 storei4_membase_reg [R62 + 0x8] <- R57
	47 il_seq_point il: 0x32
liveness: %esp [33 - 0]
liveness: %ebp [13 - 0]
liveness: R12 [18 - 18]
liveness: R18 [3 - 3]
liveness: R19 [4 - 4]
liveness: R22 [8 - 8]
liveness: R24 [10 - 10]
liveness: R26 [17 - 17]
liveness: R32 [22 - 22]
liveness: R33 [23 - 23]
liveness: R34 [24 - 24]
liveness: R36 [25 - 25]
liveness: R37 [26 - 26]
liveness: R38 [27 - 27]
liveness: R40 [28 - 28]
liveness: R41 [29 - 29]
liveness: R44 [31 - 31]
liveness: R47 [32 - 32]
liveness: R51 [11 - 16]
liveness: R55 [41 - 41]
liveness: R56 [43 - 43]
liveness: R57 [45 - 45]
liveness: R59 [12 - 12]
liveness: R60 [12 - 0]
liveness: R61 [15 - 15]
liveness: R62 [40 - 40]
processing:	47 il_seq_point il: 0x32
	47 il_seq_point il: 0x32
processing:	46 storei4_membase_reg [R62 + 0x8] <- R57
	assigned dreg %eax to dest R62
	assigned sreg1 %ecx to R57
	46 storei4_membase_reg [%eax + 0x8] <- %ecx
processing:	45 loadi4_membase R57 <- [%ebp + 0xfffffff4]
	assigned dreg %ecx to dest R57
	freeable %ecx (R57) (born in 45)
	45 loadi4_membase %ecx <- [%ebp + 0xfffffff4]
processing:	44 storei4_membase_reg [R62 + 0x4] <- R56
	assigned dreg %eax to dest R62
	assigned sreg1 %ecx to R56
	44 storei4_membase_reg [%eax + 0x4] <- %ecx
processing:	43 loadi4_membase R56 <- [%ebp + 0xfffffff0]
	assigned dreg %ecx to dest R56
	freeable %ecx (R56) (born in 43)
	43 loadi4_membase %ecx <- [%ebp + 0xfffffff0]
processing:	42 storei4_membase_reg [R62] <- R55
	assigned dreg %eax to dest R62
	assigned sreg1 %ecx to R55
	42 storei4_membase_reg [%eax] <- %ecx
processing:	41 loadi4_membase R55 <- [%ebp + 0xffffffec]
	assigned dreg %ecx to dest R55
	freeable %ecx (R55) (born in 41)
	41 loadi4_membase %ecx <- [%ebp + 0xffffffec]
processing:	40 load_membase R62 <- [%ebp + 0x10]
	assigned dreg %eax to dest R62
	freeable %eax (R62) (born in 40)
	40 load_membase %eax <- [%ebp + 0x10]
processing:	39 il_seq_point il: 0x2d, nonempty-stack
	39 il_seq_point il: 0x2d, nonempty-stack
processing:	38 vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
	38 vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
processing:	37 not_null R44
	assigned sreg1 %eax to R44
	37 not_null %eax
processing:	36 check_this [R44 + 0x0]
	36 check_this [%eax + 0x0]
processing:	35 store_membase_reg [%esp] <- R44
	35 store_membase_reg [%esp] <- %eax
processing:	34 store_membase_reg [%esp + 0x4] <- R47
	assigned sreg1 %ecx to R47
	34 store_membase_reg [%esp + 0x4] <- %ecx
processing:	33 store_membase_imm [%esp + 0x8] <- [3]
	33 store_membase_imm [%esp + 0x8] <- [3]
processing:	32 x86_lea_membase R47 <- %ebp
	assigned dreg %ecx to dest R47
	freeable %ecx (R47) (born in 32)
	32 x86_lea_membase %ecx <- %ebp
processing:	31 load_membase R44 <- [%esi + 0x8]
	assigned dreg %eax to dest R44
	freeable %eax (R44) (born in 31)
	31 load_membase %eax <- [%esi + 0x8]
processing:	30 not_null %esi
	30 not_null %esi
processing:	29 float_mul R41 <- R38 R40
	assigned dreg %fr0 to dest R41
	freeable %fr0 (R41) (born in 29)
	assigned sreg1 %fr0 to R38
	assigned sreg2 %fr1 to R40
	29 float_mul %fr0 <- %fr0 %fr1
processing:	28 int_conv_to_r4 R40 <- R12
	assigned dreg %fr1 to dest R40
	freeable %fr1 (R40) (born in 28)
	assigned sreg1 %eax to R12
	28 int_conv_to_r4 %fr1 <- %eax
processing:	27 float_sub R38 <- R32 R37
	assigned dreg %fr0 to dest R38
	freeable %fr0 (R38) (born in 27)
	assigned sreg1 %fr0 to R32
	assigned sreg2 %fr1 to R37
	27 float_sub %fr0 <- %fr0 %fr1
processing:	26 float_div R37 <- R34 R36
	assigned dreg %fr1 to dest R37
	freeable %fr1 (R37) (born in 26)
	assigned sreg1 %fr1 to R34
	assigned sreg2 %fr2 to R36
	26 float_div %fr1 <- %fr1 %fr2
processing:	25 int_conv_to_r4 R36 <- R12
	assigned dreg %fr2 to dest R36
	freeable %fr2 (R36) (born in 25)
	25 int_conv_to_r4 %fr2 <- %eax
processing:	24 int_conv_to_r4 R34 <- R33
	assigned dreg %fr1 to dest R34
	freeable %fr1 (R34) (born in 24)
	assigned sreg1 %ecx to R33
	24 int_conv_to_r4 %fr1 <- %ecx
processing:	23 iconst R33 <- [1]
	assigned dreg %ecx to dest R33
	freeable %ecx (R33) (born in 23)
	23 iconst %ecx <- [1]
processing:	22 loadr4_membase R32 <- [%ebp + 0xc]
	assigned dreg %fr0 to dest R32
	freeable %fr0 (R32) (born in 22)
	22 loadr4_membase %fr0 <- [%ebp + 0xc]
processing:	21 il_seq_point il: 0x16
	21 il_seq_point il: 0x16
processing:	20 il_seq_point il: 0x12
	20 il_seq_point il: 0x12
processing:	19 il_seq_point il: 0x10
	19 il_seq_point il: 0x10
processing:	18 int_add R12 <- R26 R51 clobbers: 1
	assigned dreg %eax to dest R12
	freeable %eax (R12) (born in 18)
	assigned sreg1 %eax to R26
	assigned sreg2 %ecx to R51
	18 int_add %eax <- %eax %ecx clobbers: 1
processing:	17 int_shr_un_imm R26 <- R51 clobbers: 1
	assigned dreg %eax to dest R26
	freeable %eax (R26) (born in 17)
	need to copy sreg1 %ecx to dreg %eax
	forced copy from %ecx to %eax
	17 int_shr_un_imm %eax <- %eax clobbers: 1
processing:	16 int_shr_imm R51 <- R61 clobbers: 1
	assigned dreg %ecx to dest R51
	freeable %ecx (R51) (born in 11)
	assigned sreg1 %ecx to R61
	16 int_shr_imm %ecx <- %ecx clobbers: 1
processing:	15 loadi4_membase R61 <- [%ebp + 0xffffffe4]
	assigned dreg %ecx to dest R61
	freeable %ecx (R61) (born in 15)
	15 loadi4_membase %ecx <- [%ebp + 0xffffffe4]
processing:	14 storei4_membase_reg [%ebp + 0xffffffe0] <- R59
	allocated preferred reg R59 to %eax
	assigned sreg1 %eax to R59
	14 storei4_membase_reg [%ebp + 0xffffffe0] <- %eax
processing:	13 storei4_membase_reg [%ebp + 0xffffffe4] <- R60
	allocated preferred reg R60 to %edx
	assigned sreg1 %edx to R60
	13 storei4_membase_reg [%ebp + 0xffffffe4] <- %edx
processing:	12 bigmul R59 <- R24 R51
	assigned dreg %eax to dest R59
	assigned dreg-high %edx to dest R60
	freeable %edx (R60)
	freeable %eax (R59) (born in 12)
	assigned sreg1 %eax to R24
	assigned sreg2 %ecx to R51
	12 bigmul %eax <- %eax %ecx
processing:	11 iconst R51 <- [1431655766]
	assigned dreg %ecx to dest R51
	freeable %ecx (R51) (born in 11)
	11 iconst %ecx <- [1431655766]
processing:	10 int_sub_imm R24 <- R22 [1] clobbers: 1
	assigned dreg %eax to dest R24
	freeable %eax (R24) (born in 10)
	assigned sreg1 %eax to R22
	10 int_sub_imm %eax <- %eax [1] clobbers: 1
processing:	9  il_seq_point il: 0xb, nonempty-stack
	9  il_seq_point il: 0xb, nonempty-stack
processing:	8  loadi4_membase R22 <- [R18 + 0x10]
	assigned dreg %eax to dest R22
	freeable %eax (R22) (born in 8)
	assigned sreg1 %eax to R18
	8  loadi4_membase %eax <- [%eax + 0x10]
processing:	7  not_null R18
	7  not_null %eax
processing:	6  not_null R19
	assigned sreg1 %ecx to R19
	6  not_null %ecx
processing:	5  check_this [R19 + 0x0]
	5  check_this [%ecx + 0x0]
processing:	4  move R19 <- R18
	assigned dreg %ecx to dest R19
	freeable %ecx (R19) (born in 4)
	4  move %ecx <- %eax
processing:	3  load_membase R18 <- [%esi + 0x8]
	assigned dreg %eax to dest R18
	freeable %eax (R18) (born in 3)
	3  load_membase %eax <- [%esi + 0x8]
processing:	2  not_null %esi
	2  not_null %esi
processing:	1  il_seq_point il: 0x0
	1  il_seq_point il: 0x0
processing:	0  il_seq_point il: 0x0
	[]
processing:	0  not_null %esi
	[]
processing:	0  load_membase %eax <- [%esi + 0x8]
	[]
processing:	0  move %ecx <- %eax
	[]
processing:	0  check_this [%ecx + 0x0]
	[]
processing:	0  not_null %ecx
	[]
processing:	0  not_null %eax
	[]
processing:	0  loadi4_membase %eax <- [%eax + 0x10]
	[]
processing:	0  il_seq_point il: 0xb, nonempty-stack
	[]
processing:	0  int_sub_imm %eax <- %eax [1] clobbers: 1
	[]
processing:	0  iconst %ecx <- [1431655766]
	[]
processing:	0  bigmul %eax <- %eax %ecx
	[]
processing:	0  storei4_membase_reg [%ebp + 0xffffffe4] <- %edx
	[]
processing:	0  storei4_membase_reg [%ebp + 0xffffffe0] <- %eax
	[]
processing:	0  loadi4_membase %ecx <- [%ebp + 0xffffffe4]
	[]
processing:	0  int_shr_imm %ecx <- %ecx clobbers: 1
	[]
processing:	0  move %eax <- %ecx
	[]
processing:	0  int_shr_un_imm %eax <- %eax clobbers: 1
	[]
processing:	0  int_add %eax <- %eax %ecx clobbers: 1
	[]
processing:	0  il_seq_point il: 0x10
	[]
processing:	0  il_seq_point il: 0x12
	[]
processing:	0  il_seq_point il: 0x16
	[]
processing:	0  loadr4_membase %fr0 <- [%ebp + 0xc]
	[%fr0]
processing:	0  iconst %ecx <- [1]
	[%fr0]
processing:	0  int_conv_to_r4 %fr1 <- %ecx
	[%fr0, %fr1]
processing:	0  int_conv_to_r4 %fr2 <- %eax
	[%fr0, %fr1, %fr2]
processing:	0  float_div %fr1 <- %fr1 %fr2
	[%fr0, %fr1]
processing:	0  float_sub %fr0 <- %fr0 %fr1
	[%fr0]
processing:	0  int_conv_to_r4 %fr1 <- %eax
	[%fr0, %fr1]
processing:	0  float_mul %fr0 <- %fr0 %fr1
	[%fr0]
processing:	0  not_null %esi
	[%fr0]
processing:	0  load_membase %eax <- [%esi + 0x8]
	[%fr0]
processing:	0  x86_lea_membase %ecx <- %ebp
	[%fr0]
processing:	0  store_membase_imm [%esp + 0x8] <- [3]
	[%fr0]
processing:	0  store_membase_reg [%esp + 0x4] <- %ecx
	[%fr0]
processing:	0  store_membase_reg [%esp] <- %eax
	[%fr0]
processing:	0  check_this [%eax + 0x0]
	[%fr0]
processing:	0  not_null %eax
	[%fr0]
processing:	0  vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
	[%fr0]
processing:	0  il_seq_point il: 0x2d, nonempty-stack
	[%fr0]
processing:	0  load_membase %eax <- [%ebp + 0x10]
	[%fr0]
processing:	0  loadi4_membase %ecx <- [%ebp + 0xffffffec]
	[%fr0]
processing:	0  storei4_membase_reg [%eax] <- %ecx
	[%fr0]
processing:	0  loadi4_membase %ecx <- [%ebp + 0xfffffff0]
	[%fr0]
processing:	0  storei4_membase_reg [%eax + 0x4] <- %ecx
	[%fr0]
processing:	0  loadi4_membase %ecx <- [%ebp + 0xfffffff4]
	[%fr0]
processing:	0  storei4_membase_reg [%eax + 0x8] <- %ecx
	[%fr0]
processing:	0  il_seq_point il: 0x32
	[%fr0]
CFA: [0] def_cfa: %esp+0x4
CFA: [0] offset: unknown at cfa-0x4
CFA: [1] def_cfa_offset: 0x8
CFA: [1] offset: %ebp at cfa-0x8
CFA: [3] def_cfa_reg: %ebp
CFA: [4] offset: %esi at cfa-0xc
Argument 0 assigned to register %esi
Basic block 0 starting at offset 0xa
Basic block 3 starting at offset 0xa
Basic block 1 starting at offset 0x97
Method single Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) emitted at 01091A30 to 01091ACD (code length 157) [ConsoleApp1.exe]

*** ASM for Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) ***
0
***


@joncham
Copy link
Contributor Author

joncham commented Oct 12, 2020

Hmm, let me see. That was latest Mono I downloaded and it looks to run correctly...

@joncham
Copy link
Contributor Author

joncham commented Oct 12, 2020

Here is the invalid output from our older Mono in Unity (5.11.0). It seems this may already be fixed usptream.

converting method single Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&)
created temp 0 (R8) of type System.Single
creating vars
created temp 1 (R9) of type System.IntPtr
created temp 2 (R10) of type System.Single
created temp 3 (R11) of type System.IntPtr
	return :  arg R8 <-
	this:  arg R9 <-
	arg [0]:  arg R10 <-
	arg [1]:  arg R11 <-
creating locals
	local [0]: created temp 4 (R12) of type System.Int32
	local [1]: created temp 5 (R13) of type System.Int32
	local [2]: created temp 6 (R14) of type System.Int32
locals done
method to IR Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&)
converting (in B2: stack: 0) IL_0000: ldarg.0   
converting (in B2: stack: 1) IL_0001: ldfld     0x04000014
converting (in B2: stack: 1) IL_0006: callvirt  0x0a0000a8
INLINE START 01126758 Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) -> System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()
created temp 7 (R17) of type System.Int32
method to IR System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()
created temp 8 (R18) of type System.Object
converting (in B7: stack: 0) IL_0000: ldarg.0   
converting (in B7: stack: 1) IL_0001: ldfld     0x0a000aa8
converting (in B7: stack: 1) IL_0006: ret       
INLINE END Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) -> System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()
converting (in B2: stack: 1) IL_000b: ldc.i4.1  
converting (in B2: stack: 2) IL_000c: sub       
converting (in B2: stack: 1) IL_000d: ldc.i4.3  
converting (in B2: stack: 2) IL_000e: div       
converting (in B2: stack: 1) IL_000f: stloc.0   
converting (in B2: stack: 0) IL_0010: ldc.i4.1  
converting (in B2: stack: 1) IL_0011: stloc.1   
converting (in B2: stack: 0) IL_0012: ldloc.1   
converting (in B2: stack: 1) IL_0013: ldc.i4.3  
converting (in B2: stack: 2) IL_0014: mul       
converting (in B2: stack: 1) IL_0015: stloc.2   
converting (in B2: stack: 0) IL_0016: ldarg.1   
converting (in B2: stack: 1) IL_0017: ldloc.1   
converting (in B2: stack: 2) IL_0018: conv.r4   
converting (in B2: stack: 2) IL_0019: ldloc.0   
converting (in B2: stack: 3) IL_001a: conv.r4   
converting (in B2: stack: 3) IL_001b: div       
converting (in B2: stack: 2) IL_001c: sub       
converting (in B2: stack: 1) IL_001d: ldloc.0   
converting (in B2: stack: 2) IL_001e: conv.r4   
converting (in B2: stack: 2) IL_001f: mul       
converting (in B2: stack: 1) IL_0020: ldarg.2   
converting (in B2: stack: 2) IL_0021: ldarg.0   
converting (in B2: stack: 3) IL_0022: ldfld     0x04000014
converting (in B2: stack: 3) IL_0027: ldloc.2   
converting (in B2: stack: 4) IL_0028: callvirt  0x0a0000a9
INLINE START 011267D8 Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) -> System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)
created temp 9 (R46) of type Program.Vector3ForBug
method to IR System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)
created temp 10 (R47) of type System.Object
created temp 11 (R48) of type System.Int32
converting (in B12: stack: 0) IL_0000: ldarg.1   
converting (in B12: stack: 1) IL_0001: ldarg.0   
converting (in B12: stack: 2) IL_0002: ldfld     0x0a000aa8
converting (in B12: stack: 2) IL_0007: blt.un.s  IL_000e
converting (in B15: stack: 0) IL_0009: call      0x060006fe
INLINE START 01188DB0 Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) -> System.ThrowHelper:ThrowArgumentOutOfRangeException ()
method to IR System.ThrowHelper:ThrowArgumentOutOfRangeException ()
converting (in B19: stack: 0) IL_0000: ldc.i4.s  13
converting (in B19: stack: 1) IL_0002: ldc.i4.s  22
converting (in B19: stack: 2) IL_0004: call      0x06000704
inline failed: call
INLINE ABORTED System.ThrowHelper:ThrowArgumentOutOfRangeException () (cost -1)
converting (in B14: stack: 0) IL_000e: ldarg.0   
converting (in B14: stack: 1) IL_000f: ldfld     0x0a000aa7
converting (in B14: stack: 1) IL_0014: ldarg.1   
converting (in B14: stack: 2) IL_0015: call      0x2b0001a5
converting (in B14: stack: 1) IL_001a: ret       
INLINE END Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) -> System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)
converting (in B14: stack: 3) IL_002d: stobj     0x02000009
converting (in B14: stack: 1) IL_0032: ret       
REGION BB0 IL_0000 ID_FFFFFFFF
REGION BB3 IL_0000 ID_FFFFFFFF
REGION BB2 IL_0028 ID_FFFFFFFF
REGION BB12 IL_0028 ID_FFFFFFFF
REGION BB15 IL_0028 ID_FFFFFFFF
REGION BB14 IL_0032 ID_FFFFFFFF
REGION BB1 IL_0000 ID_FFFFFFFF
AFTER METHOD-TO-IR 0: [IN: , OUT:  BB3(0) ]
AFTER METHOD-TO-IR 3: [IN:  BB0(0), OUT:  BB2(0) ]
 iconst R12 <- [0]
 iconst R13 <- [0]
 iconst R14 <- [0]
AFTER METHOD-TO-IR 2: [IN:  BB3(0), OUT:  BB12(0) ]
 il_seq_point il: 0x0
 move R15 <- R9
 load_membase R16 <- [R15 + 0x8]
 nop
 move R18 <- R16
 move R19 <- R18
 checkthis [R19 + 0x0]
 not_null R19
 move R20 <- R18
 loadi4_membase R21 <- [R20 + 0xc]
 move R17 <- R21
 nop
 move R22 <- R17
 il_seq_point il: 0xb, nonempty-stack
 nop
 int_sub_imm R24 <- R22 [1] clobbers: 1
 nop
 nop
 int_div_imm R26 <- R24 clobbers: d
 move R12 <- R26
 il_seq_point il: 0x10
 iconst R13 <- [1]
 il_seq_point il: 0x12
 move R29 <- R13
 nop
 int_mul_imm R31 <- R29
 move R14 <- R31
 il_seq_point il: 0x16
 fmove R32 <- R10
 move R33 <- R13
 int_conv_to_r4 R34 <- R33
 move R35 <- R12
 int_conv_to_r4 R36 <- R35
 float_div R37 <- R34 R36
 float_sub R38 <- R32 R37
 move R39 <- R12
 int_conv_to_r4 R40 <- R39
 float_mul R41 <- R38 R40
 move R42 <- R11
 move R43 <- R9
 load_membase R44 <- [R43 + 0x8]
 move R45 <- R14
 nop
 move R47 <- R44
 move R48 <- R45
 move R49 <- R47
 checkthis [R49 + 0x0]
 not_null R49
AFTER METHOD-TO-IR 12: [IN:  BB2(0), OUT:  BB14(0) BB15(0) ]
 move R50 <- R48
 move R51 <- R47
 loadi4_membase R52 <- [R51 + 0xc]
 icompare R50 R52
 int_blt_un [B14B15]
AFTER METHOD-TO-IR 15: [IN:  BB12(0), OUT:  BB14(0) ]
 voidcall [System.ThrowHelper:ThrowArgumentOutOfRangeException ()] clobbers: c
AFTER METHOD-TO-IR 14: [IN:  BB12(0) BB15(0), OUT:  BB1(0) ]
 move R55 <- R47
 load_membase R56 <- [R55 + 0x8]
 move R57 <- R48
 mul_imm R58 <- R57
 int_add R59 <- R56 R58 clobbers: 1
 int_add_imm R59 <- R59 [16] clobbers: 1
 loadv_membase R60 <- R59
 vmove R46 <- R60
 nop
 vmove R61 <- R46
 il_seq_point il: 0x2d, nonempty-stack
 storev_membase [R42 + 0x0] <- R61
 il_seq_point il: 0x32
 br [B1]
AFTER METHOD-TO-IR 1: [IN:  BB14(0), OUT:  ]
CCOPY/2: R15 -> R9
CCOPY/2: R20 -> R18
CCOPY/2: R35 -> R12
CCOPY/2: R39 -> R12
CCOPY/2: R43 -> R9
CCOPY/2: R47 -> R44
CCOPY/2: R49 -> R44
CCOPY/2: R49 -> R44
CCOPY/2: R51 -> R47
CCOPY/2: R50 -> R48
CCOPY/2: R55 -> R47
CCOPY/2: R57 -> R48
block merge triggered 3 -> 2
cbranch to throw block triggered 12.
br removal triggered 14 -> 1
block merge triggered 3 -> 12

HANDLE-GLOBAL-VREGS BLOCK 0:

HANDLE-GLOBAL-VREGS BLOCK 3:
 iconst R12 <- [0]
 iconst R13 <- [0]
 iconst R14 <- [0]
 il_seq_point il: 0x0
 move R15 <- R9
 load_membase R16 <- [R9 + 0x8]
 move R18 <- R16
 move R19 <- R18
 checkthis [R19 + 0x0]
 not_null R19
 move R20 <- R18
 loadi4_membase R21 <- [R18 + 0xc]
 move R17 <- R21
 move R22 <- R17
 il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R24 <- R22 [1] clobbers: 1
 iconst R65 <- [1431655766]
 bigmul R62 <- R24 R65
  Create LVAR R62 (R63, R64)
created temp 12 (R62) of type System.Int64
LONG VREG R62 made global.
 int_shr_imm R65 <- R64 clobbers: 1
 int_shr_un_imm R26 <- R65 clobbers: 1
 int_add R26 <- R26 R65 clobbers: 1
 move R12 <- R26
 il_seq_point il: 0x10
 iconst R13 <- [1]
 il_seq_point il: 0x12
 iconst R29 <- [1]
 iconst R31 <- [3]
 iconst R14 <- [3]
 il_seq_point il: 0x16
 fmove R32 <- R10
 iconst R33 <- [1]
 int_conv_to_r4 R34 <- R33
 move R35 <- R12
 int_conv_to_r4 R36 <- R12
 float_div R37 <- R34 R36
 float_sub R38 <- R32 R37
 move R39 <- R12
 int_conv_to_r4 R40 <- R12
 float_mul R41 <- R38 R40
 move R42 <- R11
 move R43 <- R9
 load_membase R44 <- [R9 + 0x8]
 iconst R45 <- [3]
 move R47 <- R44
 iconst R48 <- [3]
 move R49 <- R44
 checkthis [R44 + 0x0]
 not_null R44
 move R50 <- R48
 move R51 <- R47
 loadi4_membase R52 <- [R47 + 0xc]
 icompare R48 R52
 int_bge_un [B15B14]

HANDLE-GLOBAL-VREGS BLOCK 14:
 move R55 <- R47
 load_membase R56 <- [R47 + 0x8]
 move R57 <- R48
 mul_imm R58 <- R48
 int_add R59 <- R56 R58 clobbers: 1
 int_add_imm R59 <- R59 [16] clobbers: 1
 loadv_membase R60 <- R59
 vmove R46 <- R60
 vmove R61 <- R46
 il_seq_point il: 0x2d, nonempty-stack
 storev_membase [R42 + 0x0] <- R61
VREG R42 used in BB4 and BB14 made global.
created temp 13 (R42) of type System.IntPtr
 il_seq_point il: 0x32
 nop

HANDLE-GLOBAL-VREGS BLOCK 1:

HANDLE-GLOBAL-VREGS BLOCK 15:
 voidcall [System.ThrowHelper:ThrowArgumentOutOfRangeException ()] clobbers: c
 br [B14]
CONVERTED R12(4) TO VREG.
CONVERTED R13(5) TO VREG.
CONVERTED R14(6) TO VREG.
CONVERTED R17(7) TO VREG.
CONVERTED R18(8) TO VREG.
CONVERTED R46(9) TO VREG.
	Reverse copyprop in BB3 on  move R12 <- R26
	Reverse copyprop in BB3 on  move R22 <- R17
	Reverse copyprop in BB3 on  move R22 <- R21
	Reverse copyprop in BB3 on  move R18 <- R16
	Reverse copyprop in BB14 on  vmove R61 <- R46
	Reverse copyprop in BB14 on  vmove R61 <- R60
BB0 IN: 
BB3 IN: 0 
BB14 IN: 15 3 
BB1 IN: 14 
BB15 IN: 3 
DTREE Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) 0
BB0(dfn=0) (IDOM=BB-1):  BB0
BB3(dfn=1) (IDOM=BB0):  BB0 BB3
BB14(dfn=2) (IDOM=BB3):  BB0 BB3 BB14
BB1(dfn=3) (IDOM=BB14):  BB0 BB3 BB14 BB1
BB15(dfn=4) (IDOM=BB3):  BB0 BB3 BB15
BEFORE LOWER-VTYPE-OPTS  0: [IN: , OUT:  BB3(1) ]
AFTER LOWER-VTYPE-OPTS  0: [IN: , OUT:  BB3(1) ]
BEFORE LOWER-VTYPE-OPTS  3: [IN:  BB0(0), OUT:  BB14(2) BB15(4) ]
 il_seq_point il: 0x0
 load_membase R18 <- [R9 + 0x8]
 move R19 <- R18
 checkthis [R19 + 0x0]
 not_null R19
 loadi4_membase R22 <- [R18 + 0xc]
 il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R24 <- R22 [1] clobbers: 1
 iconst R65 <- [1431655766]
 bigmul R62 <- R24 R65
 int_shr_imm R65 <- R64 clobbers: 1
 int_shr_un_imm R26 <- R65 clobbers: 1
 int_add R12 <- R26 R65 clobbers: 1
 il_seq_point il: 0x10
 il_seq_point il: 0x12
 il_seq_point il: 0x16
 fmove R32 <- R10
 iconst R33 <- [1]
 int_conv_to_r4 R34 <- R33
 int_conv_to_r4 R36 <- R12
 float_div R37 <- R34 R36
 float_sub R38 <- R32 R37
 int_conv_to_r4 R40 <- R12
 float_mul R41 <- R38 R40
 move R42 <- R11
 load_membase R44 <- [R9 + 0x8]
 move R47 <- R44
 iconst R48 <- [3]
 checkthis [R44 + 0x0]
 not_null R44
 loadi4_membase R52 <- [R47 + 0xc]
 icompare R48 R52
 int_bge_un [B15B14]
AFTER LOWER-VTYPE-OPTS  3: [IN:  BB0(0), OUT:  BB14(2) BB15(4) ]
 il_seq_point il: 0x0
 load_membase R18 <- [R9 + 0x8]
 move R19 <- R18
 checkthis [R19 + 0x0]
 not_null R19
 loadi4_membase R22 <- [R18 + 0xc]
 il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R24 <- R22 [1] clobbers: 1
 iconst R65 <- [1431655766]
 bigmul R62 <- R24 R65
 int_shr_imm R65 <- R64 clobbers: 1
 int_shr_un_imm R26 <- R65 clobbers: 1
 int_add R12 <- R26 R65 clobbers: 1
 il_seq_point il: 0x10
 il_seq_point il: 0x12
 il_seq_point il: 0x16
 fmove R32 <- R10
 iconst R33 <- [1]
 int_conv_to_r4 R34 <- R33
 int_conv_to_r4 R36 <- R12
 float_div R37 <- R34 R36
 float_sub R38 <- R32 R37
 int_conv_to_r4 R40 <- R12
 float_mul R41 <- R38 R40
 move R42 <- R11
 load_membase R44 <- [R9 + 0x8]
 move R47 <- R44
 iconst R48 <- [3]
 checkthis [R44 + 0x0]
 not_null R44
 loadi4_membase R52 <- [R47 + 0xc]
 icompare R48 R52
 int_bge_un [B15B14]
BEFORE LOWER-VTYPE-OPTS  14: [IN:  BB15(4) BB3(1), OUT:  BB1(3) ]
 load_membase R56 <- [R47 + 0x8]
 mul_imm R58 <- R48
 int_add R59 <- R56 R58 clobbers: 1
 int_add_imm R59 <- R59 [16] clobbers: 1
 loadv_membase R61 <- R59
 il_seq_point il: 0x2d, nonempty-stack
 storev_membase [R42 + 0x0] <- R61
 il_seq_point il: 0x32
created temp 8 (R61) of type Program.Vector3ForBug
AFTER LOWER-VTYPE-OPTS  14: [IN:  BB15(4) BB3(1), OUT:  BB1(3) ]
 load_membase R56 <- [R47 + 0x8]
 mul_imm R58 <- R48
 int_add R59 <- R56 R58 clobbers: 1
 int_add_imm R59 <- R59 [16] clobbers: 1
 add_imm R66 <- R59 [0] clobbers: 1
 ldaddr R67 <- R61
 loadi4_membase R68 <- [R66 + 0x0]
 storei4_membase_reg [R67] <- R68
 loadi4_membase R69 <- [R66 + 0x4]
 storei4_membase_reg [R67 + 0x4] <- R69
 loadi4_membase R70 <- [R66 + 0x8]
 storei4_membase_reg [R67 + 0x8] <- R70
 il_seq_point il: 0x2d, nonempty-stack
 ldaddr R71 <- R61
 add_imm R72 <- R42 [0] clobbers: 1
 loadi4_membase R73 <- [R71 + 0x0]
 storei4_membase_reg [R72] <- R73
 loadi4_membase R74 <- [R71 + 0x4]
 storei4_membase_reg [R72 + 0x4] <- R74
 loadi4_membase R75 <- [R71 + 0x8]
 storei4_membase_reg [R72 + 0x8] <- R75
 il_seq_point il: 0x32
BEFORE LOWER-VTYPE-OPTS  1: [IN:  BB14(2), OUT:  ]
AFTER LOWER-VTYPE-OPTS  1: [IN:  BB14(2), OUT:  ]
BEFORE LOWER-VTYPE-OPTS  15: [IN:  BB3(1), OUT:  BB14(2) ]
 voidcall [System.ThrowHelper:ThrowArgumentOutOfRangeException ()] clobbers: c
 br [B14]
AFTER LOWER-VTYPE-OPTS  15: [IN:  BB3(1), OUT:  BB14(2) ]
 voidcall [System.ThrowHelper:ThrowArgumentOutOfRangeException ()] clobbers: c
 br [B14]

LIVENESS:
BLOCK BB0 (BB3, ):
GEN  BB0: {}
KILL BB0: {}
BLOCK BB3 (BB14, BB15, ):
	1  il_seq_point il: 0x0
	1  load_membase R18 <- [R9 + 0x8]
	GEN: R9(1)
	1  move R19 <- R18
	1  checkthis [R19 + 0x0]
	1  not_null R19
	1  loadi4_membase R22 <- [R18 + 0xc]
	1  il_seq_point il: 0xb, nonempty-stack
	1  int_sub_imm R24 <- R22 [1] clobbers: 1
	1  iconst R65 <- [1431655766]
	1  bigmul R62 <- R24 R65
	KILL: R62(6)
	1  int_shr_imm R65 <- R64 clobbers: 1
	GEN: R64(6)
	1  int_shr_un_imm R26 <- R65 clobbers: 1
	1  int_add R12 <- R26 R65 clobbers: 1
	1  il_seq_point il: 0x10
	1  il_seq_point il: 0x12
	1  il_seq_point il: 0x16
	1  fmove R32 <- R10
	GEN: R10(2)
	1  iconst R33 <- [1]
	1  int_conv_to_r4 R34 <- R33
	1  int_conv_to_r4 R36 <- R12
	1  float_div R37 <- R34 R36
	1  float_sub R38 <- R32 R37
	1  int_conv_to_r4 R40 <- R12
	1  float_mul R41 <- R38 R40
	1  move R42 <- R11
	GEN: R11(3)
	KILL: R42(7)
	1  load_membase R44 <- [R9 + 0x8]
	GEN: R9(1)
	1  move R47 <- R44
	KILL: R47(4)
	1  iconst R48 <- [3]
	KILL: R48(5)
	1  checkthis [R44 + 0x0]
	1  not_null R44
	1  loadi4_membase R52 <- [R47 + 0xc]
	GEN: R47(4)
	1  icompare R48 R52
	GEN: R48(5)
	1  int_bge_un [B15B14]
GEN  BB3: {1, 2, 3}
KILL BB3: {4, 5, 6, 7}
BLOCK BB14 (BB1, ):
	1  load_membase R56 <- [R47 + 0x8]
	GEN: R47(4)
	1  mul_imm R58 <- R48
	GEN: R48(5)
	1  int_add R59 <- R56 R58 clobbers: 1
	1  int_add_imm R59 <- R59 [16] clobbers: 1
	1  add_imm R66 <- R59 [0] clobbers: 1
	1  ldaddr R67 <- R61
	GEN: R61(8)
	1  loadi4_membase R68 <- [R66 + 0x0]
	1  storei4_membase_reg [R67] <- R68
	1  loadi4_membase R69 <- [R66 + 0x4]
	1  storei4_membase_reg [R67 + 0x4] <- R69
	1  loadi4_membase R70 <- [R66 + 0x8]
	1  storei4_membase_reg [R67 + 0x8] <- R70
	1  il_seq_point il: 0x2d, nonempty-stack
	1  ldaddr R71 <- R61
	GEN: R61(8)
	1  add_imm R72 <- R42 [0] clobbers: 1
	GEN: R42(7)
	1  loadi4_membase R73 <- [R71 + 0x0]
	1  storei4_membase_reg [R72] <- R73
	1  loadi4_membase R74 <- [R71 + 0x4]
	1  storei4_membase_reg [R72 + 0x4] <- R74
	1  loadi4_membase R75 <- [R71 + 0x8]
	1  storei4_membase_reg [R72 + 0x8] <- R75
	1  il_seq_point il: 0x32
GEN  BB14: {4, 5, 7, 8}
KILL BB14: {}
BLOCK BB1 ():
GEN  BB1: {}
KILL BB1: {}
BLOCK BB15 (BB14, ):
	1  voidcall [System.ThrowHelper:ThrowArgumentOutOfRangeException ()] clobbers: c
	1  br [B14]
GEN  BB15: {}
KILL BB15: {}

ITERATION:
P: BB15(4): IN: BB3 OUT:BB14 
	LIVE IN  BB15: {4, 5, 7, 8}
P: BB1(3): IN: BB14 OUT:
P: BB14(2): IN: BB15 BB3 OUT:BB1 
	LIVE IN  BB14: {4, 5, 7, 8}
P: BB3(1): IN: BB0 OUT:BB14 BB15 
	LIVE IN  BB3: {1, 2, 3, 8}
P: BB0(0): IN: OUT:BB3 
	LIVE IN  BB0: {1, 2, 3, 8}
IT: 5 4.
LIVE IN  BB15: {4, 5, 7, 8}
LIVE OUT BB15: {4, 5, 7, 8}
LIVE IN  BB1: {}
LIVE OUT BB1: {}
LIVE IN  BB14: {4, 5, 7, 8}
LIVE OUT BB14: {}
LIVE IN  BB3: {1, 2, 3, 8}
LIVE OUT BB3: {4, 5, 7, 8}
LIVE IN  BB0: {1, 2, 3, 8}
LIVE OUT BB0: {1, 2, 3, 8}
V0: [0x0 - 0x0]
V1: [0x0 - 0x40034]
V2: [0x0 - 0x40022]
V3: [0x0 - 0x40032]
V4: [0x40037 - 0x13ffff]
V5: [0x40039 - 0x13ffff]
V6: [0x40015 - 0x40016]
V7: [0x40033 - 0x13ffff]
V8: [0x0 - 0x13ffff]
COSTLY: R3 C1 C3 %edi
NOT REGVAR: 3
ALLOCATED R9(1) TO HREG 6 COST 2
ALLOCATED R42(7) TO HREG 7 COST 2
ALLOCATED R47(4) TO HREG 6 COST 3
ALLOCATED R48(5) TO HREG 3 COST 3

SPILL BLOCK 0:

SPILL BLOCK 3:
 il_seq_point il: 0x0
	     -1
	1  il_seq_point il: 0x0
 load_membase R18 <- [R9 + 0x8]
	 ii  18 9
	1  load_membase R18 <- [%esi + 0x8]
 move R19 <- R18
	 ii  19 18
	1  move R19 <- R18
 checkthis [R19 + 0x0]
	  i  -1 19
	1  checkthis [R19 + 0x0]
 not_null R19
	  i  -1 19
	1  not_null R19
 loadi4_membase R22 <- [R18 + 0xc]
	 ii  22 18
	1  loadi4_membase R22 <- [R18 + 0xc]
 il_seq_point il: 0xb, nonempty-stack
	     -1
	1  il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R24 <- R22 [1] clobbers: 1
	 ii  24 22
	1  int_sub_imm R24 <- R22 [1] clobbers: 1
 iconst R65 <- [1431655766]
	 i   65
	1  iconst R65 <- [1431655766]
 bigmul R62 <- R24 R65
	 lii 62 24 65
	1  bigmul R76 <- R24 R65
 storei4_membase_reg [%ebp + 0xffffffdc] <- R78
	  ii -1 78
	1  storei4_membase_reg [%ebp + 0xffffffdc] <- R78
 storei4_membase_reg [%ebp + 0xffffffd8] <- R77
	  ii -1 77
	1  storei4_membase_reg [%ebp + 0xffffffd8] <- R77
 int_shr_imm R65 <- R64 clobbers: 1
	 ii  65 64
	1  int_shr_imm R65 <- R79 clobbers: 1
 int_shr_un_imm R26 <- R65 clobbers: 1
	 ii  26 65
	1  int_shr_un_imm R26 <- R65 clobbers: 1
 int_add R12 <- R26 R65 clobbers: 1
	 iii 12 26 65
	1  int_add R12 <- R26 R65 clobbers: 1
 il_seq_point il: 0x10
	     -1
	1  il_seq_point il: 0x10
 il_seq_point il: 0x12
	     -1
	1  il_seq_point il: 0x12
 il_seq_point il: 0x16
	     -1
	1  il_seq_point il: 0x16
 fmove R32 <- R10
	 ff  32 10
	1  nop
 iconst R33 <- [1]
	 i   33
	1  iconst R33 <- [1]
 int_conv_to_r4 R34 <- R33
	 fi  34 33
	1  int_conv_to_r4 R34 <- R33
 int_conv_to_r4 R36 <- R12
	 fi  36 12
	1  int_conv_to_r4 R36 <- R12
 float_div R37 <- R34 R36
	 fff 37 34 36
	1  float_div R37 <- R34 R36
 float_sub R38 <- R32 R37
	 fff 38 32 37
	1  float_sub R38 <- R32 R37
 int_conv_to_r4 R40 <- R12
	 fi  40 12
	1  int_conv_to_r4 R40 <- R12
 float_mul R41 <- R38 R40
	 fff 41 38 40
	1  float_mul R41 <- R38 R40
 move R42 <- R11
	 ii  42 11
	1  nop
 load_membase R44 <- [R9 + 0x8]
	 ii  44 9
	1  load_membase R44 <- [%esi + 0x8]
 move R47 <- R44
	 ii  47 44
	1  move %esi <- R44
 iconst R48 <- [3]
	 i   48
	1  iconst %ebx <- [3]
 checkthis [R44 + 0x0]
	  i  -1 44
	1  checkthis [R44 + 0x0]
 not_null R44
	  i  -1 44
	1  not_null R44
 loadi4_membase R52 <- [R47 + 0xc]
	 ii  52 47
	1  loadi4_membase R52 <- [%esi + 0xc]
 icompare R48 R52
	  ii -1 48 52
	1  icompare %ebx R52
 int_bge_un [B15B14]
	     -1
	1  int_bge_un [B15B14]

SPILL BLOCK 14:
 load_membase R56 <- [R47 + 0x8]
	 ii  56 47
	1  load_membase R56 <- [%esi + 0x8]
 mul_imm R58 <- R48
	 ii  58 48
	1  mul_imm R58 <- %ebx
 int_add R59 <- R56 R58 clobbers: 1
	 iii 59 56 58
	1  int_add R59 <- R56 R58 clobbers: 1
 int_add_imm R59 <- R59 [16] clobbers: 1
	 ii  59 59
	1  int_add_imm R59 <- R59 [16] clobbers: 1
 add_imm R66 <- R59 [0] clobbers: 1
	 ii  66 59
	1  add_imm R66 <- R59 [0] clobbers: 1
 ldaddr R67 <- R61
	 ii  67 5
	1  add_imm R67 <- %ebp [-28] clobbers: 1
 loadi4_membase R68 <- [R66 + 0x0]
	 ii  68 66
	1  loadi4_membase R68 <- [R66 + 0x0]
 storei4_membase_reg [R67] <- R68
	  ii -1 68
	1  storei4_membase_reg [R67] <- R68
 loadi4_membase R69 <- [R66 + 0x4]
	 ii  69 66
	1  loadi4_membase R69 <- [R66 + 0x4]
 storei4_membase_reg [R67 + 0x4] <- R69
	  ii -1 69
	1  storei4_membase_reg [R67 + 0x4] <- R69
 loadi4_membase R70 <- [R66 + 0x8]
	 ii  70 66
	1  loadi4_membase R70 <- [R66 + 0x8]
 storei4_membase_reg [R67 + 0x8] <- R70
	  ii -1 70
	1  storei4_membase_reg [R67 + 0x8] <- R70
 il_seq_point il: 0x2d, nonempty-stack
	     -1
	1  il_seq_point il: 0x2d, nonempty-stack
 ldaddr R71 <- R61
	 ii  71 5
	1  add_imm R71 <- %ebp [-28] clobbers: 1
 add_imm R72 <- R42 [0] clobbers: 1
	 ii  72 42
	1  add_imm R72 <- %edi [0] clobbers: 1
 loadi4_membase R73 <- [R71 + 0x0]
	 ii  73 71
	1  loadi4_membase R73 <- [R71 + 0x0]
 storei4_membase_reg [R72] <- R73
	  ii -1 73
	1  storei4_membase_reg [R72] <- R73
 loadi4_membase R74 <- [R71 + 0x4]
	 ii  74 71
	1  loadi4_membase R74 <- [R71 + 0x4]
 storei4_membase_reg [R72 + 0x4] <- R74
	  ii -1 74
	1  storei4_membase_reg [R72 + 0x4] <- R74
 loadi4_membase R75 <- [R71 + 0x8]
	 ii  75 71
	1  loadi4_membase R75 <- [R71 + 0x8]
 storei4_membase_reg [R72 + 0x8] <- R75
	  ii -1 75
	1  storei4_membase_reg [R72 + 0x8] <- R75
 il_seq_point il: 0x32
	     -1
	1  il_seq_point il: 0x32

SPILL BLOCK 1:

SPILL BLOCK 15:
 voidcall [System.ThrowHelper:ThrowArgumentOutOfRangeException ()] clobbers: c
	     -1
	1  voidcall [System.ThrowHelper:ThrowArgumentOutOfRangeException ()] clobbers: c
 br [B14]
	     -1
	1  br [B14]
CCOPY: R72 -> R7
CCOPY: R72 -> R7
CCOPY: R72 -> R7
	Reverse copyprop in BB14 on  move R66 <- R59
DUMP BLOCK 0:
DUMP BLOCK 3:
 il_seq_point il: 0x0
 load_membase R18 <- [%esi + 0x8]
 move R19 <- R18
 checkthis [R19 + 0x0]
 not_null R19
 loadi4_membase R22 <- [R18 + 0xc]
 il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R24 <- R22 [1] clobbers: 1
 iconst R65 <- [1431655766]
 bigmul R76 <- R24 R65
 storei4_membase_reg [%ebp + 0xffffffdc] <- R78
 storei4_membase_reg [%ebp + 0xffffffd8] <- R77
 loadi4_membase R79 <- [%ebp + 0xffffffdc]
 int_shr_imm R65 <- R79 clobbers: 1
 int_shr_un_imm R26 <- R65 clobbers: 1
 int_add R12 <- R26 R65 clobbers: 1
 il_seq_point il: 0x10
 il_seq_point il: 0x12
 il_seq_point il: 0x16
 loadr4_membase R32 <- [%ebp + 0xc]
 iconst R33 <- [1]
 int_conv_to_r4 R34 <- R33
 int_conv_to_r4 R36 <- R12
 float_div R37 <- R34 R36
 float_sub R38 <- R32 R37
 int_conv_to_r4 R40 <- R12
 float_mul R41 <- R38 R40
 load_membase %edi <- [%ebp + 0x10]
 load_membase R44 <- [%esi + 0x8]
 move %esi <- R44
 iconst %ebx <- [3]
 checkthis [R44 + 0x0]
 not_null R44
 loadi4_membase R52 <- [%esi + 0xc]
 icompare %ebx R52
 int_bge_un [B15B14]
DUMP BLOCK 14:
 load_membase R56 <- [%esi + 0x8]
 mul_imm R58 <- %ebx
 int_add R59 <- R56 R58 clobbers: 1
 int_add_imm R66 <- R59 [16] clobbers: 1
 loadi4_membase R68 <- [R66 + 0x0]
 storei4_membase_reg [%ebp + 0xffffffe4] <- R68
 loadi4_membase R69 <- [R66 + 0x4]
 storei4_membase_reg [%ebp + 0xffffffe8] <- R69
 loadi4_membase R70 <- [R66 + 0x8]
 storei4_membase_reg [%ebp + 0xffffffec] <- R70
 il_seq_point il: 0x2d, nonempty-stack
 loadi4_membase R73 <- [%ebp + 0xffffffe4]
 storei4_membase_reg [%edi] <- R73
 loadi4_membase R74 <- [%ebp + 0xffffffe8]
 storei4_membase_reg [%edi + 0x4] <- R74
 loadi4_membase R75 <- [%ebp + 0xffffffec]
 storei4_membase_reg [%edi + 0x8] <- R75
 il_seq_point il: 0x32
DUMP BLOCK 1:
DUMP BLOCK 15:
 voidcall [System.ThrowHelper:ThrowArgumentOutOfRangeException ()] clobbers: c
 br [B14]

LOCAL REGALLOC BLOCK 3:
	1  il_seq_point il: 0x0
	2  load_membase R18 <- [%esi + 0x8]
	3  move R19 <- R18
	4  checkthis [R19 + 0x0]
	5  not_null R19
	6  loadi4_membase R22 <- [R18 + 0xc]
	7  il_seq_point il: 0xb, nonempty-stack
	8  int_sub_imm R24 <- R22 [1] clobbers: 1
	9  iconst R65 <- [1431655766]
	10 bigmul R77 <- R24 R65
	11 storei4_membase_reg [%ebp + 0xffffffdc] <- R78
	12 storei4_membase_reg [%ebp + 0xffffffd8] <- R77
	13 loadi4_membase R79 <- [%ebp + 0xffffffdc]
	14 int_shr_imm R65 <- R79 clobbers: 1
	15 int_shr_un_imm R26 <- R65 clobbers: 1
	16 int_add R12 <- R26 R65 clobbers: 1
	17 il_seq_point il: 0x10
	18 il_seq_point il: 0x12
	19 il_seq_point il: 0x16
	20 loadr4_membase R32 <- [%ebp + 0xc]
	21 iconst R33 <- [1]
	22 int_conv_to_r4 R34 <- R33
	23 int_conv_to_r4 R36 <- R12
	24 float_div R37 <- R34 R36
	25 float_sub R38 <- R32 R37
	26 int_conv_to_r4 R40 <- R12
	27 float_mul R41 <- R38 R40
	28 load_membase %edi <- [%ebp + 0x10]
	29 load_membase R44 <- [%esi + 0x8]
	30 move %esi <- R44
	31 iconst %ebx <- [3]
	32 checkthis [R44 + 0x0]
	33 not_null R44
	34 loadi4_membase R52 <- [%esi + 0xc]
	35 icompare %ebx R52
	36 int_bge_un [B15B14]
liveness: %ebx [31 - 31]
liveness: %ebp [11 - 0]
liveness: %esi [30 - 30]
liveness: %edi [28 - 28]
liveness: R12 [16 - 16]
liveness: R18 [2 - 2]
liveness: R19 [3 - 3]
liveness: R22 [6 - 6]
liveness: R24 [8 - 8]
liveness: R26 [15 - 15]
liveness: R32 [20 - 20]
liveness: R33 [21 - 21]
liveness: R34 [22 - 22]
liveness: R36 [23 - 23]
liveness: R37 [24 - 24]
liveness: R38 [25 - 25]
liveness: R40 [26 - 26]
liveness: R41 [27 - 27]
liveness: R44 [29 - 29]
liveness: R52 [34 - 34]
liveness: R65 [9 - 14]
liveness: R77 [10 - 10]
liveness: R78 [10 - 0]
liveness: R79 [13 - 13]
processing:	36 int_bge_un [B15B14]
	36 int_bge_un [B15B14]
processing:	35 icompare %ebx R52
	assigned sreg2 %eax to R52
	35 icompare %ebx %eax
processing:	34 loadi4_membase R52 <- [%esi + 0xc]
	assigned dreg %eax to dest R52
	freeable %eax (R52) (born in 34)
	34 loadi4_membase %eax <- [%esi + 0xc]
processing:	33 not_null R44
	assigned sreg1 %eax to R44
	33 not_null %eax
processing:	32 checkthis [R44 + 0x0]
	32 checkthis [%eax + 0x0]
processing:	31 iconst %ebx <- [3]
	31 iconst %ebx <- [3]
processing:	30 move %esi <- R44
	30 move %esi <- %eax
processing:	29 load_membase R44 <- [%esi + 0x8]
	assigned dreg %eax to dest R44
	freeable %eax (R44) (born in 29)
	29 load_membase %eax <- [%esi + 0x8]
processing:	28 load_membase %edi <- [%ebp + 0x10]
	28 load_membase %edi <- [%ebp + 0x10]
processing:	27 float_mul R41 <- R38 R40
	assigned dreg %fr0 to dest R41
	freeable %fr0 (R41) (born in 27)
	assigned sreg1 %fr0 to R38
	assigned sreg2 %fr1 to R40
	27 float_mul %fr0 <- %fr0 %fr1
processing:	26 int_conv_to_r4 R40 <- R12
	assigned dreg %fr1 to dest R40
	freeable %fr1 (R40) (born in 26)
	assigned sreg1 %eax to R12
	26 int_conv_to_r4 %fr1 <- %eax
processing:	25 float_sub R38 <- R32 R37
	assigned dreg %fr0 to dest R38
	freeable %fr0 (R38) (born in 25)
	assigned sreg1 %fr0 to R32
	assigned sreg2 %fr1 to R37
	25 float_sub %fr0 <- %fr0 %fr1
processing:	24 float_div R37 <- R34 R36
	assigned dreg %fr1 to dest R37
	freeable %fr1 (R37) (born in 24)
	assigned sreg1 %fr1 to R34
	assigned sreg2 %fr2 to R36
	24 float_div %fr1 <- %fr1 %fr2
processing:	23 int_conv_to_r4 R36 <- R12
	assigned dreg %fr2 to dest R36
	freeable %fr2 (R36) (born in 23)
	23 int_conv_to_r4 %fr2 <- %eax
processing:	22 int_conv_to_r4 R34 <- R33
	assigned dreg %fr1 to dest R34
	freeable %fr1 (R34) (born in 22)
	assigned sreg1 %ecx to R33
	22 int_conv_to_r4 %fr1 <- %ecx
processing:	21 iconst R33 <- [1]
	assigned dreg %ecx to dest R33
	freeable %ecx (R33) (born in 21)
	21 iconst %ecx <- [1]
processing:	20 loadr4_membase R32 <- [%ebp + 0xc]
	assigned dreg %fr0 to dest R32
	freeable %fr0 (R32) (born in 20)
	20 loadr4_membase %fr0 <- [%ebp + 0xc]
processing:	19 il_seq_point il: 0x16
	19 il_seq_point il: 0x16
processing:	18 il_seq_point il: 0x12
	18 il_seq_point il: 0x12
processing:	17 il_seq_point il: 0x10
	17 il_seq_point il: 0x10
processing:	16 int_add R12 <- R26 R65 clobbers: 1
	assigned dreg %eax to dest R12
	freeable %eax (R12) (born in 16)
	assigned sreg1 %eax to R26
	assigned sreg2 %ecx to R65
	16 int_add %eax <- %eax %ecx clobbers: 1
processing:	15 int_shr_un_imm R26 <- R65 clobbers: 1
	assigned dreg %eax to dest R26
	freeable %eax (R26) (born in 15)
	need to copy sreg1 %ecx to dreg %eax
	forced copy from %ecx to %eax
	15 int_shr_un_imm %eax <- %eax clobbers: 1
processing:	14 int_shr_imm R65 <- R79 clobbers: 1
	assigned dreg %ecx to dest R65
	freeable %ecx (R65) (born in 9)
	assigned sreg1 %ecx to R79
	14 int_shr_imm %ecx <- %ecx clobbers: 1
processing:	13 loadi4_membase R79 <- [%ebp + 0xffffffdc]
	assigned dreg %ecx to dest R79
	freeable %ecx (R79) (born in 13)
	13 loadi4_membase %ecx <- [%ebp + 0xffffffdc]
processing:	12 storei4_membase_reg [%ebp + 0xffffffd8] <- R77
	allocated preferred reg R77 to %eax
	assigned sreg1 %eax to R77
	12 storei4_membase_reg [%ebp + 0xffffffd8] <- %eax
processing:	11 storei4_membase_reg [%ebp + 0xffffffdc] <- R78
	allocated preferred reg R78 to %edx
	assigned sreg1 %edx to R78
	11 storei4_membase_reg [%ebp + 0xffffffdc] <- %edx
processing:	10 bigmul R77 <- R24 R65
	assigned dreg %eax to dest R77
	assigned dreg-high %edx to dest R78
	freeable %edx (R78)
	freeable %eax (R77) (born in 10)
	assigned sreg1 %eax to R24
	assigned sreg2 %ecx to R65
	10 bigmul %eax <- %eax %ecx
processing:	9  iconst R65 <- [1431655766]
	assigned dreg %ecx to dest R65
	freeable %ecx (R65) (born in 9)
	9  iconst %ecx <- [1431655766]
processing:	8  int_sub_imm R24 <- R22 [1] clobbers: 1
	assigned dreg %eax to dest R24
	freeable %eax (R24) (born in 8)
	assigned sreg1 %eax to R22
	8  int_sub_imm %eax <- %eax [1] clobbers: 1
processing:	7  il_seq_point il: 0xb, nonempty-stack
	7  il_seq_point il: 0xb, nonempty-stack
processing:	6  loadi4_membase R22 <- [R18 + 0xc]
	assigned dreg %eax to dest R22
	freeable %eax (R22) (born in 6)
	assigned sreg1 %eax to R18
	6  loadi4_membase %eax <- [%eax + 0xc]
processing:	5  not_null R19
	assigned sreg1 %ecx to R19
	5  not_null %ecx
processing:	4  checkthis [R19 + 0x0]
	4  checkthis [%ecx + 0x0]
processing:	3  move R19 <- R18
	assigned dreg %ecx to dest R19
	freeable %ecx (R19) (born in 3)
	3  move %ecx <- %eax
processing:	2  load_membase R18 <- [%esi + 0x8]
	assigned dreg %eax to dest R18
	freeable %eax (R18) (born in 2)
	2  load_membase %eax <- [%esi + 0x8]
processing:	1  il_seq_point il: 0x0
	1  il_seq_point il: 0x0
processing:	0  il_seq_point il: 0x0
	[]
processing:	0  load_membase %eax <- [%esi + 0x8]
	[]
processing:	0  move %ecx <- %eax
	[]
processing:	0  checkthis [%ecx + 0x0]
	[]
processing:	0  not_null %ecx
	[]
processing:	0  loadi4_membase %eax <- [%eax + 0xc]
	[]
processing:	0  il_seq_point il: 0xb, nonempty-stack
	[]
processing:	0  int_sub_imm %eax <- %eax [1] clobbers: 1
	[]
processing:	0  iconst %ecx <- [1431655766]
	[]
processing:	0  bigmul %eax <- %eax %ecx
	[]
processing:	0  storei4_membase_reg [%ebp + 0xffffffdc] <- %edx
	[]
processing:	0  storei4_membase_reg [%ebp + 0xffffffd8] <- %eax
	[]
processing:	0  loadi4_membase %ecx <- [%ebp + 0xffffffdc]
	[]
processing:	0  int_shr_imm %ecx <- %ecx clobbers: 1
	[]
processing:	0  move %eax <- %ecx
	[]
processing:	0  int_shr_un_imm %eax <- %eax clobbers: 1
	[]
processing:	0  int_add %eax <- %eax %ecx clobbers: 1
	[]
processing:	0  il_seq_point il: 0x10
	[]
processing:	0  il_seq_point il: 0x12
	[]
processing:	0  il_seq_point il: 0x16
	[]
processing:	0  loadr4_membase %fr0 <- [%ebp + 0xc]
	[%fr0]
processing:	0  iconst %ecx <- [1]
	[%fr0]
processing:	0  int_conv_to_r4 %fr1 <- %ecx
	[%fr0, %fr1]
processing:	0  int_conv_to_r4 %fr2 <- %eax
	[%fr0, %fr1, %fr2]
processing:	0  float_div %fr1 <- %fr1 %fr2
	[%fr0, %fr1]
processing:	0  float_sub %fr0 <- %fr0 %fr1
	[%fr0]
processing:	0  int_conv_to_r4 %fr1 <- %eax
	[%fr0, %fr1]
processing:	0  float_mul %fr0 <- %fr0 %fr1
	[%fr0]
processing:	0  load_membase %edi <- [%ebp + 0x10]
	[%fr0]
processing:	0  load_membase %eax <- [%esi + 0x8]
	[%fr0]
processing:	0  move %esi <- %eax
	[%fr0]
processing:	0  iconst %ebx <- [3]
	[%fr0]
processing:	0  checkthis [%eax + 0x0]
	[%fr0]
processing:	0  not_null %eax
	[%fr0]
processing:	0  loadi4_membase %eax <- [%esi + 0xc]
	[%fr0]
processing:	0  icompare %ebx %eax
	[%fr0]
processing:	0  int_bge_un [B15B14]
	[%fr0]

LOCAL REGALLOC BLOCK 14:
	1  load_membase R56 <- [%esi + 0x8]
	2  mul_imm R58 <- %ebx
	3  int_add R59 <- R56 R58 clobbers: 1
	4  int_add_imm R66 <- R59 [16] clobbers: 1
	5  loadi4_membase R68 <- [R66 + 0x0]
	6  storei4_membase_reg [%ebp + 0xffffffe4] <- R68
	7  loadi4_membase R69 <- [R66 + 0x4]
	8  storei4_membase_reg [%ebp + 0xffffffe8] <- R69
	9  loadi4_membase R70 <- [R66 + 0x8]
	10 storei4_membase_reg [%ebp + 0xffffffec] <- R70
	11 il_seq_point il: 0x2d, nonempty-stack
	12 loadi4_membase R73 <- [%ebp + 0xffffffe4]
	13 storei4_membase_reg [%edi] <- R73
	14 loadi4_membase R74 <- [%ebp + 0xffffffe8]
	15 storei4_membase_reg [%edi + 0x4] <- R74
	16 loadi4_membase R75 <- [%ebp + 0xffffffec]
	17 storei4_membase_reg [%edi + 0x8] <- R75
	18 il_seq_point il: 0x32
liveness: %ebp [6 - 0]
liveness: %edi [13 - 0]
liveness: R56 [1 - 1]
liveness: R58 [2 - 2]
liveness: R59 [3 - 3]
liveness: R66 [4 - 4]
liveness: R68 [5 - 5]
liveness: R69 [7 - 7]
liveness: R70 [9 - 9]
liveness: R73 [12 - 12]
liveness: R74 [14 - 14]
liveness: R75 [16 - 16]
processing:	18 il_seq_point il: 0x32
	18 il_seq_point il: 0x32
processing:	17 storei4_membase_reg [%edi + 0x8] <- R75
	assigned sreg1 %eax to R75
	17 storei4_membase_reg [%edi + 0x8] <- %eax
processing:	16 loadi4_membase R75 <- [%ebp + 0xffffffec]
	assigned dreg %eax to dest R75
	freeable %eax (R75) (born in 16)
	16 loadi4_membase %eax <- [%ebp + 0xffffffec]
processing:	15 storei4_membase_reg [%edi + 0x4] <- R74
	assigned sreg1 %eax to R74
	15 storei4_membase_reg [%edi + 0x4] <- %eax
processing:	14 loadi4_membase R74 <- [%ebp + 0xffffffe8]
	assigned dreg %eax to dest R74
	freeable %eax (R74) (born in 14)
	14 loadi4_membase %eax <- [%ebp + 0xffffffe8]
processing:	13 storei4_membase_reg [%edi] <- R73
	assigned sreg1 %eax to R73
	13 storei4_membase_reg [%edi] <- %eax
processing:	12 loadi4_membase R73 <- [%ebp + 0xffffffe4]
	assigned dreg %eax to dest R73
	freeable %eax (R73) (born in 12)
	12 loadi4_membase %eax <- [%ebp + 0xffffffe4]
processing:	11 il_seq_point il: 0x2d, nonempty-stack
	11 il_seq_point il: 0x2d, nonempty-stack
processing:	10 storei4_membase_reg [%ebp + 0xffffffec] <- R70
	assigned sreg1 %eax to R70
	10 storei4_membase_reg [%ebp + 0xffffffec] <- %eax
processing:	9  loadi4_membase R70 <- [R66 + 0x8]
	assigned dreg %eax to dest R70
	freeable %eax (R70) (born in 9)
	assigned sreg1 %eax to R66
	9  loadi4_membase %eax <- [%eax + 0x8]
processing:	8  storei4_membase_reg [%ebp + 0xffffffe8] <- R69
	assigned sreg1 %ecx to R69
	8  storei4_membase_reg [%ebp + 0xffffffe8] <- %ecx
processing:	7  loadi4_membase R69 <- [R66 + 0x4]
	assigned dreg %ecx to dest R69
	freeable %ecx (R69) (born in 7)
	7  loadi4_membase %ecx <- [%eax + 0x4]
processing:	6  storei4_membase_reg [%ebp + 0xffffffe4] <- R68
	assigned sreg1 %ecx to R68
	6  storei4_membase_reg [%ebp + 0xffffffe4] <- %ecx
processing:	5  loadi4_membase R68 <- [R66 + 0x0]
	assigned dreg %ecx to dest R68
	freeable %ecx (R68) (born in 5)
	5  loadi4_membase %ecx <- [%eax + 0x0]
processing:	4  int_add_imm R66 <- R59 [16] clobbers: 1
	assigned dreg %eax to dest R66
	freeable %eax (R66) (born in 4)
	assigned sreg1 %eax to R59
	4  int_add_imm %eax <- %eax [16] clobbers: 1
processing:	3  int_add R59 <- R56 R58 clobbers: 1
	assigned dreg %eax to dest R59
	freeable %eax (R59) (born in 3)
	assigned sreg1 %eax to R56
	assigned sreg2 %ecx to R58
	3  int_add %eax <- %eax %ecx clobbers: 1
processing:	2  mul_imm R58 <- %ebx
	assigned dreg %ecx to dest R58
	freeable %ecx (R58) (born in 2)
	2  mul_imm %ecx <- %ebx
processing:	1  load_membase R56 <- [%esi + 0x8]
	assigned dreg %eax to dest R56
	freeable %eax (R56) (born in 1)
	1  load_membase %eax <- [%esi + 0x8]

LOCAL REGALLOC BLOCK 15:
	1  voidcall [System.ThrowHelper:ThrowArgumentOutOfRangeException ()] clobbers: c
	2  br [B14]
processing:	2  br [B14]
	2  br [B14]
processing:	1  voidcall [System.ThrowHelper:ThrowArgumentOutOfRangeException ()] clobbers: c
	1  voidcall [System.ThrowHelper:ThrowArgumentOutOfRangeException ()] clobbers: c
CFA: [0] def_cfa: %esp+0x4
CFA: [0] offset: unknown at cfa-0x4
CFA: [1] def_cfa_offset: 0x8
CFA: [1] offset: %ebp at cfa-0x8
CFA: [3] def_cfa_reg: %ebp
CFA: [4] offset: %ebx at cfa-0xc
CFA: [5] offset: %edi at cfa-0x10
CFA: [6] offset: %esi at cfa-0x14
Argument 0 assigned to register %esi
Basic block 0 starting at offset 0xc
Basic block 3 starting at offset 0xc
Basic block 14 starting at offset 0x7e
Basic block 1 starting at offset 0xb0
Basic block 15 starting at offset 0xbb
Method single Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) emitted at 044C18C8 to 044C198A (code length 194) [ConsoleApp1.exe]
NaN

@joncham
Copy link
Contributor Author

joncham commented Oct 12, 2020

I am bisecting Mono now. Will post details shortly...

@joncham
Copy link
Contributor Author

joncham commented Oct 12, 2020

This was fixed after 5.12:

5.14.0.78 -> good
5.12.0.301 -> bad

@joncham
Copy link
Contributor Author

joncham commented Oct 12, 2020

My guess is this was fixed in the float32 optimization PRs.

@vargaz
Copy link
Contributor

vargaz commented Oct 12, 2020

Could you run the 'good' version with -O=-inline ?

@joncham
Copy link
Contributor Author

joncham commented Oct 13, 2020

Version:

"c:\Program Files (x86)\Mono\bin\mono.exe" --version
Mono JIT compiler version 6.12.0 (Visual Studio built mono)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       normal
        Notification:  Thread + polling
        Architecture:  x86
        Disabled:      none
        Misc:          softdebug
        Interpreter:   yes
        Suspend:       preemptive
        GC:            sgen (concurrent by default)

"c:\Program Files (x86)\Mono\bin\mono.exe" -O=-inline D:\dev\ConsoleApp1\ConsoleApp1\bin\Release\ConsoleApp1.exe

converting method single Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&)
created temp 0 (R8) of type System.Single
creating vars
created temp 1 (R9) of type System.IntPtr
created temp 2 (R10) of type System.Single
created temp 3 (R11) of type System.IntPtr
	return :  arg R8 <-
	this:  arg R9 <-
	arg [0]:  arg R10 <-
	arg [1]:  arg R11 <-
creating locals
	local [0]: created temp 4 (R12) of type System.Int32
	local [1]: created temp 5 (R13) of type System.Int32
	local [2]: created temp 6 (R14) of type System.Int32
locals done
method to IR Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&)
converting (in B2: stack: 0) IL_0000: ldarg.0   
converting (in B2: stack: 1) IL_0001: ldfld     0x04000014
converting (in B2: stack: 1) IL_0006: callvirt  0x0a0000a8
cmethod = int System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()
converting (in B2: stack: 1) IL_000b: ldc.i4.1  
converting (in B2: stack: 2) IL_000c: sub       
converting (in B2: stack: 1) IL_000d: ldc.i4.3  
converting (in B2: stack: 2) IL_000e: div       
converting (in B2: stack: 1) IL_000f: stloc.0   
converting (in B2: stack: 0) IL_0010: ldc.i4.1  
converting (in B2: stack: 1) IL_0011: stloc.1   
converting (in B2: stack: 0) IL_0012: ldloc.1   
converting (in B2: stack: 1) IL_0013: ldc.i4.3  
converting (in B2: stack: 2) IL_0014: mul       
converting (in B2: stack: 1) IL_0015: stloc.2   
converting (in B2: stack: 0) IL_0016: ldarg.1   
converting (in B2: stack: 1) IL_0017: ldloc.1   
converting (in B2: stack: 2) IL_0018: conv.r4   
converting (in B2: stack: 2) IL_0019: ldloc.0   
converting (in B2: stack: 3) IL_001a: conv.r4   
converting (in B2: stack: 3) IL_001b: div       
converting (in B2: stack: 2) IL_001c: sub       
converting (in B2: stack: 1) IL_001d: ldloc.0   
converting (in B2: stack: 2) IL_001e: conv.r4   
converting (in B2: stack: 2) IL_001f: mul       
converting (in B2: stack: 1) IL_0020: ldarg.2   
converting (in B2: stack: 2) IL_0021: ldarg.0   
converting (in B2: stack: 3) IL_0022: ldfld     0x04000014
converting (in B2: stack: 3) IL_0027: ldloc.2   
converting (in B2: stack: 4) IL_0028: callvirt  0x0a0000a9
cmethod = Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)
created temp 7 (R41) of type Program.Vector3ForBug
converting (in B2: stack: 3) IL_002d: stobj     0x02000009
converting (in B2: stack: 1) IL_0032: ret       
REGION BB0 IL_0000 ID_FFFFFFFF
REGION BB3 IL_0000 ID_FFFFFFFF
REGION BB2 IL_0032 ID_FFFFFFFF
REGION BB1 IL_0000 ID_FFFFFFFF
AFTER METHOD-TO-IR 0: [IN: , OUT:  BB3(0) ]
AFTER METHOD-TO-IR 3: [IN:  BB0(0), OUT:  BB2(0) ]
 iconst R12 <- [0]
 iconst R13 <- [0]
 iconst R14 <- [0]
AFTER METHOD-TO-IR 2: [IN:  BB3(0), OUT:  BB1(0) ]
 il_seq_point il: 0x0
 move R15 <- R9
 not_null R15
 load_membase R16 <- [R15 + 0x8]
 store_membase_reg [%esp] <- R16
 check_this [R16 + 0x0]
 not_null R16
 call R17 <- [int System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()] clobbers: c
 il_seq_point il: 0xb, nonempty-stack
 nop
 int_sub_imm R19 <- R17 [1] clobbers: 1
 nop
 nop
 int_div_imm R21 <- R19 clobbers: d
 move R12 <- R21
 il_seq_point il: 0x10
 iconst R13 <- [1]
 il_seq_point il: 0x12
 move R24 <- R13
 nop
 int_mul_imm R26 <- R24
 move R14 <- R26
 il_seq_point il: 0x16
 fmove R27 <- R10
 move R28 <- R13
 int_conv_to_r4 R29 <- R28
 move R30 <- R12
 int_conv_to_r4 R31 <- R30
 float_div R32 <- R29 R31
 float_sub R33 <- R27 R32
 move R34 <- R12
 int_conv_to_r4 R35 <- R34
 float_mul R36 <- R33 R35
 move R37 <- R11
 move R38 <- R9
 not_null R38
 load_membase R39 <- [R38 + 0x8]
 move R40 <- R14
 outarg_vtretaddr R42 <- R41
 store_membase_reg [%esp + 0x8] <- R40
 store_membase_reg [%esp + 0x4] <- R42
 store_membase_reg [%esp] <- R39
 check_this [R39 + 0x0]
 not_null R39
 vcall R41 <- [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
 il_seq_point il: 0x2d, nonempty-stack
 storev_membase [R37 + 0x0] <- R41
 il_seq_point il: 0x32
 br [B1]
AFTER METHOD-TO-IR 1: [IN:  BB2(0), OUT:  ]
CCOPY/2: R15 -> R9
CCOPY/2: R15 -> R9
CCOPY/2: R30 -> R12
CCOPY/2: R34 -> R12
CCOPY/2: R38 -> R9
CCOPY/2: R38 -> R9
CCOPY: R37 -> R11
block merge triggered 3 -> 2
br removal triggered 3 -> 1

HANDLE-GLOBAL-VREGS BLOCK 0:

HANDLE-GLOBAL-VREGS BLOCK 3:
 iconst R12 <- [0]
 iconst R13 <- [0]
 iconst R14 <- [0]
 il_seq_point il: 0x0
 move R15 <- R9
 not_null R9
 load_membase R16 <- [R9 + 0x8]
 store_membase_reg [%esp] <- R16
 check_this [R16 + 0x0]
 not_null R16
 call R17 <- [int System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()] clobbers: c
 il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R19 <- R17 [1] clobbers: 1
 iconst R46 <- [1431655766]
 bigmul R43 <- R19 R46
  Create LVAR R43 (R44, R45)
created temp 8 (R43) of type System.Int64
LONG VREG R43 made global.
 int_shr_imm R46 <- R45 clobbers: 1
 int_shr_un_imm R21 <- R46 clobbers: 1
 int_add R21 <- R21 R46 clobbers: 1
 move R12 <- R21
 il_seq_point il: 0x10
 iconst R13 <- [1]
 il_seq_point il: 0x12
 iconst R24 <- [1]
 iconst R26 <- [3]
 iconst R14 <- [3]
 il_seq_point il: 0x16
 fmove R27 <- R10
 iconst R28 <- [1]
 int_conv_to_r4 R29 <- R28
 move R30 <- R12
 int_conv_to_r4 R31 <- R12
 float_div R32 <- R29 R31
 float_sub R33 <- R27 R32
 move R34 <- R12
 int_conv_to_r4 R35 <- R12
 float_mul R36 <- R33 R35
 move R37 <- R11
 move R38 <- R9
 not_null R9
 load_membase R39 <- [R9 + 0x8]
 iconst R40 <- [3]
 outarg_vtretaddr R42 <- R41
 store_membase_imm [%esp + 0x8] <- [3]
 store_membase_reg [%esp + 0x4] <- R42
 store_membase_reg [%esp] <- R39
 check_this [R39 + 0x0]
 not_null R39
 vcall R41 <- [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
 il_seq_point il: 0x2d, nonempty-stack
 storev_membase [R11 + 0x0] <- R41
 il_seq_point il: 0x32
 nop

HANDLE-GLOBAL-VREGS BLOCK 1:
CONVERTED R12(4) TO VREG.
CONVERTED R13(5) TO VREG.
CONVERTED R14(6) TO VREG.
CONVERTED R41(7) TO VREG.
	Reverse copyprop in BB3 on  move R12 <- R21
BB0 IN: 
BB3 IN: 0 
BB1 IN: 3 
DTREE Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) 0
BB0(dfn=0) (IDOM=BB-1):  BB0
BB3(dfn=1) (IDOM=BB0):  BB0 BB3
BB1(dfn=2) (IDOM=BB3):  BB0 BB3 BB1
BEFORE LOWER-VTYPE-OPTS  0: [IN: , OUT:  BB3(1) ]
AFTER LOWER-VTYPE-OPTS  0: [IN: , OUT:  BB3(1) ]
BEFORE LOWER-VTYPE-OPTS  3: [IN:  BB0(0), OUT:  BB1(2) ]
 il_seq_point il: 0x0
 not_null R9
 load_membase R16 <- [R9 + 0x8]
 store_membase_reg [%esp] <- R16
 check_this [R16 + 0x0]
 not_null R16
 call R17 <- [int System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()] clobbers: c
 il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R19 <- R17 [1] clobbers: 1
 iconst R46 <- [1431655766]
 bigmul R43 <- R19 R46
 int_shr_imm R46 <- R45 clobbers: 1
 int_shr_un_imm R21 <- R46 clobbers: 1
 int_add R12 <- R21 R46 clobbers: 1
 il_seq_point il: 0x10
 il_seq_point il: 0x12
 il_seq_point il: 0x16
 fmove R27 <- R10
 iconst R28 <- [1]
 int_conv_to_r4 R29 <- R28
 int_conv_to_r4 R31 <- R12
 float_div R32 <- R29 R31
 float_sub R33 <- R27 R32
 int_conv_to_r4 R35 <- R12
 float_mul R36 <- R33 R35
 not_null R9
 load_membase R39 <- [R9 + 0x8]
 outarg_vtretaddr R42 <- R41
 store_membase_imm [%esp + 0x8] <- [3]
 store_membase_reg [%esp + 0x4] <- R42
 store_membase_reg [%esp] <- R39
 check_this [R39 + 0x0]
 not_null R39
 vcall R41 <- [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
 il_seq_point il: 0x2d, nonempty-stack
 storev_membase [R11 + 0x0] <- R41
 il_seq_point il: 0x32
created temp 5 (R41) of type Program.Vector3ForBug
AFTER LOWER-VTYPE-OPTS  3: [IN:  BB0(0), OUT:  BB1(2) ]
 il_seq_point il: 0x0
 not_null R9
 load_membase R16 <- [R9 + 0x8]
 store_membase_reg [%esp] <- R16
 check_this [R16 + 0x0]
 not_null R16
 call R17 <- [int System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()] clobbers: c
 il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R19 <- R17 [1] clobbers: 1
 iconst R46 <- [1431655766]
 bigmul R43 <- R19 R46
 int_shr_imm R46 <- R45 clobbers: 1
 int_shr_un_imm R21 <- R46 clobbers: 1
 int_add R12 <- R21 R46 clobbers: 1
 il_seq_point il: 0x10
 il_seq_point il: 0x12
 il_seq_point il: 0x16
 fmove R27 <- R10
 iconst R28 <- [1]
 int_conv_to_r4 R29 <- R28
 int_conv_to_r4 R31 <- R12
 float_div R32 <- R29 R31
 float_sub R33 <- R27 R32
 int_conv_to_r4 R35 <- R12
 float_mul R36 <- R33 R35
 not_null R9
 load_membase R39 <- [R9 + 0x8]
 ldaddr R42 <- R41
 store_membase_imm [%esp + 0x8] <- [3]
 store_membase_reg [%esp + 0x4] <- R42
 store_membase_reg [%esp] <- R39
 check_this [R39 + 0x0]
 not_null R39
 vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
 il_seq_point il: 0x2d, nonempty-stack
 ldaddr R48 <- R41
 add_imm R49 <- R11 [0] clobbers: 1
 loadi4_membase R50 <- [R48 + 0x0]
 storei4_membase_reg [R49] <- R50
 loadi4_membase R51 <- [R48 + 0x4]
 storei4_membase_reg [R49 + 0x4] <- R51
 loadi4_membase R52 <- [R48 + 0x8]
 storei4_membase_reg [R49 + 0x8] <- R52
 il_seq_point il: 0x32
BEFORE LOWER-VTYPE-OPTS  1: [IN:  BB3(1), OUT:  ]
AFTER LOWER-VTYPE-OPTS  1: [IN:  BB3(1), OUT:  ]

LIVENESS:
BLOCK BB0 (BB3, ):
GEN  BB0: {}
KILL BB0: {}
BLOCK BB3 (BB1, ):
	1  il_seq_point il: 0x0
	1  not_null R9
	GEN: R9(1)
	1  load_membase R16 <- [R9 + 0x8]
	GEN: R9(1)
	1  store_membase_reg [%esp] <- R16
	1  check_this [R16 + 0x0]
	1  not_null R16
	1  call R17 <- [int System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()] clobbers: c
	1  il_seq_point il: 0xb, nonempty-stack
	1  int_sub_imm R19 <- R17 [1] clobbers: 1
	1  iconst R46 <- [1431655766]
	1  bigmul R43 <- R19 R46
	KILL: R43(4)
	1  int_shr_imm R46 <- R45 clobbers: 1
	GEN: R45(4)
	1  int_shr_un_imm R21 <- R46 clobbers: 1
	1  int_add R12 <- R21 R46 clobbers: 1
	1  il_seq_point il: 0x10
	1  il_seq_point il: 0x12
	1  il_seq_point il: 0x16
	1  fmove R27 <- R10
	GEN: R10(2)
	1  iconst R28 <- [1]
	1  int_conv_to_r4 R29 <- R28
	1  int_conv_to_r4 R31 <- R12
	1  float_div R32 <- R29 R31
	1  float_sub R33 <- R27 R32
	1  int_conv_to_r4 R35 <- R12
	1  float_mul R36 <- R33 R35
	1  not_null R9
	GEN: R9(1)
	1  load_membase R39 <- [R9 + 0x8]
	GEN: R9(1)
	1  ldaddr R42 <- R41
	GEN: R41(5)
	1  store_membase_imm [%esp + 0x8] <- [3]
	1  store_membase_reg [%esp + 0x4] <- R42
	1  store_membase_reg [%esp] <- R39
	1  check_this [R39 + 0x0]
	1  not_null R39
	1  vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
	1  il_seq_point il: 0x2d, nonempty-stack
	1  ldaddr R48 <- R41
	GEN: R41(5)
	1  add_imm R49 <- R11 [0] clobbers: 1
	GEN: R11(3)
	1  loadi4_membase R50 <- [R48 + 0x0]
	1  storei4_membase_reg [R49] <- R50
	1  loadi4_membase R51 <- [R48 + 0x4]
	1  storei4_membase_reg [R49 + 0x4] <- R51
	1  loadi4_membase R52 <- [R48 + 0x8]
	1  storei4_membase_reg [R49 + 0x8] <- R52
	1  il_seq_point il: 0x32
GEN  BB3: {1, 2, 3, 5}
KILL BB3: {4}
BLOCK BB1 ():
GEN  BB1: {}
KILL BB1: {}

ITERATION:
P: BB1(2): IN: BB3 OUT:
P: BB3(1): IN: BB0 OUT:BB1 
	LIVE IN  BB3: {1, 2, 3, 5}
P: BB0(0): IN: OUT:BB3 
	LIVE IN  BB0: {1, 2, 3, 5}
IT: 3 2.
LIVE IN  BB1: {}
LIVE OUT BB1: {}
LIVE IN  BB3: {1, 2, 3, 5}
LIVE OUT BB3: {}
LIVE IN  BB0: {1, 2, 3, 5}
LIVE OUT BB0: {1, 2, 3, 5}
V0: [0x0 - 0x0]
V1: [0x0 - 0x40036]
V2: [0x0 - 0x40024]
V3: [0x0 - 0x4004a]
V4: [0x40017 - 0x40018]
V5: [0x0 - 0x40048]
COSTLY: R3 C1 C3 %edi
NOT REGVAR: 3
ALLOCATED R9(1) TO HREG 6 COST 4

SPILL BLOCK 0:

SPILL BLOCK 3:
 il_seq_point il: 0x0
	     -1
	1  il_seq_point il: 0x0
 not_null R9
	  i  -1 9
	1  not_null %esi
 load_membase R16 <- [R9 + 0x8]
	 ii  16 9
	1  load_membase R16 <- [%esi + 0x8]
 store_membase_reg [%esp] <- R16
	  ii -1 16
	1  store_membase_reg [%esp] <- R16
 check_this [R16 + 0x0]
	  i  -1 16
	1  check_this [R16 + 0x0]
 not_null R16
	  i  -1 16
	1  not_null R16
 call R17 <- [int System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()] clobbers: c
	 i   17
	1  call R17 <- [int System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()] clobbers: c
 il_seq_point il: 0xb, nonempty-stack
	     -1
	1  il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R19 <- R17 [1] clobbers: 1
	 ii  19 17
	1  int_sub_imm R19 <- R17 [1] clobbers: 1
 iconst R46 <- [1431655766]
	 i   46
	1  iconst R46 <- [1431655766]
 bigmul R43 <- R19 R46
	 lii 43 19 46
	1  bigmul R53 <- R19 R46
 storei4_membase_reg [%ebp + 0xffffffe4] <- R55
	  ii -1 55
	1  storei4_membase_reg [%ebp + 0xffffffe4] <- R55
 storei4_membase_reg [%ebp + 0xffffffe0] <- R54
	  ii -1 54
	1  storei4_membase_reg [%ebp + 0xffffffe0] <- R54
 int_shr_imm R46 <- R45 clobbers: 1
	 ii  46 45
	0  loadi4_membase R56 <- [%ebp + 0xffffffe4]
	1  int_shr_imm R46 <- R56 clobbers: 1
 int_shr_un_imm R21 <- R46 clobbers: 1
	 ii  21 46
	1  int_shr_un_imm R21 <- R46 clobbers: 1
 int_add R12 <- R21 R46 clobbers: 1
	 iii 12 21 46
	1  int_add R12 <- R21 R46 clobbers: 1
 il_seq_point il: 0x10
	     -1
	1  il_seq_point il: 0x10
 il_seq_point il: 0x12
	     -1
	1  il_seq_point il: 0x12
 il_seq_point il: 0x16
	     -1
	1  il_seq_point il: 0x16
 fmove R27 <- R10
	 ff  27 10
	0  loadr4_membase R27 <- [%ebp + 0xc]
	1  nop
 iconst R28 <- [1]
	 i   28
	1  iconst R28 <- [1]
 int_conv_to_r4 R29 <- R28
	 fi  29 28
	1  int_conv_to_r4 R29 <- R28
 int_conv_to_r4 R31 <- R12
	 fi  31 12
	1  int_conv_to_r4 R31 <- R12
 float_div R32 <- R29 R31
	 fff 32 29 31
	1  float_div R32 <- R29 R31
 float_sub R33 <- R27 R32
	 fff 33 27 32
	1  float_sub R33 <- R27 R32
 int_conv_to_r4 R35 <- R12
	 fi  35 12
	1  int_conv_to_r4 R35 <- R12
 float_mul R36 <- R33 R35
	 fff 36 33 35
	1  float_mul R36 <- R33 R35
 not_null R9
	  i  -1 9
	1  not_null %esi
 load_membase R39 <- [R9 + 0x8]
	 ii  39 9
	1  load_membase R39 <- [%esi + 0x8]
 ldaddr R42 <- R41
	 ii  42 5
	1  add_imm R42 <- %ebp [-20] clobbers: 1
 store_membase_imm [%esp + 0x8] <- [3]
	   i -1
	1  store_membase_imm [%esp + 0x8] <- [3]
 store_membase_reg [%esp + 0x4] <- R42
	  ii -1 42
	1  store_membase_reg [%esp + 0x4] <- R42
 store_membase_reg [%esp] <- R39
	  ii -1 39
	1  store_membase_reg [%esp] <- R39
 check_this [R39 + 0x0]
	  i  -1 39
	1  check_this [R39 + 0x0]
 not_null R39
	  i  -1 39
	1  not_null R39
 vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
	     -1
	1  vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
 il_seq_point il: 0x2d, nonempty-stack
	     -1
	1  il_seq_point il: 0x2d, nonempty-stack
 ldaddr R48 <- R41
	 ii  48 5
	1  add_imm R48 <- %ebp [-20] clobbers: 1
 add_imm R49 <- R11 [0] clobbers: 1
	 ii  49 11
	0  load_membase R57 <- [%ebp + 0x10]
	1  add_imm R49 <- R57 [0] clobbers: 1
 loadi4_membase R50 <- [R48 + 0x0]
	 ii  50 48
	1  loadi4_membase R50 <- [R48 + 0x0]
 storei4_membase_reg [R49] <- R50
	  ii -1 50
	1  storei4_membase_reg [R49] <- R50
 loadi4_membase R51 <- [R48 + 0x4]
	 ii  51 48
	1  loadi4_membase R51 <- [R48 + 0x4]
 storei4_membase_reg [R49 + 0x4] <- R51
	  ii -1 51
	1  storei4_membase_reg [R49 + 0x4] <- R51
 loadi4_membase R52 <- [R48 + 0x8]
	 ii  52 48
	1  loadi4_membase R52 <- [R48 + 0x8]
 storei4_membase_reg [R49 + 0x8] <- R52
	  ii -1 52
	1  storei4_membase_reg [R49 + 0x8] <- R52
 il_seq_point il: 0x32
	     -1
	1  il_seq_point il: 0x32

SPILL BLOCK 1:
CCOPY: R49 -> R57
CCOPY: R49 -> R57
CCOPY: R49 -> R57
DUMP BLOCK 0:
DUMP BLOCK 3:
 il_seq_point il: 0x0
 not_null %esi
 load_membase R16 <- [%esi + 0x8]
 store_membase_reg [%esp] <- R16
 check_this [R16 + 0x0]
 not_null R16
 call R17 <- [int System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()] clobbers: c
 il_seq_point il: 0xb, nonempty-stack
 int_sub_imm R19 <- R17 [1] clobbers: 1
 iconst R46 <- [1431655766]
 bigmul R53 <- R19 R46
 storei4_membase_reg [%ebp + 0xffffffe4] <- R55
 storei4_membase_reg [%ebp + 0xffffffe0] <- R54
 loadi4_membase R56 <- [%ebp + 0xffffffe4]
 int_shr_imm R46 <- R56 clobbers: 1
 int_shr_un_imm R21 <- R46 clobbers: 1
 int_add R12 <- R21 R46 clobbers: 1
 il_seq_point il: 0x10
 il_seq_point il: 0x12
 il_seq_point il: 0x16
 loadr4_membase R27 <- [%ebp + 0xc]
 iconst R28 <- [1]
 int_conv_to_r4 R29 <- R28
 int_conv_to_r4 R31 <- R12
 float_div R32 <- R29 R31
 float_sub R33 <- R27 R32
 int_conv_to_r4 R35 <- R12
 float_mul R36 <- R33 R35
 not_null %esi
 load_membase R39 <- [%esi + 0x8]
 add_imm R42 <- %ebp [-20] clobbers: 1
 store_membase_imm [%esp + 0x8] <- [3]
 store_membase_reg [%esp + 0x4] <- R42
 store_membase_reg [%esp] <- R39
 check_this [R39 + 0x0]
 not_null R39
 vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
 il_seq_point il: 0x2d, nonempty-stack
 load_membase R57 <- [%ebp + 0x10]
 loadi4_membase R50 <- [%ebp + 0xffffffec]
 storei4_membase_reg [R57] <- R50
 loadi4_membase R51 <- [%ebp + 0xfffffff0]
 storei4_membase_reg [R57 + 0x4] <- R51
 loadi4_membase R52 <- [%ebp + 0xfffffff4]
 storei4_membase_reg [R57 + 0x8] <- R52
 il_seq_point il: 0x32
DUMP BLOCK 1:

LOCAL REGALLOC BLOCK 3:
	1  il_seq_point il: 0x0
	2  not_null %esi
	3  load_membase R16 <- [%esi + 0x8]
	4  store_membase_reg [%esp] <- R16
	5  check_this [R16 + 0x0]
	6  not_null R16
	7  call R17 <- [int System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()] clobbers: c
	8  il_seq_point il: 0xb, nonempty-stack
	9  int_sub_imm R19 <- R17 [1] clobbers: 1
	10 iconst R46 <- [1431655766]
	11 bigmul R54 <- R19 R46
	12 storei4_membase_reg [%ebp + 0xffffffe4] <- R55
	13 storei4_membase_reg [%ebp + 0xffffffe0] <- R54
	14 loadi4_membase R56 <- [%ebp + 0xffffffe4]
	15 int_shr_imm R46 <- R56 clobbers: 1
	16 int_shr_un_imm R21 <- R46 clobbers: 1
	17 int_add R12 <- R21 R46 clobbers: 1
	18 il_seq_point il: 0x10
	19 il_seq_point il: 0x12
	20 il_seq_point il: 0x16
	21 loadr4_membase R27 <- [%ebp + 0xc]
	22 iconst R28 <- [1]
	23 int_conv_to_r4 R29 <- R28
	24 int_conv_to_r4 R31 <- R12
	25 float_div R32 <- R29 R31
	26 float_sub R33 <- R27 R32
	27 int_conv_to_r4 R35 <- R12
	28 float_mul R36 <- R33 R35
	29 not_null %esi
	30 load_membase R39 <- [%esi + 0x8]
	31 x86_lea_membase R42 <- %ebp
	32 store_membase_imm [%esp + 0x8] <- [3]
	33 store_membase_reg [%esp + 0x4] <- R42
	34 store_membase_reg [%esp] <- R39
	35 check_this [R39 + 0x0]
	36 not_null R39
	37 vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
	38 il_seq_point il: 0x2d, nonempty-stack
	39 load_membase R57 <- [%ebp + 0x10]
	40 loadi4_membase R50 <- [%ebp + 0xffffffec]
	41 storei4_membase_reg [R57] <- R50
	42 loadi4_membase R51 <- [%ebp + 0xfffffff0]
	43 storei4_membase_reg [R57 + 0x4] <- R51
	44 loadi4_membase R52 <- [%ebp + 0xfffffff4]
	45 storei4_membase_reg [R57 + 0x8] <- R52
	46 il_seq_point il: 0x32
liveness: %esp [4 - 0]
liveness: %ebp [12 - 0]
liveness: R12 [17 - 17]
liveness: R16 [3 - 3]
liveness: R17 [7 - 7]
liveness: R19 [9 - 9]
liveness: R21 [16 - 16]
liveness: R27 [21 - 21]
liveness: R28 [22 - 22]
liveness: R29 [23 - 23]
liveness: R31 [24 - 24]
liveness: R32 [25 - 25]
liveness: R33 [26 - 26]
liveness: R35 [27 - 27]
liveness: R36 [28 - 28]
liveness: R39 [30 - 30]
liveness: R42 [31 - 31]
liveness: R46 [10 - 15]
liveness: R50 [40 - 40]
liveness: R51 [42 - 42]
liveness: R52 [44 - 44]
liveness: R54 [11 - 11]
liveness: R55 [11 - 0]
liveness: R56 [14 - 14]
liveness: R57 [39 - 39]
processing:	46 il_seq_point il: 0x32
	46 il_seq_point il: 0x32
processing:	45 storei4_membase_reg [R57 + 0x8] <- R52
	assigned dreg %eax to dest R57
	assigned sreg1 %ecx to R52
	45 storei4_membase_reg [%eax + 0x8] <- %ecx
processing:	44 loadi4_membase R52 <- [%ebp + 0xfffffff4]
	assigned dreg %ecx to dest R52
	freeable %ecx (R52) (born in 44)
	44 loadi4_membase %ecx <- [%ebp + 0xfffffff4]
processing:	43 storei4_membase_reg [R57 + 0x4] <- R51
	assigned dreg %eax to dest R57
	assigned sreg1 %ecx to R51
	43 storei4_membase_reg [%eax + 0x4] <- %ecx
processing:	42 loadi4_membase R51 <- [%ebp + 0xfffffff0]
	assigned dreg %ecx to dest R51
	freeable %ecx (R51) (born in 42)
	42 loadi4_membase %ecx <- [%ebp + 0xfffffff0]
processing:	41 storei4_membase_reg [R57] <- R50
	assigned dreg %eax to dest R57
	assigned sreg1 %ecx to R50
	41 storei4_membase_reg [%eax] <- %ecx
processing:	40 loadi4_membase R50 <- [%ebp + 0xffffffec]
	assigned dreg %ecx to dest R50
	freeable %ecx (R50) (born in 40)
	40 loadi4_membase %ecx <- [%ebp + 0xffffffec]
processing:	39 load_membase R57 <- [%ebp + 0x10]
	assigned dreg %eax to dest R57
	freeable %eax (R57) (born in 39)
	39 load_membase %eax <- [%ebp + 0x10]
processing:	38 il_seq_point il: 0x2d, nonempty-stack
	38 il_seq_point il: 0x2d, nonempty-stack
processing:	37 vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
	37 vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
processing:	36 not_null R39
	assigned sreg1 %eax to R39
	36 not_null %eax
processing:	35 check_this [R39 + 0x0]
	35 check_this [%eax + 0x0]
processing:	34 store_membase_reg [%esp] <- R39
	34 store_membase_reg [%esp] <- %eax
processing:	33 store_membase_reg [%esp + 0x4] <- R42
	assigned sreg1 %ecx to R42
	33 store_membase_reg [%esp + 0x4] <- %ecx
processing:	32 store_membase_imm [%esp + 0x8] <- [3]
	32 store_membase_imm [%esp + 0x8] <- [3]
processing:	31 x86_lea_membase R42 <- %ebp
	assigned dreg %ecx to dest R42
	freeable %ecx (R42) (born in 31)
	31 x86_lea_membase %ecx <- %ebp
processing:	30 load_membase R39 <- [%esi + 0x8]
	assigned dreg %eax to dest R39
	freeable %eax (R39) (born in 30)
	30 load_membase %eax <- [%esi + 0x8]
processing:	29 not_null %esi
	29 not_null %esi
processing:	28 float_mul R36 <- R33 R35
	assigned dreg %fr0 to dest R36
	freeable %fr0 (R36) (born in 28)
	assigned sreg1 %fr0 to R33
	assigned sreg2 %fr1 to R35
	28 float_mul %fr0 <- %fr0 %fr1
processing:	27 int_conv_to_r4 R35 <- R12
	assigned dreg %fr1 to dest R35
	freeable %fr1 (R35) (born in 27)
	assigned sreg1 %eax to R12
	27 int_conv_to_r4 %fr1 <- %eax
processing:	26 float_sub R33 <- R27 R32
	assigned dreg %fr0 to dest R33
	freeable %fr0 (R33) (born in 26)
	assigned sreg1 %fr0 to R27
	assigned sreg2 %fr1 to R32
	26 float_sub %fr0 <- %fr0 %fr1
processing:	25 float_div R32 <- R29 R31
	assigned dreg %fr1 to dest R32
	freeable %fr1 (R32) (born in 25)
	assigned sreg1 %fr1 to R29
	assigned sreg2 %fr2 to R31
	25 float_div %fr1 <- %fr1 %fr2
processing:	24 int_conv_to_r4 R31 <- R12
	assigned dreg %fr2 to dest R31
	freeable %fr2 (R31) (born in 24)
	24 int_conv_to_r4 %fr2 <- %eax
processing:	23 int_conv_to_r4 R29 <- R28
	assigned dreg %fr1 to dest R29
	freeable %fr1 (R29) (born in 23)
	assigned sreg1 %ecx to R28
	23 int_conv_to_r4 %fr1 <- %ecx
processing:	22 iconst R28 <- [1]
	assigned dreg %ecx to dest R28
	freeable %ecx (R28) (born in 22)
	22 iconst %ecx <- [1]
processing:	21 loadr4_membase R27 <- [%ebp + 0xc]
	assigned dreg %fr0 to dest R27
	freeable %fr0 (R27) (born in 21)
	21 loadr4_membase %fr0 <- [%ebp + 0xc]
processing:	20 il_seq_point il: 0x16
	20 il_seq_point il: 0x16
processing:	19 il_seq_point il: 0x12
	19 il_seq_point il: 0x12
processing:	18 il_seq_point il: 0x10
	18 il_seq_point il: 0x10
processing:	17 int_add R12 <- R21 R46 clobbers: 1
	assigned dreg %eax to dest R12
	freeable %eax (R12) (born in 17)
	assigned sreg1 %eax to R21
	assigned sreg2 %ecx to R46
	17 int_add %eax <- %eax %ecx clobbers: 1
processing:	16 int_shr_un_imm R21 <- R46 clobbers: 1
	assigned dreg %eax to dest R21
	freeable %eax (R21) (born in 16)
	need to copy sreg1 %ecx to dreg %eax
	forced copy from %ecx to %eax
	16 int_shr_un_imm %eax <- %eax clobbers: 1
processing:	15 int_shr_imm R46 <- R56 clobbers: 1
	assigned dreg %ecx to dest R46
	freeable %ecx (R46) (born in 10)
	assigned sreg1 %ecx to R56
	15 int_shr_imm %ecx <- %ecx clobbers: 1
processing:	14 loadi4_membase R56 <- [%ebp + 0xffffffe4]
	assigned dreg %ecx to dest R56
	freeable %ecx (R56) (born in 14)
	14 loadi4_membase %ecx <- [%ebp + 0xffffffe4]
processing:	13 storei4_membase_reg [%ebp + 0xffffffe0] <- R54
	allocated preferred reg R54 to %eax
	assigned sreg1 %eax to R54
	13 storei4_membase_reg [%ebp + 0xffffffe0] <- %eax
processing:	12 storei4_membase_reg [%ebp + 0xffffffe4] <- R55
	allocated preferred reg R55 to %edx
	assigned sreg1 %edx to R55
	12 storei4_membase_reg [%ebp + 0xffffffe4] <- %edx
processing:	11 bigmul R54 <- R19 R46
	assigned dreg %eax to dest R54
	assigned dreg-high %edx to dest R55
	freeable %edx (R55)
	freeable %eax (R54) (born in 11)
	assigned sreg1 %eax to R19
	assigned sreg2 %ecx to R46
	11 bigmul %eax <- %eax %ecx
processing:	10 iconst R46 <- [1431655766]
	assigned dreg %ecx to dest R46
	freeable %ecx (R46) (born in 10)
	10 iconst %ecx <- [1431655766]
processing:	9  int_sub_imm R19 <- R17 [1] clobbers: 1
	assigned dreg %eax to dest R19
	freeable %eax (R19) (born in 9)
	allocated preferred reg R17 to %eax
	assigned sreg1 %eax to R17
	9  int_sub_imm %eax <- %eax [1] clobbers: 1
processing:	8  il_seq_point il: 0xb, nonempty-stack
	8  il_seq_point il: 0xb, nonempty-stack
processing:	7  call R17 <- [int System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()] clobbers: c
	assigned dreg %eax to dest R17
	freeable %eax (R17) (born in 7)
	7  call %eax <- [int System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()] clobbers: c
processing:	6  not_null R16
	assigned sreg1 %eax to R16
	6  not_null %eax
processing:	5  check_this [R16 + 0x0]
	5  check_this [%eax + 0x0]
processing:	4  store_membase_reg [%esp] <- R16
	4  store_membase_reg [%esp] <- %eax
processing:	3  load_membase R16 <- [%esi + 0x8]
	assigned dreg %eax to dest R16
	freeable %eax (R16) (born in 3)
	3  load_membase %eax <- [%esi + 0x8]
processing:	2  not_null %esi
	2  not_null %esi
processing:	1  il_seq_point il: 0x0
	1  il_seq_point il: 0x0
processing:	0  il_seq_point il: 0x0
	[]
processing:	0  not_null %esi
	[]
processing:	0  load_membase %eax <- [%esi + 0x8]
	[]
processing:	0  store_membase_reg [%esp] <- %eax
	[]
processing:	0  check_this [%eax + 0x0]
	[]
processing:	0  not_null %eax
	[]
processing:	0  call %eax <- [int System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Count ()] clobbers: c
	[]
processing:	0  il_seq_point il: 0xb, nonempty-stack
	[]
processing:	0  int_sub_imm %eax <- %eax [1] clobbers: 1
	[]
processing:	0  iconst %ecx <- [1431655766]
	[]
processing:	0  bigmul %eax <- %eax %ecx
	[]
processing:	0  storei4_membase_reg [%ebp + 0xffffffe4] <- %edx
	[]
processing:	0  storei4_membase_reg [%ebp + 0xffffffe0] <- %eax
	[]
processing:	0  loadi4_membase %ecx <- [%ebp + 0xffffffe4]
	[]
processing:	0  int_shr_imm %ecx <- %ecx clobbers: 1
	[]
processing:	0  move %eax <- %ecx
	[]
processing:	0  int_shr_un_imm %eax <- %eax clobbers: 1
	[]
processing:	0  int_add %eax <- %eax %ecx clobbers: 1
	[]
processing:	0  il_seq_point il: 0x10
	[]
processing:	0  il_seq_point il: 0x12
	[]
processing:	0  il_seq_point il: 0x16
	[]
processing:	0  loadr4_membase %fr0 <- [%ebp + 0xc]
	[%fr0]
processing:	0  iconst %ecx <- [1]
	[%fr0]
processing:	0  int_conv_to_r4 %fr1 <- %ecx
	[%fr0, %fr1]
processing:	0  int_conv_to_r4 %fr2 <- %eax
	[%fr0, %fr1, %fr2]
processing:	0  float_div %fr1 <- %fr1 %fr2
	[%fr0, %fr1]
processing:	0  float_sub %fr0 <- %fr0 %fr1
	[%fr0]
processing:	0  int_conv_to_r4 %fr1 <- %eax
	[%fr0, %fr1]
processing:	0  float_mul %fr0 <- %fr0 %fr1
	[%fr0]
processing:	0  not_null %esi
	[%fr0]
processing:	0  load_membase %eax <- [%esi + 0x8]
	[%fr0]
processing:	0  x86_lea_membase %ecx <- %ebp
	[%fr0]
processing:	0  store_membase_imm [%esp + 0x8] <- [3]
	[%fr0]
processing:	0  store_membase_reg [%esp + 0x4] <- %ecx
	[%fr0]
processing:	0  store_membase_reg [%esp] <- %eax
	[%fr0]
processing:	0  check_this [%eax + 0x0]
	[%fr0]
processing:	0  not_null %eax
	[%fr0]
processing:	0  vcall2 [Program/Vector3ForBug System.Collections.Generic.List`1<Program/Vector3ForBug>:get_Item (int)] clobbers: c
	[%fr0]
processing:	0  il_seq_point il: 0x2d, nonempty-stack
	[%fr0]
processing:	0  load_membase %eax <- [%ebp + 0x10]
	[%fr0]
processing:	0  loadi4_membase %ecx <- [%ebp + 0xffffffec]
	[%fr0]
processing:	0  storei4_membase_reg [%eax] <- %ecx
	[%fr0]
processing:	0  loadi4_membase %ecx <- [%ebp + 0xfffffff0]
	[%fr0]
processing:	0  storei4_membase_reg [%eax + 0x4] <- %ecx
	[%fr0]
processing:	0  loadi4_membase %ecx <- [%ebp + 0xfffffff4]
	[%fr0]
processing:	0  storei4_membase_reg [%eax + 0x8] <- %ecx
	[%fr0]
processing:	0  il_seq_point il: 0x32
	[%fr0]
CFA: [0] def_cfa: %esp+0x4
CFA: [0] offset: unknown at cfa-0x4
CFA: [1] def_cfa_offset: 0x8
CFA: [1] offset: %ebp at cfa-0x8
CFA: [3] def_cfa_reg: %ebp
CFA: [4] offset: %esi at cfa-0xc
Argument 0 assigned to register %esi
Basic block 0 starting at offset 0xa
Basic block 3 starting at offset 0xa
Basic block 1 starting at offset 0x9b
Method single Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) emitted at 01B61958 to 01B619F9 (code length 161) [ConsoleApp1.exe]

*** ASM for Program/Bug:GetBadFloatReturn (single,Program/Vector3ForBug&) ***
0
***


@joncham joncham closed this as completed Oct 13, 2020
@joncham joncham reopened this Oct 13, 2020
@vargaz
Copy link
Contributor

vargaz commented Oct 13, 2020

So does it fail when run with -O=-inline ?

@joncham
Copy link
Contributor Author

joncham commented Oct 13, 2020

No. It passes with newer version no matter the optimization settings.

@vargaz
Copy link
Contributor

vargaz commented Oct 13, 2020

Weird, I don't really remember anything that would have fixed this.

@vargaz
Copy link
Contributor

vargaz commented Nov 4, 2020

Can this be closed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants