From 71ba67cfbe44617c1f220b9388715cc5ba0c453d Mon Sep 17 00:00:00 2001 From: Moonchild Date: Tue, 20 May 2025 00:56:00 +0200 Subject: [PATCH] No issue - Don't support modulo math space in ExtractLinearSum. --- js/src/jit/IonAnalysis.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/src/jit/IonAnalysis.cpp b/js/src/jit/IonAnalysis.cpp index aa8f8164b5..303b2d1568 100644 --- a/js/src/jit/IonAnalysis.cpp +++ b/js/src/jit/IonAnalysis.cpp @@ -2892,6 +2892,12 @@ jit::ExtractLinearSum(MDefinition* ins, MathSpace space) return SimpleLinearSum(ins, 0); MOZ_ASSERT(space == MathSpace::Modulo || space == MathSpace::Infinite); + // We don't support modulo math space in ExtractLinearSum, because it + // doesn't work well in some compilation environments. + if (space == MathSpace::Modulo) { + return SimpleLinearSum(ins, 0); + } + MDefinition* lhs = ins->getOperand(0); MDefinition* rhs = ins->getOperand(1); if (lhs->type() != MIRType::Int32 || rhs->type() != MIRType::Int32)