From 9a2da3012a583487e7574572ffd3eb6030ad0964 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Fri, 15 Apr 2022 20:22:02 +0200 Subject: Issue #1864 - Fix IonBuilder::maybeMarkEmpty. Look at the instruction's operands instead of the instruction itself, and take an early exit on empty types. --- js/src/jit/IonBuilder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index 2b7ac6b9ce..dae86fd92a 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -8181,12 +8181,14 @@ IonBuilder::maybeMarkEmpty(MDefinition* ins) // as having no possible types too. This is to avoid degrading // subsequent analysis. for (size_t i = 0; i < ins->numOperands(); i++) { - if (!ins->emptyResultTypeSet()) + if (!ins->getOperand(i)->emptyResultTypeSet()) continue; TemporaryTypeSet* types = alloc().lifoAlloc()->new_(); - if (types) + if (types) { ins->setResultTypeSet(types); + return; + } } } -- cgit v1.2.3