Reviewers: Jakob,

Message:
PTAL

Description:
[arm64] Fixed unnecessary environment assignment to lithium instruction.

BUG=chromium:490021
LOG=N

Please review this at https://codereview.chromium.org/1235563002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+5, -4 lines):
  M src/arm64/lithium-arm64.cc
  A + test/mjsunit/regress/regress-crbug-490021.js


Index: src/arm64/lithium-arm64.cc
diff --git a/src/arm64/lithium-arm64.cc b/src/arm64/lithium-arm64.cc
index fef51c669b0d9d639f90bf7b99feca89037dcdb6..dc28f8d9a284d1f5ab3bd36c8f6fe93b1b1a465d 100644
--- a/src/arm64/lithium-arm64.cc
+++ b/src/arm64/lithium-arm64.cc
@@ -1203,7 +1203,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
     } else if (to.IsSmi()) {
       LOperand* value = UseRegisterAtStart(val);
       LInstruction* result = DefineAsRegister(new(zone()) LSmiTag(value));
-      if (val->CheckFlag(HInstruction::kUint32)) {
+      if (instr->CheckFlag(HValue::kCanOverflow)) {
         result = AssignEnvironment(result);
       }
       return result;
Index: test/mjsunit/regress/regress-crbug-490021.js
diff --git a/test/mjsunit/regress/regress-filter-contexts.js b/test/mjsunit/regress/regress-crbug-490021.js
similarity index 75%
copy from test/mjsunit/regress/regress-filter-contexts.js
copy to test/mjsunit/regress/regress-crbug-490021.js
index d2abe0032548428324afd6675a7031bf53a5e56e..745c0a801051037274b6f1e52de5a8ed92d98a86 100644
--- a/test/mjsunit/regress/regress-filter-contexts.js
+++ b/test/mjsunit/regress/regress-crbug-490021.js
@@ -4,9 +4,10 @@

 // Flags: --allow-natives-syntax

-function f() { return f.x; }
-f.__proto__ = null;
-f.prototype = "";
+var global = new Object(3);
+function f() {
+  global[0] = global[0] >>> 15.5;
+}

 f();
 f();


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to