From fc8da44940bcaa60fbcef28058c6cf9c76120841 Mon Sep 17 00:00:00 2001 From: SpyCheese Date: Thu, 29 Sep 2022 09:24:15 +0300 Subject: [PATCH] Fix compilation of muliplication (#475) --- crypto/func/builtins.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/func/builtins.cpp b/crypto/func/builtins.cpp index 756de2f8..22f4282c 100644 --- a/crypto/func/builtins.cpp +++ b/crypto/func/builtins.cpp @@ -561,6 +561,7 @@ AsmOp compile_mul_internal(VarDescr& r, VarDescr& x, VarDescr& y) { if (y.always_zero() && x.always_finite()) { // dubious optimization: NaN * 0 = ? r.set_const(y.int_const); + x.unused(); return push_const(r.int_const); } if (*y.int_const == 1 && x.always_finite()) { @@ -587,6 +588,7 @@ AsmOp compile_mul_internal(VarDescr& r, VarDescr& x, VarDescr& y) { if (x.always_zero() && y.always_finite()) { // dubious optimization: NaN * 0 = ? r.set_const(x.int_const); + y.unused(); return push_const(r.int_const); } if (*x.int_const == 1 && y.always_finite()) {