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

Unified Diff: src/compiler/simplified-lowering.cc

Issue 509653003: Use TruncateFloat64ToInt32 instead of ChangeFloat64ToInt32 in lowering of simplified operators Numb… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index 72c2d372e8e3888314805c5156ff3babe4e0bb8c..9ccd4ed5ef7d303c156898c6aa138f952e3719ff 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -453,10 +453,9 @@ class RepresentationSelector {
DeferReplacement(node, node->InputAt(0));
} else {
// Require the input in float64 format and perform truncation.
- // TODO(turbofan): could also avoid the truncation with a tag check.
+ // TODO(turbofan): avoid a truncation with a smi check.
VisitUnop(node, kTypeInt32 | kRepFloat64, kTypeInt32 | kRepWord32);
- // TODO(titzer): should be a truncation.
- node->set_op(lowering->machine()->ChangeFloat64ToInt32());
+ node->set_op(lowering->machine()->TruncateFloat64ToInt32());
}
} else {
// Propagate a type to the input, but pass through representation.
@@ -475,11 +474,10 @@ class RepresentationSelector {
DeferReplacement(node, node->InputAt(0));
} else {
// Require the input in float64 format to perform truncation.
- // TODO(turbofan): could also avoid the truncation with a tag check.
+ // TODO(turbofan): avoid the truncation with a smi check.
VisitUnop(node, kTypeUint32 | kRepFloat64,
kTypeUint32 | kRepWord32);
- // TODO(titzer): should be a truncation.
- node->set_op(lowering->machine()->ChangeFloat64ToUint32());
+ node->set_op(lowering->machine()->TruncateFloat64ToInt32());
}
} else {
// Propagate a type to the input, but pass through representation.
« no previous file with comments | « no previous file | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698