diff options
author | Eugene Rozenfeld <erozen@microsoft.com> | 2018-09-07 10:48:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-07 10:48:06 -0700 |
commit | 36449cf94237e7cddb7e43a9fe6f873e7f5ebf77 (patch) | |
tree | 5659b57fff5ebdab2dfeba510a8f1a1a64c3d69d /src/jit/lower.cpp | |
parent | c96aff7670f7d70fe87d2ea60bba9534c5e56088 (diff) | |
download | coreclr-36449cf94237e7cddb7e43a9fe6f873e7f5ebf77.tar.gz coreclr-36449cf94237e7cddb7e43a9fe6f873e7f5ebf77.tar.bz2 coreclr-36449cf94237e7cddb7e43a9fe6f873e7f5ebf77.zip |
Fix for bug 12398: Lowering is inconsistent in checking safety of RegOptional. (#19740)
This fixes an inconsistency in lowering where it fails to make an
operand contained because IsSafeToContainMem() returns false yet
it marks it regOptional, which may cause a problem if the operand
will be loaded at the point of use.
I also fixed a case where an operand was marked RegOptional even though
there is a type size mismatch.
There are 7 places that are affected, I added repro cases for 4 of them.
I wasn't able to construct repros for the 3 places that deal with
floating point operands but decided to fix those places anyway.
Fixes #12398.
Diffstat (limited to 'src/jit/lower.cpp')
-rw-r--r-- | src/jit/lower.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/jit/lower.cpp b/src/jit/lower.cpp index fb5fab2763..c6648b8a8e 100644 --- a/src/jit/lower.cpp +++ b/src/jit/lower.cpp @@ -4874,7 +4874,6 @@ GenTree* Lowering::LowerConstIntDivOrMod(GenTree* node) newDivMod = comp->gtNewOperNode(GT_SUB, type, comp->gtNewLclvNode(dividendLclNum, type), comp->gtNewOperNode(GT_AND, type, adjustedDividend, divisor)); - ContainCheckBinary(newDivMod->AsOp()); } // Remove the divisor and dividend nodes from the linear order, |