Reproduction:
publicstaticintObjAddrWrapping(Vector<int>d){d=Vector<int>.Zero;if(d==Vector<int>.Zero)return2;return3;}The nodes in question:
[ 2] 13 (0x00d) call 0A000006
InCompiler::impImportCall: opcode is call, kind=0, callRetType is bool, structSize is 0NamedIntrinsicSystem.Numerics.Vector`1.op_Equality:Recognized
[ 1] 18 (0x012) brfalse.s
STMT00001 (IL0x007... ???)
[000011] ------------*JTRUE void [000010] ------------\--*EQ int [000008] ------------+--*HWINTRINSIC bool int op_Equality
[000007] n-----------|+--*OBJ simd16<System.Numerics.Vector`1[Int32]>
[000006] ------------||\--*ADDR byref [000004] -------N----||\--*LCL_VAR simd16<System.Numerics.Vector`1[Int32]> V00 arg0 [000005] ------------|\--*HWINTRINSIC simd16 int get_Zero
[000009] ------------\--*CNS_INT int 0
This happens because impSIMDPopStackcallsimpNormStructVal which wraps local variables in the OBJ(ADDR) sequence, presumably to avoid calls with mistyped arguments leading to bad codegen. The supposition of this issue is that this wrapping can be avoided when possible, as it blocks downstream optimizations.
category:cq
theme:importer
skill-level:expert
cost:medium
impact:small
Reproduction:
The nodes in question:
This happens because
impSIMDPopStackcallsimpNormStructValwhich wraps local variables in theOBJ(ADDR)sequence, presumably to avoid calls with mistyped arguments leading to bad codegen. The supposition of this issue is that this wrapping can be avoided when possible, as it blocks downstream optimizations.category:cq
theme:importer
skill-level:expert
cost:medium
impact:small