Commit eaec0b10 authored by verwaest@chromium.org's avatar verwaest@chromium.org

DummyUse if Representation::Tagged()+Type::Smi() to Representation::Smi()

R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15778006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c417df74
......@@ -1908,6 +1908,9 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
} else if (to.IsSmi()) {
HValue* val = instr->value();
LOperand* value = UseRegister(val);
if (val->type().IsSmi()) {
return DefineSameAsFirst(new(zone()) LDummyUse(value));
}
return AssignEnvironment(
DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value)));
} else {
......
......@@ -1940,6 +1940,9 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
} else if (to.IsSmi()) {
HValue* val = instr->value();
LOperand* value = UseRegister(val);
if (val->type().IsSmi()) {
return DefineSameAsFirst(new(zone()) LDummyUse(value));
}
return AssignEnvironment(
DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value)));
} else {
......
......@@ -1836,6 +1836,9 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
} else if (to.IsSmi()) {
HValue* val = instr->value();
LOperand* value = UseRegister(val);
if (val->type().IsSmi()) {
return DefineSameAsFirst(new(zone()) LDummyUse(value));
}
return AssignEnvironment(
DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value)));
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment