Index: src/compiler/simplified-operator-reducer.cc |
diff --git a/src/compiler/simplified-operator-reducer.cc b/src/compiler/simplified-operator-reducer.cc |
index 2da6b847c4b016f8c031ae43487c4975684f12bb..b8a486df38e32a422a825ea8b64e8abf5ca340dc 100644 |
--- a/src/compiler/simplified-operator-reducer.cc |
+++ b/src/compiler/simplified-operator-reducer.cc |
@@ -80,7 +80,9 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) { |
case IrOpcode::kTruncateTaggedToFloat64: { |
NumberMatcher m(node->InputAt(0)); |
if (m.HasValue()) return ReplaceFloat64(m.Value()); |
- if (m.IsChangeFloat64ToTagged()) return Replace(m.node()->InputAt(0)); |
+ if (m.IsChangeFloat64ToTagged() || m.IsChangeFloat64ToTaggedPointer()) { |
+ return Replace(m.node()->InputAt(0)); |
+ } |
if (m.IsChangeInt31ToTaggedSigned() || m.IsChangeInt32ToTagged()) { |
return Change(node, machine()->ChangeInt32ToFloat64(), m.InputAt(0)); |
} |
@@ -93,7 +95,7 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) { |
case IrOpcode::kChangeTaggedToInt32: { |
NumberMatcher m(node->InputAt(0)); |
if (m.HasValue()) return ReplaceInt32(DoubleToInt32(m.Value())); |
- if (m.IsChangeFloat64ToTagged()) { |
+ if (m.IsChangeFloat64ToTagged() || m.IsChangeFloat64ToTaggedPointer()) { |
return Change(node, machine()->ChangeFloat64ToInt32(), m.InputAt(0)); |
} |
if (m.IsChangeInt31ToTaggedSigned() || m.IsChangeInt32ToTagged()) { |
@@ -104,7 +106,7 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) { |
case IrOpcode::kChangeTaggedToUint32: { |
NumberMatcher m(node->InputAt(0)); |
if (m.HasValue()) return ReplaceUint32(DoubleToUint32(m.Value())); |
- if (m.IsChangeFloat64ToTagged()) { |
+ if (m.IsChangeFloat64ToTagged() || m.IsChangeFloat64ToTaggedPointer()) { |
return Change(node, machine()->ChangeFloat64ToUint32(), m.InputAt(0)); |
} |
if (m.IsChangeUint32ToTagged()) return Replace(m.InputAt(0)); |
@@ -122,7 +124,7 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) { |
m.IsChangeUint32ToTagged()) { |
return Replace(m.InputAt(0)); |
} |
- if (m.IsChangeFloat64ToTagged()) { |
+ if (m.IsChangeFloat64ToTagged() || m.IsChangeFloat64ToTaggedPointer()) { |
return Change(node, machine()->TruncateFloat64ToWord32(), m.InputAt(0)); |
} |
break; |