-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
JIT: LowerHWIntrinsicCreate can create illegal IR #92766
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsLowerHWIntrinsicCreate before:
N002 ( 1, 1) [000017] ----------- t17 = LCL_VAR byref V01 arg0 u:1 $81
┌──▌ t17 byref
N004 ( 3, 4) [000054] -c--------- t54 = ▌ LEA(b+4) byref
┌──▌ t54 byref
N005 ( 4, 3) [000019] n---GO----- t19 = ▌ IND float <l:$203, c:$202>
┌──▌ t3 float
[000089] ---XG------ t89 = ▌ HWINTRINSIC simd16 float CreateScalarUnsafe
[000090] -c--------- t90 = CNS_INT int 1
N003 ( 1, 2) [000004] ----------- t4 = CNS_DBL float 0.0000000000000000 $240
┌──▌ t89 simd16
├──▌ t90 int
├──▌ t4 float
[000091] ---XG------ t91 = ▌ HWINTRINSIC simd16 float Insert
[000092] -c--------- t92 = CNS_INT int 2
N004 ( 1, 2) [000005] ----------- t5 = CNS_DBL float 0.0000000000000000 $240
┌──▌ t91 simd16
├──▌ t92 int
├──▌ t5 float
[000093] ---XG------ t93 = ▌ HWINTRINSIC simd16 float Insert
[000094] -c--------- t94 = CNS_INT int 3
N005 ( 1, 2) [000006] ----------- t6 = CNS_DBL float 0.0000000000000000 $240
┌──▌ t93 simd16
├──▌ t94 int
├──▌ t6 float
N006 ( 7, 9) [000011] ---XG------ t11 = ▌ HWINTRINSIC simd16 float Insert $2c0
┌──▌ t11 simd16
N007 ( 11, 12) [000014] DA-XG------ ▌ STORE_LCL_VAR simd16 V07 tmp4 d:1 $1c1
[000085] ----------- IL_OFFSET void INLRT @ 0x03D[--]
N001 ( 1, 2) [000016] ----------- t16 = CNS_DBL float 0.0000000000000000 $240
N006 ( 1, 2) [000020] ----------- t20 = CNS_DBL float 0.0000000000000000 $240
N007 ( 1, 2) [000021] ----------- t21 = CNS_DBL float 0.0000000000000000 $240
┌──▌ t16 float
├──▌ t19 float
├──▌ t20 float
├──▌ t21 float
N008 ( 8, 10) [000026] ----GO----- t26 = ▌ HWINTRINSIC simd16 float Create $2c1
LowerHWIntrinsicCreate after:
[000084] ----------- IL_OFFSET void INLRT @ 0x01C[--]
N001 ( 1, 1) [000001] ----------- t1 = LCL_VAR byref V01 arg0 u:1 $81
┌──▌ t1 byref
N002 ( 3, 2) [000003] ---XG------ t3 = ▌ IND float <l:$201, c:$200>
N002 ( 1, 1) [000017] ----------- t17 = LCL_VAR byref V01 arg0 u:1 $81
┌──▌ t17 byref
N004 ( 3, 4) [000054] -c--------- t54 = ▌ LEA(b+4) byref
[000096] -c--------- t96 = CNS_INT int 1
┌──▌ t54 byref
N005 ( 4, 3) [000019] n---GO----- t19 = ▌ IND float <l:$203, c:$202>
┌──▌ t95 simd16
├──▌ t96 int
├──▌ t19 float
[000097] ----GO----- t97 = ▌ HWINTRINSIC simd16 float Insert
┌──▌ t3 float
[000089] ---XG------ t89 = ▌ HWINTRINSIC simd16 float CreateScalarUnsafe
[000090] -c--------- t90 = CNS_INT int 1
N003 ( 1, 2) [000004] ----------- t4 = CNS_DBL float 0.0000000000000000 $240
┌──▌ t89 simd16
├──▌ t90 int
├──▌ t4 float
[000091] ---XG------ t91 = ▌ HWINTRINSIC simd16 float Insert
[000092] -c--------- t92 = CNS_INT int 2
N004 ( 1, 2) [000005] ----------- t5 = CNS_DBL float 0.0000000000000000 $240
┌──▌ t91 simd16
├──▌ t92 int
├──▌ t5 float
[000093] ---XG------ t93 = ▌ HWINTRINSIC simd16 float Insert
[000094] -c--------- t94 = CNS_INT int 3
N005 ( 1, 2) [000006] ----------- t6 = CNS_DBL float 0.0000000000000000 $240
┌──▌ t93 simd16
├──▌ t94 int
├──▌ t6 float
N006 ( 7, 9) [000011] ---XG------ t11 = ▌ HWINTRINSIC simd16 float Insert $2c0
┌──▌ t11 simd16
N007 ( 11, 12) [000014] DA-XG------ ▌ STORE_LCL_VAR simd16 V07 tmp4 d:1 $1c1
[000085] ----------- IL_OFFSET void INLRT @ 0x03D[--]
[000095] ----------- t95 = CNS_VEC simd16<0x00000000, 0x00000000, 0x00000000, 0x00000000>
[000098] -c--------- t98 = CNS_INT int 2
N006 ( 1, 2) [000020] ----------- t20 = CNS_DBL float 0.0000000000000000 $240
┌──▌ t97 simd16
├──▌ t98 int
├──▌ t20 float
[000099] ----GO----- t99 = ▌ HWINTRINSIC simd16 float Insert
[000100] ----------- t100 = CNS_INT int 3
N007 ( 1, 2) [000021] ----------- t21 = CNS_DBL float 0.0000000000000000 $240
┌──▌ t99 simd16
├──▌ t100 int
├──▌ t21 float
N008 ( 8, 10) [000026] ----GO----- t26 = ▌ HWINTRINSIC simd16 float Insert $2c1
┌──▌ t26 simd16
Notice that the use of
|
I hit this issue in #92768 for arm64. To hit it, change if (ind->TypeIs(TYP_INT, TYP_LONG, TYP_DOUBLE, TYP_SIMD16)) to if (ind->TypeIs(TYP_INT, TYP_LONG, TYP_FLOAT, TYP_DOUBLE, TYP_SIMD16)) and run SPMI replay (I hit it in libraries.pmi and realworld collections). |
The function assumes that the operands of the HW intrinsic come in order, which is just a basic assumption you cannot make for LIR. |
LowerHWIntrinsicCreate was assuming in many places that operand nodes come in order, which is fundamentally not an assumption that can be made for LIR. Fix dotnet#92766
LowerHWIntrinsicCreate was assuming in many places that operand nodes come in order, which is fundamentally not an assumption that can be made for LIR. Fix #92766
This can be enabled now that dotnet#92766 is fixed.
This can be enabled now that #92766 is fixed.
Notice that the use of
t95
appears before the def.The text was updated successfully, but these errors were encountered: