Reviewers: Hannes Payer,

Description:
[turbofan] Materialize the correct kind of constant for bit 1.

Bit 1 should be represented as Int32Constant 1 after simplified
lowering, but OneConstant returns NumberConstant 1.0.

[email protected]

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

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

Affected files (+1, -1 lines):
  M src/compiler/representation-change.h


Index: src/compiler/representation-change.h
diff --git a/src/compiler/representation-change.h b/src/compiler/representation-change.h index 5e7a8d04c687fe8152a92e2484d9c20336e23e4d..e4c257f2ea4bbef34adae3fec268785d5a892c27 100644
--- a/src/compiler/representation-change.h
+++ b/src/compiler/representation-change.h
@@ -294,7 +294,7 @@ class RepresentationChanger {
       case IrOpcode::kInt32Constant: {
         int32_t value = OpParameter<int32_t>(node);
         if (value == 0 || value == 1) return node;
-        return jsgraph()->OneConstant();  // value != 0
+        return jsgraph()->Int32Constant(1);  // value != 0
       }
       case IrOpcode::kHeapConstant: {
Handle<Object> handle = OpParameter<Unique<Object>
(node).handle();


--
--
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