diff --git a/src/ir/cost.h b/src/ir/cost.h index bf9e48308f2..4853badbb19 100644 --- a/src/ir/cost.h +++ b/src/ir/cost.h @@ -251,9 +251,11 @@ struct CostAnalyzer : public OverriddenVisitor { break; case DivSInt32: case DivUInt32: + ret = curr->right->is() ? 2 : 4; + break; case RemSInt32: case RemUInt32: - ret = curr->right->is() ? 2 : 3; + ret = curr->right->is() ? 3 : 4; break; case AndInt32: case OrInt32: @@ -272,9 +274,11 @@ struct CostAnalyzer : public OverriddenVisitor { break; case DivSInt64: case DivUInt64: + ret = curr->right->is() ? 3 : 5; + break; case RemSInt64: case RemUInt64: - ret = curr->right->is() ? 3 : 4; + ret = curr->right->is() ? 4 : 5; break; case AndInt64: case OrInt64: