summaryrefslogtreecommitdiff
path: root/src/passes/OptimizeInstructions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/OptimizeInstructions.cpp')
-rw-r--r--src/passes/OptimizeInstructions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/passes/OptimizeInstructions.cpp b/src/passes/OptimizeInstructions.cpp
index 7d4735686..c098d0ed7 100644
--- a/src/passes/OptimizeInstructions.cpp
+++ b/src/passes/OptimizeInstructions.cpp
@@ -825,11 +825,11 @@ private:
// find added constants in an expression tree, including multiplied/shifted, and combine them
// note that we ignore division/shift-right, as rounding makes this nonlinear, so not a valid opt
Expression* optimizeAddedConstants(Binary* binary) {
- int32_t constant = 0;
+ uint32_t constant = 0;
std::vector<Const*> constants;
std::function<void (Expression*, int)> seek = [&](Expression* curr, int mul) {
if (auto* c = curr->dynCast<Const>()) {
- auto value = c->value.geti32();
+ uint32_t value = c->value.geti32();
if (value != 0) {
constant += value * mul;
constants.push_back(c);