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

Unified Diff: src/compiler/representation-change.cc

Issue 2191503002: [turbofan] Add the CheckedTruncateTaggedToWord32 opcode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | « src/compiler/opcodes.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/representation-change.cc
diff --git a/src/compiler/representation-change.cc b/src/compiler/representation-change.cc
index 28548ef808a3ebb87a2bcae1686e4ee63e72aa3b..5c0187e697754653b9128c2859af25e29983a538 100644
--- a/src/compiler/representation-change.cc
+++ b/src/compiler/representation-change.cc
@@ -458,16 +458,10 @@ Node* RepresentationChanger::GetWord32RepresentationFor(
op = simplified()->ChangeTaggedToInt32();
} else if (use_info.truncation().IsUsedAsWord32()) {
if (use_info.type_check() == TypeCheckKind::kNumberOrOddball) {
- op = simplified()->CheckedTaggedToFloat64();
- Node* effect = NodeProperties::GetEffectInput(use_node);
- Node* control = NodeProperties::GetControlInput(use_node);
- Node* to_float_checked =
- jsgraph()->graph()->NewNode(op, node, effect, control);
- NodeProperties::ReplaceEffectInput(use_node, to_float_checked);
- return jsgraph()->graph()->NewNode(machine()->TruncateFloat64ToWord32(),
- to_float_checked);
+ op = simplified()->CheckedTruncateTaggedToWord32();
+ } else {
+ op = simplified()->TruncateTaggedToWord32();
}
- op = simplified()->TruncateTaggedToWord32();
} else if (use_info.type_check() == TypeCheckKind::kSigned32) {
op = simplified()->CheckedTaggedToInt32();
}
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698