Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index aadf87572df411eb5d8c9c9aeb1ce8b985010aea..8212e4cef61c82379b5a2f7d0a6fda9b7fe8969c 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -1958,6 +1958,10 @@ void HPhi::DeleteFromGraph() { |
void HPhi::InitRealUses(int phi_id) { |
// Initialize real uses. |
phi_id_ = phi_id; |
+ // Compute a conservative approximation of truncating uses before inferring |
+ // representations. The proper, exact computation will be done later, when |
+ // inserting representation changes. |
+ SetFlag(kTruncatingToInt32); |
for (HUseIterator it(uses()); !it.Done(); it.Advance()) { |
HValue* value = it.value(); |
if (!value->IsPhi()) { |
@@ -1967,6 +1971,9 @@ void HPhi::InitRealUses(int phi_id) { |
PrintF("#%d Phi is used by real #%d %s as %s\n", |
id(), value->id(), value->Mnemonic(), rep.Mnemonic()); |
} |
+ if (!value->IsSimulate() && !value->CheckFlag(kTruncatingToInt32)) { |
+ ClearFlag(kTruncatingToInt32); |
+ } |
} |
} |
} |