Closed
Description
As we found out in #35636 (comment) , we are converting the return type of Vectot64<T>
to HVA TYP_DOUBLE
. This impacts Vector64.CreateScalar(uint)
or byte
, short
, etc when the result is used.
[MethodImpl(MethodImplOptions.NoInlining)]
public static uint fo1(uint value) {
var input = Vector64.CreateScalar(value);
return AdvSimd.Extract(input, 0);
}
Generated code:
G_M6484_IG02:
0F000410 movi v16.2s, #0x00
4E041C10 ins v16.s[0], w0
FD000FB0 str d16, [fp,#24]
FD400FB0 ldr d16, [fp,#24]
0E043E00 umov w0, v16.s[0]
Below is the dump of where conversation happens:
impFixupStructReturnType: retyping
[000039] ------------ * HWINTRINSIC simd8 uint Insert
[000038] ------------ \--* LIST void
[000034] ------------ +--* HWINTRINSIC simd8 uint get_Zero
[000037] ------------ \--* LIST void
[000035] ------------ +--* CNS_INT int 0
[000036] ------------ \--* LIST void
[000009] ------------ \--* LCL_VAR int V00 arg0
impFixupStructReturnType: result of retyping is
[000039] ------------ * HWINTRINSIC double uint Insert
[000038] ------------ \--* LIST void
[000034] ------------ +--* HWINTRINSIC simd8 uint get_Zero
[000037] ------------ \--* LIST void
[000035] ------------ +--* CNS_INT int 0
[000036] ------------ \--* LIST void
[000009] ------------ \--* LCL_VAR int V00 arg0
[000041] -A---------- * ASG double
[000040] D------N---- +--* LCL_VAR double V05 tmp2
[000039] ------------ \--* HWINTRINSIC double uint Insert
[000038] ------------ \--* LIST void
[000034] ------------ +--* HWINTRINSIC simd8 uint get_Zero
[000037] ------------ \--* LIST void
[000035] ------------ +--* CNS_INT int 0
[000036] ------------ \--* LIST void
[000009] ------------ \--* LCL_VAR int V00 arg0