@@ -4845,8 +4845,6 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node)
48454845 case TYP_INT:
48464846 case TYP_UINT:
48474847 {
4848- unsigned N = 0 ;
4849- GenTree* opN = nullptr ;
48504848 NamedIntrinsic insIntrinsic = NI_Illegal;
48514849
48524850 if ((simdBaseType == TYP_SHORT) || (simdBaseType == TYP_USHORT))
@@ -4861,7 +4859,7 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node)
48614859
48624860 if (insIntrinsic != NI_Illegal)
48634861 {
4864- for (N = 1 ; N < argCnt - 1 ; N++)
4862+ for (size_t N = 1 ; N < argCnt - 1 ; N++)
48654863 {
48664864 // We will be constructing the following parts:
48674865 // ...
@@ -4877,7 +4875,7 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node)
48774875 // tmp1 = Sse?.Insert(tmp1, opN, N);
48784876 // ...
48794877
4880- opN = node->Op (N + 1 );
4878+ GenTree* opN = node->Op (N + 1 );
48814879
48824880 idx = comp->gtNewIconNode (N, TYP_INT);
48834881 // Place the insert as early as possible to avoid creating a lot of long lifetimes.
@@ -4889,26 +4887,24 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node)
48894887 LowerNode (tmp1);
48904888 }
48914889
4892- assert (N == (argCnt - 1 ));
4893-
48944890 // We will be constructing the following parts:
4895- // idx = CNS_INT int N
4896- // /--* tmp1 simd16
4897- // +--* opN T
4898- // +--* idx int
4891+ // idx = CNS_INT int (argCnt - 1)
4892+ // /--* tmp1 simd16
4893+ // +--* lastOp T
4894+ // +--* idx int
48994895 // node = * HWINTRINSIC simd16 T Insert
49004896
49014897 // This is roughly the following managed code:
49024898 // ...
4903- // tmp1 = Sse?.Insert(tmp1, opN, N );
4899+ // tmp1 = Sse?.Insert(tmp1, lastOp, (argCnt - 1) );
49044900 // ...
49054901
4906- opN = node->Op (argCnt);
4902+ GenTree* lastOp = node->Op (argCnt);
49074903
4908- idx = comp->gtNewIconNode (N , TYP_INT);
4909- BlockRange ().InsertAfter (opN , idx);
4904+ idx = comp->gtNewIconNode ((argCnt - 1 ) , TYP_INT);
4905+ BlockRange ().InsertAfter (lastOp , idx);
49104906
4911- node->ResetHWIntrinsicId (insIntrinsic, comp, tmp1, opN , idx);
4907+ node->ResetHWIntrinsicId (insIntrinsic, comp, tmp1, lastOp , idx);
49124908 break ;
49134909 }
49144910
@@ -4918,17 +4914,17 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node)
49184914 GenTree* op[16 ];
49194915 op[0 ] = tmp1;
49204916
4921- for (N = 1 ; N < argCnt; N++)
4917+ for (size_t N = 1 ; N < argCnt; N++)
49224918 {
4923- opN = node->Op (N + 1 );
4919+ GenTree* opN = node->Op (N + 1 );
49244920
49254921 op[N] = InsertNewSimdCreateScalarUnsafeNode (TYP_SIMD16, opN, simdBaseJitType, 16 );
49264922 LowerNode (op[N]);
49274923 }
49284924
49294925 if ((simdBaseType == TYP_BYTE) || (simdBaseType == TYP_UBYTE))
49304926 {
4931- for (N = 0 ; N < argCnt; N += 4 )
4927+ for (size_t N = 0 ; N < argCnt; N += 4 )
49324928 {
49334929 // We will be constructing the following parts:
49344930 // ...
@@ -4958,9 +4954,9 @@ GenTree* Lowering::LowerHWIntrinsicCreate(GenTreeHWIntrinsic* node)
49584954 // tmp3 = Sse2.UnpackLow(tmp1, tmp2);
49594955 // ...
49604956
4961- unsigned O = N + 1 ;
4962- unsigned P = N + 2 ;
4963- unsigned Q = N + 3 ;
4957+ size_t O = N + 1 ;
4958+ size_t P = N + 2 ;
4959+ size_t Q = N + 3 ;
49644960
49654961 tmp1 = comp->gtNewSimdHWIntrinsicNode (simdType, op[N], op[O], NI_SSE2_UnpackLow, CORINFO_TYPE_UBYTE,
49664962 simdSize);
0 commit comments