Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/ir/cost.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,11 @@ struct CostAnalyzer : public OverriddenVisitor<CostAnalyzer, CostType> {
break;
case DivSInt32:
case DivUInt32:
ret = curr->right->is<Const>() ? 2 : 4;
break;
case RemSInt32:
case RemUInt32:
ret = curr->right->is<Const>() ? 2 : 3;
ret = curr->right->is<Const>() ? 3 : 4;
break;
case AndInt32:
case OrInt32:
Expand All @@ -272,9 +274,11 @@ struct CostAnalyzer : public OverriddenVisitor<CostAnalyzer, CostType> {
break;
case DivSInt64:
case DivUInt64:
ret = curr->right->is<Const>() ? 3 : 5;
break;
case RemSInt64:
case RemUInt64:
ret = curr->right->is<Const>() ? 3 : 4;
ret = curr->right->is<Const>() ? 4 : 5;
break;
case AndInt64:
case OrInt64:
Expand Down