Index: test/unittests/compiler/node-test-utils.cc |
diff --git a/test/unittests/compiler/node-test-utils.cc b/test/unittests/compiler/node-test-utils.cc |
index 2f4d96d2db77febe28a946648406f05a930098fa..7f6ddaec13388a850eb160db50d899cef151b8c3 100644 |
--- a/test/unittests/compiler/node-test-utils.cc |
+++ b/test/unittests/compiler/node-test-utils.cc |
@@ -707,10 +707,18 @@ class IsCallMatcher final : public NodeMatcher { |
return false; |
} |
} |
- return (PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect", |
- effect_matcher_, listener) && |
- PrintMatchAndExplain(NodeProperties::GetControlInput(node), |
- "control", control_matcher_, listener)); |
+ Node* effect_node = nullptr; |
+ Node* control_node = nullptr; |
+ if (NodeProperties::FirstEffectIndex(node) < node->InputCount()) { |
+ effect_node = NodeProperties::GetEffectInput(node); |
+ } |
+ if (NodeProperties::FirstControlIndex(node) < node->InputCount()) { |
+ control_node = NodeProperties::GetControlInput(node); |
+ } |
+ return (PrintMatchAndExplain(effect_node, "effect", effect_matcher_, |
+ listener) && |
+ PrintMatchAndExplain(control_node, "control", control_matcher_, |
+ listener)); |
} |
private: |
@@ -765,10 +773,18 @@ class IsTailCallMatcher final : public NodeMatcher { |
return false; |
} |
} |
- return (PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect", |
- effect_matcher_, listener) && |
- PrintMatchAndExplain(NodeProperties::GetControlInput(node), |
- "control", control_matcher_, listener)); |
+ Node* effect_node = nullptr; |
+ Node* control_node = nullptr; |
+ if (NodeProperties::FirstEffectIndex(node) < node->InputCount()) { |
+ effect_node = NodeProperties::GetEffectInput(node); |
+ } |
+ if (NodeProperties::FirstControlIndex(node) < node->InputCount()) { |
+ control_node = NodeProperties::GetControlInput(node); |
+ } |
+ return (PrintMatchAndExplain(effect_node, "effect", effect_matcher_, |
+ listener) && |
+ PrintMatchAndExplain(control_node, "control", control_matcher_, |
+ listener)); |
} |
private: |