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

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

Issue 21049003: Smi-support for HSar. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 5 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/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-ia32.cc
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
index 875f6082d7d87b9aa40b21ab21d5223759a3867e..1f1c90c51daf8e82dfbd1a5ca412e3bf9838f902 100644
--- a/src/ia32/lithium-ia32.cc
+++ b/src/ia32/lithium-ia32.cc
@@ -787,7 +787,9 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
constant_value = constant->Integer32Value() & 0x1f;
// Left shifts can deoptimize if we shift by > 0 and the result cannot be
// truncated to smi.
- if (instr->representation().IsSmi() && constant_value > 0) {
+ if (instr->representation().IsSmi() &&
+ op == Token::SHL &&
+ constant_value > 0) {
for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
if (!it.value()->CheckFlag(HValue::kTruncatingToSmi)) {
does_deopt = true;
@@ -806,7 +808,8 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
} else {
for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
- if (!it.value()->CheckFlag(HValue::kTruncatingToInt32)) {
+ if (!it.value()->CheckFlag(HValue::kTruncatingToInt32) &&
+ !it.value()->CheckFlag(HValue::kTruncatingToSmi)) {
does_deopt = true;
break;
}
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698