diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc index 9098f9d032..992cfd9e70 100644 --- a/src/arm/lithium-arm.cc +++ b/src/arm/lithium-arm.cc @@ -1416,7 +1416,8 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { int32_t divisor = instr->right()->GetInteger32Constant(); LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( dividend, divisor)); - if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) { + if (instr->CheckFlag(HValue::kLeftCanBeNegative) && + instr->CheckFlag(HValue::kBailoutOnMinusZero)) { result = AssignEnvironment(result); } return result; diff --git a/src/arm64/lithium-arm64.cc b/src/arm64/lithium-arm64.cc index 1fbf72ff61..8aab36ba50 100644 --- a/src/arm64/lithium-arm64.cc +++ b/src/arm64/lithium-arm64.cc @@ -1854,7 +1854,8 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { int32_t divisor = instr->right()->GetInteger32Constant(); LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( dividend, divisor)); - if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) { + if (instr->CheckFlag(HValue::kLeftCanBeNegative) && + instr->CheckFlag(HValue::kBailoutOnMinusZero)) { result = AssignEnvironment(result); } return result; diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc index 9ee02851fb..650a85414b 100644 --- a/src/ia32/lithium-ia32.cc +++ b/src/ia32/lithium-ia32.cc @@ -1464,7 +1464,8 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { int32_t divisor = instr->right()->GetInteger32Constant(); LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( dividend, divisor)); - if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) { + if (instr->CheckFlag(HValue::kLeftCanBeNegative) && + instr->CheckFlag(HValue::kBailoutOnMinusZero)) { result = AssignEnvironment(result); } return result; diff --git a/src/lithium-codegen.cc b/src/lithium-codegen.cc index 0f7cc5a301..b13458a617 100644 --- a/src/lithium-codegen.cc +++ b/src/lithium-codegen.cc @@ -116,12 +116,12 @@ void LCodeGenBase::CheckEnvironmentUsage() { HInstruction* hinstr = HInstruction::cast(hval); if (!hinstr->CanDeoptimize() && instr->HasEnvironment()) { - V8_Fatal(__FILE__, __LINE__, "CanDeoptimize is wrong for %s (%s)\n", + V8_Fatal(__FILE__, __LINE__, "CanDeoptimize is wrong for %s (%s)", hinstr->Mnemonic(), instr->Mnemonic()); } if (instr->HasEnvironment() && !instr->environment()->has_been_used()) { - V8_Fatal(__FILE__, __LINE__, "unused environment for %s (%s)\n", + V8_Fatal(__FILE__, __LINE__, "unused environment for %s (%s)", hinstr->Mnemonic(), instr->Mnemonic()); } } diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc index b9efe7920a..07bef99a57 100644 --- a/src/mips/lithium-mips.cc +++ b/src/mips/lithium-mips.cc @@ -1419,7 +1419,8 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { int32_t divisor = instr->right()->GetInteger32Constant(); LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( dividend, divisor)); - if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) { + if (instr->CheckFlag(HValue::kLeftCanBeNegative) && + instr->CheckFlag(HValue::kBailoutOnMinusZero)) { result = AssignEnvironment(result); } return result; diff --git a/src/mips64/lithium-mips64.cc b/src/mips64/lithium-mips64.cc index f1725446cf..36a4636c99 100644 --- a/src/mips64/lithium-mips64.cc +++ b/src/mips64/lithium-mips64.cc @@ -1421,7 +1421,8 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { int32_t divisor = instr->right()->GetInteger32Constant(); LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( dividend, divisor)); - if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) { + if (instr->CheckFlag(HValue::kLeftCanBeNegative) && + instr->CheckFlag(HValue::kBailoutOnMinusZero)) { result = AssignEnvironment(result); } return result; diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc index 56a6c048f6..46d5270faa 100644 --- a/src/x64/lithium-x64.cc +++ b/src/x64/lithium-x64.cc @@ -1444,7 +1444,8 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { int32_t divisor = instr->right()->GetInteger32Constant(); LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( dividend, divisor)); - if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) { + if (instr->CheckFlag(HValue::kLeftCanBeNegative) && + instr->CheckFlag(HValue::kBailoutOnMinusZero)) { result = AssignEnvironment(result); } return result; diff --git a/src/x87/lithium-x87.cc b/src/x87/lithium-x87.cc index 20e03ac331..7426f0c557 100644 --- a/src/x87/lithium-x87.cc +++ b/src/x87/lithium-x87.cc @@ -1450,7 +1450,8 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { int32_t divisor = instr->right()->GetInteger32Constant(); LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( dividend, divisor)); - if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) { + if (instr->CheckFlag(HValue::kLeftCanBeNegative) && + instr->CheckFlag(HValue::kBailoutOnMinusZero)) { result = AssignEnvironment(result); } return result;