commit | 9257fd5775b49e206de33536a623e34cc1cecb42 | [log] [tgz] |
---|---|---|
author | Kevin Cheng <kevin.cheng@arm.com> | Wed Apr 14 15:55:31 2021 -0700 |
committer | Kevin Cheng <kevin.cheng@arm.com> | Fri Apr 30 11:37:56 2021 -0700 |
tree | 601ef150fa20aff96eb647c78d5028d633e7a316 | |
parent | 0f87c953018cc90de18d1a083479b06fd7ce4a8c [diff] [blame] |
Fix OpMul for 32-bit x 32-bit inputs Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: I068d3ce0bffe1b49845f0c8cd39130060cceaf19
diff --git a/reference_model/src/ops/ewise_binary.cc b/reference_model/src/ops/ewise_binary.cc index 7ed8374..fc587f1 100644 --- a/reference_model/src/ops/ewise_binary.cc +++ b/reference_model/src/ops/ewise_binary.cc
@@ -436,7 +436,7 @@ if (shift > 0) { int64_t round = 1L << (shift - 1); - result = a * b + round; + result = static_cast<int64_t>(a) * static_cast<int64_t>(b) + round; result = result >> shift; ASSERT_MSG_NODE(result >= QMin && result <= QMax,