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

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

Issue 2022753002: [turbofan] Fix NumberIsHoleNaN to check the upper word. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Typos Created 4 years, 7 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-number-is-hole-nan.js » ('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 a76d3e2013fd791c04f6b0834df5611ff4cc6344..add24d66b97b074dfc944f7b1c642308bcebeeda 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -1091,14 +1091,14 @@ class RepresentationSelector {
VisitUnop(node, UseInfo::TruncatingFloat64(),
MachineRepresentation::kBit);
if (lower()) {
- // NumberIsHoleNaN(x) => Word32Equal(Float64ExtractLowWord32(x),
- // #HoleNaNLower32)
- node->ReplaceInput(0,
- jsgraph_->graph()->NewNode(
- lowering->machine()->Float64ExtractLowWord32(),
- node->InputAt(0)));
+ // NumberIsHoleNaN(x) => Word32Equal(Float64ExtractHighWord32(x),
+ // #HoleNanUpper32)
+ node->ReplaceInput(
+ 0, jsgraph_->graph()->NewNode(
+ lowering->machine()->Float64ExtractHighWord32(),
+ node->InputAt(0)));
node->AppendInput(jsgraph_->zone(),
- jsgraph_->Int32Constant(kHoleNanLower32));
+ jsgraph_->Int32Constant(kHoleNanUpper32));
NodeProperties::ChangeOp(node, jsgraph_->machine()->Word32Equal());
}
break;
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-number-is-hole-nan.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698