Fix lclvar "cloning" in const division lowering
The existing code was creating new uses of existing variables using the type of the division operation instead of the type of the existing variable use. There is one rare case when this does not work properly: * if the variable is "normalize on load" (that implies that it is also a small int type variable) * and if the variable is previously assigned to such that a subrange assertion is generated * and if morph decides not to insert the load normalization cast due to the subrange assertion * and if the variable is not enregistered Then the assignment stores 2 bytes to the stack location but the uses generated by the division lowering code read 4 bytes because they have TYP_INT. Commit migrated from https://github.com/dotnet/coreclr/commit/b27167e3e89d51cc6901275eb68289631ae72aa4
Showing
想要评论请 注册 或 登录