diff options
author | Mike Danes <onemihaid@hotmail.com> | 2018-11-25 11:22:08 +0200 |
---|---|---|
committer | Mike Danes <onemihaid@hotmail.com> | 2018-11-25 11:22:08 +0200 |
commit | 8e6fa5df402299d833f382679ecf31687f7237a2 (patch) | |
tree | 2cd8f837b9c664416208f6b9ae0316f00d504462 /src/jit/assertionprop.cpp | |
parent | 8cfbd3381e658485477522ba47d00e19057e0d72 (diff) | |
download | coreclr-8e6fa5df402299d833f382679ecf31687f7237a2.tar.gz coreclr-8e6fa5df402299d833f382679ecf31687f7237a2.tar.bz2 coreclr-8e6fa5df402299d833f382679ecf31687f7237a2.zip |
Don't generate copy assertions for normalize on load variables
Diffstat (limited to 'src/jit/assertionprop.cpp')
-rw-r--r-- | src/jit/assertionprop.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/jit/assertionprop.cpp b/src/jit/assertionprop.cpp index 88e6b009c7..dffc5b999f 100644 --- a/src/jit/assertionprop.cpp +++ b/src/jit/assertionprop.cpp @@ -1182,6 +1182,13 @@ AssertionIndex Compiler::optCreateAssertion(GenTree* op1, goto DONE_ASSERTION; // Don't make an assertion } + // If we're making a copy of a "normalize on load" lclvar then the destination + // has to be "normalize on load" as well, otherwise we risk skipping normalization. + if (lclVar2->lvNormalizeOnLoad() && !lclVar->lvNormalizeOnLoad()) + { + goto DONE_ASSERTION; // Don't make an assertion + } + // If the local variable has its address exposed then bail if (lclVar2->lvAddrExposed) { |