mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-10 10:00:57 +09:00
Prevent incorrect constant folding (#98561)
* Prevent incorrect constant folding of binary operations involving handle and integer * Fix the conditions for null nodes * Fix the last commit for non-GT/GE/LT/LE * Make JIT format happy * More conservative approach. Limit only arithmetic operations involving handles in a relocatable code.
This commit is contained in:
parent
5e1caf14fd
commit
1be948c959
1 changed files with 10 additions and 0 deletions
|
@ -4421,6 +4421,11 @@ bool ValueNumStore::VNEvalCanFoldBinaryFunc(var_types type, VNFunc func, ValueNu
|
|||
case GT_RSZ:
|
||||
case GT_ROL:
|
||||
case GT_ROR:
|
||||
if (m_pComp->opts.compReloc && (IsVNHandle(arg0VN) || IsVNHandle(arg1VN)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case GT_EQ:
|
||||
case GT_NE:
|
||||
|
@ -4449,6 +4454,11 @@ bool ValueNumStore::VNEvalCanFoldBinaryFunc(var_types type, VNFunc func, ValueNu
|
|||
case VNF_ADD_UN_OVF:
|
||||
case VNF_SUB_UN_OVF:
|
||||
case VNF_MUL_UN_OVF:
|
||||
if (m_pComp->opts.compReloc && (IsVNHandle(arg0VN) || IsVNHandle(arg1VN)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case VNF_Cast:
|
||||
case VNF_CastOvf:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue