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

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

Issue 2336093002: [turbofan] Strength reduce CheckTaggedSigned/Pointer with checked inputs. (Closed)
Patch Set: Created 4 years, 3 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/unittests/compiler/simplified-operator-reducer-unittest.cc » ('j') | 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 0d9ddc1b2d0253e31ab487fdc971f78ec13b607b..991e4fc82d856ba9615ce5b1f55179432be3bcaf 100644
--- a/src/compiler/simplified-operator-reducer.cc
+++ b/src/compiler/simplified-operator-reducer.cc
@@ -148,6 +148,11 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) {
ReplaceWithValue(node, input);
return Replace(input);
}
+ NodeMatcher m(input);
+ if (m.IsCheckTaggedPointer()) {
+ ReplaceWithValue(node, input);
+ return Replace(input);
+ }
break;
}
case IrOpcode::kCheckTaggedSigned: {
@@ -157,7 +162,10 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) {
return Replace(input);
}
NodeMatcher m(input);
- if (m.IsConvertTaggedHoleToUndefined()) {
+ if (m.IsCheckTaggedSigned()) {
+ ReplaceWithValue(node, input);
+ return Replace(input);
+ } else if (m.IsConvertTaggedHoleToUndefined()) {
node->ReplaceInput(0, m.InputAt(0));
return Changed(node);
}
« no previous file with comments | « no previous file | test/unittests/compiler/simplified-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698