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

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

Issue 17082003: Let NaN flow as double into HBranch (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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
Index: src/ia32/lithium-ia32.cc
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
index 706e031d9f21fd13498974c85220dee0402b935d..901b2f2258c8f8d9375d042645a264474d433e45 100644
--- a/src/ia32/lithium-ia32.cc
+++ b/src/ia32/lithium-ia32.cc
@@ -1060,15 +1060,17 @@ LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
return new(zone()) LGoto(successor->block_id());
}
+ ToBooleanStub::Types expected = instr->expected_input_types();
+
// Untagged integers or doubles, smis and booleans don't require a
// deoptimization environment nor a temp register.
Representation rep = value->representation();
HType type = value->type();
- if (!rep.IsTagged() || type.IsSmi() || type.IsBoolean()) {
+ if (!rep.IsTagged() || type.IsSmi() || type.IsBoolean() ||
+ expected == ToBooleanStub::all_types()) {
return new(zone()) LBranch(UseRegister(value), NULL);
}
- ToBooleanStub::Types expected = instr->expected_input_types();
// We need a temporary register when we have to access the map *or* we have
// no type info yet, in which case we handle all cases (including the ones
// involving maps).

Powered by Google App Engine
This is Rietveld 408576698