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

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

Issue 22824003: Eliminate Smi check when changing from Smi to Integer32 (Closed) Base URL: https://github.com/v8/v8.git@master
Patch Set: Created 7 years, 4 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 | « no previous file | src/ia32/lithium-ia32.cc » ('j') | src/ia32/lithium-ia32.cc » ('J')
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 ef1cf79ffe1eeec4e25aa90a7328e41a84318472..71916a713638bcebfaf4bf9f1c4378558d8eb595 100644
--- a/src/arm/lithium-arm.cc
+++ b/src/arm/lithium-arm.cc
@@ -1889,10 +1889,14 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
Representation from = instr->from();
Representation to = instr->to();
if (from.IsSmi()) {
- if (to.IsTagged()) {
+ if (to.IsSmiOrTagged()) {
LOperand* value = UseRegister(instr->value());
return DefineSameAsFirst(new(zone()) LDummyUse(value));
}
+ if (to.IsInteger32()) {
+ LOperand* value = UseRegister(instr->value());
+ return DefineSameAsFirst(new(zone()) LSmiUntag(value, false));
+ }
from = Representation::Tagged();
}
if (from.IsTagged()) {
« no previous file with comments | « no previous file | src/ia32/lithium-ia32.cc » ('j') | src/ia32/lithium-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698