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

Unified Diff: src/ia32/lithium-ia32.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 | « src/arm/lithium-arm.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 5d84935aed54e54a3e7591ffa0ab2ca237a28495..821a80493691b93cd0b808cb3f15483b699174ad 100644
--- a/src/ia32/lithium-ia32.cc
+++ b/src/ia32/lithium-ia32.cc
@@ -1904,10 +1904,14 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
Representation from = instr->from();
Representation to = instr->to();
if (from.IsSmi()) {
- if (to.IsTagged()) {
+ if (to.IsSmiOrTagged()) {
Toon Verwaest 2013/08/12 14:53:42 Smi -> Smi doesn't happen, so this is superfluous.
weiliang.lin2 2013/08/13 02:36:57 Done.
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();
}
// Only mark conversions that might need to allocate as calling rather than
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698