We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ec573e commit 2a77961Copy full SHA for 2a77961
src/coreclr/jit/gentree.cpp
@@ -30570,8 +30570,17 @@ bool GenTree::IsNeverNegative(Compiler* comp) const
30570
}
30571
30572
30573
- // TODO-Casts: extend IntegralRange to handle constants
30574
- return IntegralRange::ForNode(const_cast<GenTree*>(this), comp).IsNonNegative();
+ if (IntegralRange::ForNode(const_cast<GenTree*>(this), comp).IsNonNegative())
+ {
30575
+ return true;
30576
+ }
30577
+
30578
+ if ((comp->vnStore != nullptr) && comp->vnStore->IsVNNeverNegative(gtVNPair.GetConservative()))
30579
30580
30581
30582
30583
+ return false;
30584
30585
30586
//------------------------------------------------------------------------
0 commit comments