Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: src/arm/lithium-arm.cc

Issue 196653009: Remove uses of RangeCanInclude() in flooring division by power of 2. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: RangeCanInclude() is gone now Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/a64/lithium-codegen-a64.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-arm.cc
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
index 360f91910eeae9fb4b6f10ae6fdcb43271dd34f2..fac89e494916f7d0db8c762f40dded39b2efee38 100644
--- a/src/arm/lithium-arm.cc
+++ b/src/arm/lithium-arm.cc
@@ -1316,13 +1316,13 @@ LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
LInstruction* LChunkBuilder::DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr) {
LOperand* dividend = UseRegisterAtStart(instr->left());
int32_t divisor = instr->right()->GetInteger32Constant();
- LInstruction* result =
- DefineSameAsFirst(
- new(zone()) LFlooringDivByPowerOf2I(dividend, divisor));
- bool can_deopt =
- (instr->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) ||
- (instr->left()->RangeCanInclude(kMinInt) && divisor == -1);
- return can_deopt ? AssignEnvironment(result) : result;
+ LInstruction* result = DefineAsRegister(new(zone()) LFlooringDivByPowerOf2I(
+ dividend, divisor));
+ if ((instr->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) ||
+ (instr->CheckFlag(HValue::kLeftCanBeMinInt) && divisor == -1)) {
+ result = AssignEnvironment(result);
+ }
+ return result;
}
« no previous file with comments | « src/a64/lithium-codegen-a64.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698