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

Unified Diff: src/hydrogen-instructions.h

Issue 12047050: Correctly set kCanBeDivByZero flag for HMathFloorOfDiv. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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/regress/regress-171641.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 7988d2f25968c851c9074c38d8043fb7f18ebfc6..dc899b43a7daf4cab2925a63510a854efc5fcb90 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -3111,6 +3111,9 @@ class HMathFloorOfDiv: public HBinaryOperation {
set_representation(Representation::Integer32());
SetFlag(kUseGVN);
SetFlag(kCanOverflow);
+ if (!right->IsConstant()) {
+ SetFlag(kCanBeDivByZero);
+ }
}
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-171641.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698