Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: src/compiler/typer.cc

Issue 2332633002: [turbofan] Another fix for induction variable typing monotonicity. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-645851.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index ce70801090f9a8b551ea69daf956d64724258700..28e6d4cf313275d88ba2bca3515dd018a3190552 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -649,7 +649,8 @@ Type* Typer::Visitor::TypeInductionVariablePhi(Node* node) {
}
// If we do not have enough type information for the initial value or
// the increment, just return the initial value's type.
- if (!initial_type->IsInhabited() || !increment_type->IsInhabited()) {
+ if (!initial_type->IsInhabited() ||
+ increment_type->Is(typer_->cache_.kSingletonZero)) {
return initial_type;
}
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-645851.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698