author | André Bargull <andre.bargull@gmail.com> |
Tue, 07 Apr 2020 08:35:25 +0000 | |
changeset 522629 | 43db59ebd874bf2dcbddd9d6feb0319ccf1a9e70 |
parent 522628 | 93389243902532138a05b46222a5f599bb61a4ea |
child 522630 | b801d8007636e2a979eb1c93dcb82e20fe468ba2 |
push id | 37293 |
push user | apavel@mozilla.com |
push date | Tue, 07 Apr 2020 21:44:02 +0000 |
treeherder | mozilla-central@de63e64b9090 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jandem |
bugs | 1627618 |
milestone | 77.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/src/jit/AlignmentMaskAnalysis.cpp +++ b/js/src/jit/AlignmentMaskAnalysis.cpp @@ -64,17 +64,17 @@ static void AnalyzeAsmHeapAddress(MDefin uint32_t m = rhs->toConstant()->toInt32(); if (!IsAlignmentMask(m) || (i & m) != i) { return; } // The pattern was matched! Produce the replacement expression. MInstruction* and_ = MBitAnd::New(graph.alloc(), op0, rhs, MIRType::Int32); ptr->block()->insertBefore(ptr->toBitAnd(), and_); - MInstruction* add = MAdd::New(graph.alloc(), and_, op1, MIRType::Int32); + auto* add = MAdd::New(graph.alloc(), and_, op1, MDefinition::Truncate); ptr->block()->insertBefore(ptr->toBitAnd(), add); ptr->replaceAllUsesWith(add); ptr->block()->discard(ptr->toBitAnd()); } bool AlignmentMaskAnalysis::analyze() { for (ReversePostorderIterator block(graph_.rpoBegin()); block != graph_.rpoEnd(); block++) {
--- a/js/src/jit/FoldLinearArithConstants.cpp +++ b/js/src/jit/FoldLinearArithConstants.cpp @@ -64,18 +64,17 @@ static void AnalyzeAdd(TempAllocator& al sum.constant == add->getOperand(idx)->toConstant()->toInt32()) { return; } } MInstruction* rhs = MConstant::New(alloc, Int32Value(sum.constant)); add->block()->insertBefore(add, rhs); - MAdd* addNew = - MAdd::New(alloc, sum.term, rhs, MIRType::Int32, add->truncateKind()); + MAdd* addNew = MAdd::New(alloc, sum.term, rhs, add->truncateKind()); add->replaceAllLiveUsesWith(addNew); add->block()->insertBefore(add, addNew); JitSpew(JitSpew_FLAC, "replaced with: %s%u", addNew->opName(), addNew->id()); JitSpew(JitSpew_FLAC, "and constant: %s%u (%d)", rhs->opName(), rhs->id(), sum.constant); // Mark the stale nodes as RecoveredOnBailout since the Sink pass has
--- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -6976,17 +6976,17 @@ AbortReasonOr<Ok> IonBuilder::jsop_inite return resumeAfter(initElem); } AbortReasonOr<Ok> IonBuilder::jsop_initelem_inc() { MDefinition* value = current->pop(); MDefinition* id = current->pop(); MDefinition* obj = current->peek(-1); - MAdd* nextId = MAdd::New(alloc(), id, constantInt(1), MIRType::Int32); + MAdd* nextId = MAdd::New(alloc(), id, constantInt(1), MDefinition::Truncate); current->add(nextId); current->push(nextId); return initArrayElement(obj, id, value); } AbortReasonOr<Ok> IonBuilder::initArrayElement(MDefinition* obj, MDefinition* id,
--- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -5360,16 +5360,23 @@ class MAdd : public MBinaryArithInstruct TruncateKind truncateKind = Truncate) : MAdd(left, right) { specialization_ = type; setResultType(type); if (type == MIRType::Int32) { setTruncateKind(truncateKind); setCommutative(); } + + MAdd(MDefinition* left, MDefinition* right, TruncateKind truncateKind) + : MAdd(left, right) { + specialization_ = MIRType::Int32; + setResultType(MIRType::Int32); + setTruncateKind(truncateKind); + setCommutative(); } public: INSTRUCTION_HEADER(Add) TRIVIAL_NEW_WRAPPERS bool isFloat32Commutative() const override { return true; }
--- a/js/src/jit/WarpBuilder.cpp +++ b/js/src/jit/WarpBuilder.cpp @@ -2469,17 +2469,17 @@ bool WarpBuilder::build_InitElemArray(By bool WarpBuilder::build_InitElemInc(BytecodeLocation loc) { MDefinition* val = current->pop(); MDefinition* index = current->pop(); MDefinition* obj = current->peek(-1); // Push index + 1. MConstant* constOne = constant(Int32Value(1)); - MAdd* nextIndex = MAdd::New(alloc(), index, constOne, MIRType::Int32); + MAdd* nextIndex = MAdd::New(alloc(), index, constOne, MDefinition::Truncate); current->add(nextIndex); current->push(nextIndex); return buildInitPropOp(loc, obj, index, val); } static LambdaFunctionInfo LambdaInfoFromSnapshot(JSFunction* fun, const WarpLambda* snapshot) {