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

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

Issue 1909343002: [turbofan] Move more type checks to the representation selector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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
Index: src/compiler/simplified-operator-reducer.cc
diff --git a/src/compiler/simplified-operator-reducer.cc b/src/compiler/simplified-operator-reducer.cc
index 8a7180e40ba12aeeb47de878b002611567ea789d..1a5b267b415f22f968192589ad72d38708e7eaed 100644
--- a/src/compiler/simplified-operator-reducer.cc
+++ b/src/compiler/simplified-operator-reducer.cc
@@ -54,6 +54,9 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) {
case IrOpcode::kChangeInt32ToTagged: {
Int32Matcher m(node->InputAt(0));
if (m.HasValue()) return ReplaceNumber(m.Value());
+ if (m.IsChangeTaggedToInt32() || m.IsChangeTaggedSignedToInt32()) {
+ return Replace(m.InputAt(0));
+ }
break;
}
case IrOpcode::kChangeTaggedToFloat64: {

Powered by Google App Engine
This is Rietveld 408576698