This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1852,6 +1852,10 @@ struct GenTree
18521852 {
18531853 return (gtFlags & GTF_REVERSE_OPS) ? true : false ;
18541854 }
1855+ bool IsUnsigned () const
1856+ {
1857+ return ((gtFlags & GTF_UNSIGNED) != 0 );
1858+ }
18551859
18561860 inline bool IsCnsIntOrI () const ;
18571861
Original file line number Diff line number Diff line change @@ -783,7 +783,7 @@ void Compiler::updateCseArrLenMap(GenTreePtr compare)
783783 VNFuncApp cmpVNFuncApp;
784784
785785 if (!vnStore->GetVNFunc (compareVN, &cmpVNFuncApp) ||
786- (cmpVNFuncApp.m_func != GetVNFuncForOper (compare->OperGet (), ( compare->gtFlags & GTF_UNSIGNED) != 0 )))
786+ (cmpVNFuncApp.m_func != GetVNFuncForOper (compare->OperGet (), compare->IsUnsigned () )))
787787 {
788788 // Value numbering inferred this compare as something other
789789 // than its own operator; leave its value number alone.
@@ -809,12 +809,12 @@ void Compiler::updateCseArrLenMap(GenTreePtr compare)
809809 GenTreePtr op2 = compare->gtGetOp2 ();
810810
811811 vnStore->GetArrLenArithBoundInfo (compareVN, &info);
812- if (GetVNFuncForOper (op1->OperGet (), ( op1->gtFlags & GTF_UNSIGNED) != 0 ) == info.arrOper )
812+ if (GetVNFuncForOper (op1->OperGet (), op1->IsUnsigned () ) == (VNFunc) info.arrOper )
813813 {
814814 // The arithmetic node is the array length's parent.
815815 arrLenParent = op1;
816816 }
817- else if (GetVNFuncForOper (op2->OperGet (), ( op2->gtFlags & GTF_UNSIGNED) != 0 ) == info.arrOper )
817+ else if (GetVNFuncForOper (op2->OperGet (), op2->IsUnsigned () ) == (VNFunc) info.arrOper )
818818 {
819819 // The arithmetic node is the array length's parent.
820820 arrLenParent = op2;
You can’t perform that action at this time.
0 commit comments