HPhis with HParameter inputs must have Tagged representation
authorjkummerow@chromium.org <jkummerow@chromium.org>
Wed, 5 Nov 2014 13:23:15 +0000 (13:23 +0000)
committerjkummerow@chromium.org <jkummerow@chromium.org>
Wed, 5 Nov 2014 13:24:43 +0000 (13:24 +0000)
BUG=v8:3670
LOG=n
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/702053002

Cr-Commit-Position: refs/heads/master@{#25153}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/hydrogen-instructions.h

index 5723d4a..233ca42 100644 (file)
@@ -5356,6 +5356,12 @@ class HParameter FINAL : public HTemplateInstruction<0> {
     return Representation::None();
   }
 
+  virtual Representation KnownOptimalRepresentation() OVERRIDE {
+    // If a parameter is an input to a phi, that phi should not
+    // choose any more optimistic representation than Tagged.
+    return Representation::Tagged();
+  }
+
   DECLARE_CONCRETE_INSTRUCTION(Parameter)
 
  private: