diff --git a/src/mapleall/maple_ir/src/mir_type.cpp b/src/mapleall/maple_ir/src/mir_type.cpp index 0436fd7469e36ba8c6f874fa80f8ce062f24266d..fb730cf6d14895f5a1ff878b4f43e11573459315 100644 --- a/src/mapleall/maple_ir/src/mir_type.cpp +++ b/src/mapleall/maple_ir/src/mir_type.cpp @@ -178,11 +178,11 @@ bool IsNoCvtNeeded(PrimType toType, PrimType fromType) { case PTY_i8: case PTY_i16: return fromType == PTY_i32; + case PTY_i64: case PTY_u64: case PTY_a64: - return fromType == PTY_ptr; case PTY_ptr: - return fromType == PTY_u64 || fromType == PTY_a64; + return fromType == PTY_ptr || fromType == PTY_u64 || fromType == PTY_a64 || fromType == PTY_i64; default: return false; } diff --git a/src/mapleall/mpl2mpl/src/constantfold.cpp b/src/mapleall/mpl2mpl/src/constantfold.cpp index 8da165aff49e5c138a9c90e0ba3181feedfcaaea..48bfa4752098b31188706f7b65222fd52dc5e97d 100644 --- a/src/mapleall/mpl2mpl/src/constantfold.cpp +++ b/src/mapleall/mpl2mpl/src/constantfold.cpp @@ -1688,10 +1688,13 @@ std::pair ConstantFold::FoldBinary(BinaryNode *node) { result = l; sum = lp.second + cst; } else if (op == OP_sub) { +#if 0 // this is preventing good optimizations if (IsSignedInteger(primType) && MinValOfSignedInteger(primType) <= cst) { result = node; sum = 0; - } else { + } else +#endif + { result = l; sum = lp.second - cst; }