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

Unified Diff: src/compiler/simplified-operator-reducer.cc

Issue 2233393002: [turbofan] Some strength reduction for ConvertTaggedHoleToUndefined. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix redness Created 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-operator-reducer.cc
diff --git a/src/compiler/simplified-operator-reducer.cc b/src/compiler/simplified-operator-reducer.cc
index 46d8e2f72d5d4024c0f9a3473d0c7db9e85f80b6..d8bd1e0232eb558cb46e6275f2e763d1f333db76 100644
--- a/src/compiler/simplified-operator-reducer.cc
+++ b/src/compiler/simplified-operator-reducer.cc
@@ -134,6 +134,14 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) {
}
break;
}
+ case IrOpcode::kCheckNumber: {
+ NodeMatcher m(node->InputAt(0));
+ if (m.IsConvertTaggedHoleToUndefined()) {
+ node->ReplaceInput(0, m.InputAt(0));
+ return Changed(node);
+ }
+ break;
+ }
case IrOpcode::kCheckTaggedPointer: {
Node* const input = node->InputAt(0);
if (DecideObjectIsSmi(input) == Decision::kFalse) {
@@ -148,6 +156,11 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) {
ReplaceWithValue(node, input);
return Replace(input);
}
+ NodeMatcher m(input);
+ if (m.IsConvertTaggedHoleToUndefined()) {
+ node->ReplaceInput(0, m.InputAt(0));
+ return Changed(node);
+ }
break;
}
case IrOpcode::kObjectIsSmi: {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698